When will you implement cent and ucent?
Murilo
murilomiranda92 at hotmail.com
Sun Mar 27 19:05:09 UTC 2022
On Saturday, 26 March 2022 at 18:12:08 UTC, H. S. Teoh wrote:
> On Sat, Mar 26, 2022 at 06:03:57PM +0000, Murilo via
> Digitalmars-d wrote: [...]
>> I figured BitInt would be slower because it works with
>> strings, working with pure binary would be faster, if there
>> was a cent and ucent type I would be able to do the math
>> faster.
>
> That is false. BigInt works with arrays of ulongs, which is as
> binary as you're gonna get.
>
>
> T
Thanks for clearing that up, I guess I'll just stick to BigInt
then. I've used it to make a calculator that turns numbers into
strings and does the math just like we do it with pen and paper,
that way I can calculate decimals with perfect precision. It is
able to do around 30k adds/subtracts per seconds, around 25k
multiplys per second and around 5.5k divides per second with
perfect precision of 20 decimal places.
More information about the Digitalmars-d
mailing list