Skip to content

Commit

Permalink
Debug Lua
Browse files Browse the repository at this point in the history
  • Loading branch information
flashultra committed Dec 13, 2024
1 parent 5051966 commit 7452b85
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions std/haxe/math/bigint/BigInt_.hx
Original file line number Diff line number Diff line change
Expand Up @@ -717,14 +717,27 @@ class BigInt_ {
if (!equals2Int(v, 1)) {
return BigInt.ZERO;
}

#if (lua)
trace("x: "+toString1(x,10));
trace("d1: "+toString1(d,10));
#end

while (BigIntArithmetic.compareInt(d, 0) < 0) {
d = add2(d, x);
}

#if (lua)
trace("d2: "+toString1(d,10));
#end

while (BigIntArithmetic.compare(d, x) >= 0) {
d = sub2(d, x);
}

#if (lua)
trace("d3: "+toString1(d,10));
#end

return d;
}
Expand Down

0 comments on commit 7452b85

Please sign in to comment.