On Sunday, 11 June 2017 at 18:01:41 UTC, Era Scarecrow wrote:
On Sunday, 11 June 2017 at 08:52:37 UTC, deadalnix wrote:
I ended up doing my own. There are just no way to do it well
without cent/ucent . Weka is running into the same problem for
error correction.
And what timing, I just finished getting it working with
assembly and compatible versions. Seems 5x slower rather than
the dreaded 50, but that's from testing factorial up to 100
(200ms vs 1,200ms).
Anyways, here's how it is currently, most features are
avaliable, need more tests and find occurrences where it
doesn't work.
https://github.com/rtcvb32/Side-Projects/blob/master/scaledint.d
One note, to get the x86 assembly versions, use
-version=Intel, I have it disabled so I can concentrate on the
compatible version and switch between them on my machine.
-debug includes a unittest that runs a factorial test
You misunderstood. We need cent/ucent supported by the compiler
to get to larger integral types efficiently. There are no ways
around it. There are a ton of operations such as the X86 MUL
which are able to produce a large multiplication into 2
registers. There are no way to leverage theses without compiler
provided cent/ucent.