haxe
haxe copied to clipboard
Implement Int128 + its numeral literal suffix
Everything in the pure haxe version is done but the issue is that Int128.mul(a, b) doesn't multiply properly with the value bigger than 1.8e19 which means the number will overflow. So, I was wondering if any of you could please fix that issue.
I'm not sure if this is the right place to ask for help, the Issues tab might be more sufficient.
Actually I prefer a PR here because it's easier to reason about the code and see the failing tests, so I think this is a good initiative.
How come 14 tests failed?
How come 14 tests failed?
That's what the details tab are for, perhaps you can click on them :P
This is an error from linux build 4.08.1:
- | [...]
126 | }
Type Int64Helper refined from class Int128Helper```
Guess what? I fixed it with no effort just today. It was just that the mask was wrong. The multiply mask for Int64 is 0xFFFF (65535) so The multiply mask for Int128 should be 0xFFFFFFFF (4294967295).
🤓
Just a quick question:
https://github.com/SomeGuyWhoLovesCoding/haxe-int128/blob/5f616d5d557386d2be669b47b8bc846f589a7ea2/std/haxe/Int128.hx#L67C2-L73C3
Could it be that the overflow checks are missing on the toInt method?
With kind regards, mikaib
Just a quick question:
https://github.com/SomeGuyWhoLovesCoding/haxe-int128/blob/5f616d5d557386d2be669b47b8bc846f589a7ea2/std/haxe/Int128.hx#L67C2-L73C3
Could it be that the overflow checks are missing on the
toIntmethod?With kind regards, mikaib
The overflow checks are not missing. I just did Int64.toInt(x.low) just to write easier. Then, the low value can do the job instead of repeating the whole task with the int128 value.
Successfully finished implementing the Int128 numeral literal suffix for haxe. Now it's done.
I see why the issue happened in the first place now
Okay so I should've left the increment and decrement functions alone as the tests want My bad
The pain is finally over
Now time to wait until the action is fully finished with the checks and this pr gets merged
I gotta make an issue about that
Now I'm just waiting for this pr to get merged
balls
balls
Ok
Ignore the commits adter the hrr 717 mention. It was an accident and I didn't mean to do so.
100 commits. Oh boy. I wasted the 15 of them lol
The toString() function runs very slow, so I'm rewriting it.
This pr is now officially closed.
My haxe fork is staying.