transratio formula in JS

Mike S's icon

Hi All,

I'm trying to replicate the transratio function by EJ in Javascript.

From the object: [expr exp(.057762265 * $f1)]
In JS : Math.exp(.0057762265 * $f1)

They don't give the same values, and the JS one seems to be wrong.

Is this a limitation of JS in Max or am I missing something?

ak's icon
Max Patch
Copy patch and select New From Clipboard in Max.

in your example:
.005... != .05...