Andrei's list of barriers to D adoption

Imperatorn johan_forsberg_86 at hotmail.com
Thu Apr 8 20:42:08 UTC 2021


On Wednesday, 7 April 2021 at 14:21:40 UTC, Radek wrote:
> On Monday, 6 June 2016 at 06:29:27 UTC, Andrei Alexandrescu 
> wrote:
>> On 6/6/16 6:17 AM, Andre Pany wrote:
>>> to be usable for companies which want to create economic 
>>> software,
>>> in my opinion D lacks std.decimal.
>>
>> Do C, C++, Java, Go, or Rust have a standard decimal type? -- 
>> Andrei
>
> Hello Andrei, there's a nice arbitrary precision arithmetic 
> library for Java: http://apfloat.org/apfloat_java - we used it 
> some time ago because we had to mirror Oracle's number 
> precision. It also provides all important arithmetic, 
> trigonometric and other functions we need. There's C++ version 
> too: http://apfloat.org/apfloat/2.41 - but I don't know if it 
> has all the features Java version has, it was last updated at 
> 2006.
>
> I think it would be very very nice to have it ported to D...
>
> Sorry for bothering you, I'm new to D language, I have bought a 
> book and I'm learning now, but the project I think I will write 
> in D needs to mirror Oracle's number or Postgresql's numeric 
> precision too... Yes, there will be minimal need of that 
> precision in reality and I can live with decimal[32|64|128] for 
> now.
>
> Best regards, Radek

What about CustomFloat 
(https://dlang.org/phobos/std_numeric.html#.CustomFloat) or
https://github.com/andersonpd/decimal that's an implementation of 
http://www.speleotrove.com/decimal/decarith.pdf or
http://rumbu13.github.io/decimal/doc/decimal.html or
https://github.com/Remotion/decimal



More information about the Digitalmars-d mailing list