When will you implement cent and ucent?
max haughton
maxhaton at gmail.com
Thu Mar 31 23:26:29 UTC 2022
On Thursday, 31 March 2022 at 22:43:27 UTC, kinke wrote:
> On Thursday, 31 March 2022 at 22:35:46 UTC, max haughton wrote:
>> It's still quite ugly compared to just implementing cent
>> properly e.g. lack of VRP and implicit conversions make the
>> library approach a bit meh.
>
> There's another advantage (besides the main one - not having to
> touch the frontend at all) - it's not restricted to 128 bits
> and *could* thus be a template for integers with N bits. I
> doubt VRP and implicit conversions are of high priority for the
> presumably few specialized usages of huge integers.
The few times I have needed wide arithmetic in D, it not being
available has been irritating, having it be available but as a
weird library feature is just goading.
e.g. Being able to call 128bit functions with narrower types
without having to inject Cent(xyz) everywhere is not a small
thing.
More information about the Digitalmars-d
mailing list