std.math performance (SSE vs. real)
Russel Winder via Digitalmars-d
digitalmars-d at puremagic.com
Sun Jun 29 14:45:03 PDT 2014
Hopefully there are points here for pedantry and bloody mindedness…
On Sat, 2014-06-28 at 18:32 -0700, Walter Bright via Digitalmars-d
wrote:
[…]
> Keep in mind that D is a systems programming language, and that
implies you get
> access to the hardware types.
On Sun, 2014-06-29 at 12:22 -0700, Walter Bright via Digitalmars-d
wrote:
[…].
>
> That is not true with D. D specifies that float and double are IEEE 754 types
> which have specified size and behavior. D's real type is the largest the
> underlying hardware will support.
>
> D also specifies 'int' is 32 bits, 'long' is 64, and 'byte' is 8, 'short' is 16.
D gives access to the hardware types, and D defines the structure of all
those types. The only resolution is that D only works on that hardware
where the hardware types are the ones D defines. Thus D only works on a
subset of hardware, and can never be ported to hardware where the
hardware types differ from those defined by D.
So D float and double will not work on IBM 360 unless interpreted, and
real would be 128-bit (not IEEE)?
The D real type definitely suffers the C/C++ float and double problem!
I guess we just hope that all future hardware is IEEE754 compliant.
(This is both a trivial issue and a brick wall issue so let's keep thing
humour-ful!)
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140629/d30bf851/attachment.sig>
More information about the Digitalmars-d
mailing list