-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
A little confused that my obfuscated code worked differently than the original code, then I found that it's the "numbers to expressions" misbehaving.
Current Behavior
"Numbers to expressions" option loses accuracy for small numbers, turning them into 0.
Steps to Reproduce
const epsilon = 1e-13; if(0 < epsilon) alert("math works!");- Obfuscate with "numbers to expressions" option on
- Math doesn't work :(
It'll be great if this feature can be made more robust. I haven't looked at the implementation code, but I guess you can do something like the following:
- For any number x, extract its integer and decimal part
- Obfuscate the integer part as what you would do
- Generate a random integer n between 100 and 100000, and obfuscate the decimal part d as [result of d * n] / n (maybe even obfuscate n as what you would do)
- add 'em up
Reactions are currently unavailable