When will you implement cent and ucent?

Era Scarecrow rtcvb32 at yahoo.com
Sat Mar 26 15:43:49 UTC 2022


On Saturday, 26 March 2022 at 11:37:28 UTC, Salih Dincer wrote:
> The code is a bit old, but it works flawlessly and has useful 
> aliases:
>
> https://github.com/d-gamedev-team/gfm/blob/master/integers/gfm/integers/wideint.d

  Flawless maybe, but definitely slow when you get to division. It 
can only double the size of integers.

  If memory serves me right, it uses shift and subtraction for 
division, but it also uses 2 lower types so if you do say a 
256bit type, it creates and uses 2 128 bit types, which uses 2 64 
bit types to do the job.


More information about the Digitalmars-d mailing list