When will you implement cent and ucent?

Era Scarecrow rtcvb32 at yahoo.com
Sun Mar 27 03:10:41 UTC 2022


On Saturday, 26 March 2022 at 19:30:13 UTC, Walter Bright wrote:
> On 3/25/2022 4:33 PM, Murilo wrote:
>> I have been waiting for years now, can't you guys just add 
>> these 2 types to the language?
>
> I did some work implementing it as a native type. But after a 
> while I realized that it was not appropriate to implement it 
> that way, it should be a library type like `complex` is.
>
> The library type hasn't been implemented (anyone is free to do 
> this!), but the math part has been:
>
> https://dlang.org/phobos/core_int128.html

  Multiplication and division are the only parts needing any real 
work, most of it is very simple. As mentioned i have my library 
written, though i suppose i'd have to fight a bit with github 
that i never quite got working before when doing bitmanip 
bitfields.

  Though, if int128 just forwards calls to my library that would 
be far easier to implement while keeping the assembly code... 
I'll see about tinkering with this.


More information about the Digitalmars-d mailing list