/**
Returns the product of `a` and `b`.
The code is different from Int64's `mul(a, b)` because it causes problems for values that represent higher than 64 bits.
**/
@:op(A * B)
public static #if !lua inline #end function mul(a:Int128, b:Int128):Int128 {
return make(b.high * a.high, (a.low * b.low));
}
This here is the current multiplication function.
When it goes up to 18 quintillion (which is the maximum unsigned 64 bit number), it's supposed to increment the high value. But, it appears that I can't really do that.
The trace if you want to see what's going on:
This here is the current multiplication function. When it goes up to 18 quintillion (which is the maximum unsigned 64 bit number), it's supposed to increment the
high
value. But, it appears that I can't really do that. The trace if you want to see what's going on:I'm trying to write an Int128 for haxe btw. Here are the files: Int128.txt Int128Helper.txt Int64.txt Int64Helper.txt