When will you implement cent and ucent?
user1234
user1234 at 12.de
Sun Mar 27 19:04:11 UTC 2022
On Sunday, 27 March 2022 at 16:41:33 UTC, Era Scarecrow wrote:
> I glanced at the work Walter did. Looks like a simple version
> of wideint. I thought it would just be the function prototypes.
> Instead it looks like he minimally implemented it, but it is
> basically just in the wrong spot, or not set to being called at
> all (*not too familiar with the internals i'm not sure*).
To be called, the remaining work is that a library type must be
implemented with operator overloads. Those operators overloads
will call the core int128 module routines. Also operators
overloads being templates, we can expect to have a size-efficient
cg ("pay as you go").
druntime is the right place. For example LDC can patch the
default implementation and use the LLVM-specific i128
instructions. The library type will end up using the right thing.
At this point it looks like it still *would* be possible to hook
cent/ucent operations to the int128 core module even if it's not
the way that's been chosen as cent/ucent are now deprecated.
More information about the Digitalmars-d
mailing list