Thank you for filing! Check list:
Reproduction ReScript 12.3.0 code:
let exponentTest = () => {
2.0 ** (0.0 /. 10000.0)
}
Console.log(exponentTest())
Generated Javascript code:
function exponentTest() {
return 2.0 ** 0.0 / 10000.0;
}
Actual output:
Expected output:
The problem here is that 2.0 ** 0.0 / 10000.0 != 2.0 ** (0.0 / 10000.0). The former results in 0.001 while the latter results in 1.0.
I guess Javascript in this case has a different operation precedence.
Tested on Firefox 153.0.3 (64-bit), Arch Linux
Thank you for filing! Check list:
Reproduction ReScript 12.3.0 code:
Generated Javascript code:
Actual output:
Expected output:
The problem here is that
2.0 ** 0.0 / 10000.0!=2.0 ** (0.0 / 10000.0). The former results in 0.001 while the latter results in 1.0.I guess Javascript in this case has a different operation precedence.
Tested on Firefox 153.0.3 (64-bit), Arch Linux