NutCracker loses precision when outputting floating point numbers. For example, the script print(1e-16); is decompiled as this.print(0.00000000); which is clearly not the same thing. The script print(0.9); is decompiled as this.print(0.89999998); which might be the same thing but also might not be, and definitely looks bad.
Also, the output is ugly. print(1.0); is decompiled as this.print(1.00000000);. This gets especially noticeable with math-heavy code.
Basically, the floating-point number printer should be fixed to print in a round-trippable format that's no longer than necessary to convey the correct value.
NutCracker loses precision when outputting floating point numbers. For example, the script
print(1e-16);
is decompiled asthis.print(0.00000000);
which is clearly not the same thing. The scriptprint(0.9);
is decompiled asthis.print(0.89999998);
which might be the same thing but also might not be, and definitely looks bad.Also, the output is ugly.
print(1.0);
is decompiled asthis.print(1.00000000);
. This gets especially noticeable with math-heavy code.Basically, the floating-point number printer should be fixed to print in a round-trippable format that's no longer than necessary to convey the correct value.