good reasons not to use D?
Russel Winder via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Oct 31 09:06:33 PDT 2015
On Sat, 2015-10-31 at 15:41 +0000, tcak via Digitalmars-d-learn wrote:
> On Saturday, 31 October 2015 at 14:37:23 UTC, rumbu wrote:
> > On Friday, 30 October 2015 at 10:35:03 UTC, Laeeth Isharc wrote:
> > > I'm writing a talk for codemesh on the use of D in finance.
> > >
> > > Any other thoughts?
> >
> > For finance stuff - missing a floating point decimal data type.
> > Things like 1.1 + 2.2 = 3.3000000000000003
>
> I always thought that this type of arithmetic operations can be
> solved with BigInt, but never tried it. Since the issue is
> related to IEEE standard, a simulated (not supported by hardware
> directly) data type might be required.
In that std.bigint.BigInt provides the accuracy, yes it does suffice.
But it is slow. As far as I am aware only IBM Big Iron (aka mainframes,
aka z-Series) has hardware decimal floating point these days. (Even
though 1970s and 1980s microprocessors had the feature.)
--
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-learn/attachments/20151031/ffbda4d8/attachment.sig>
More information about the Digitalmars-d-learn
mailing list