[thelist] JavaScript Mathematical Calculation

David Mitchell dave at dbmdata.com
Tue Feb 10 08:38:35 CST 2004


Hi gang,

I need to convert this calculation from VBScript to JavaScript:

qrate = -1 + (v5year*v5year) ^ (1/12)

The thing that's tripping me up is the VBScript exponention operator, while
in JS is actually a bitwise operator. Can someone please help me translate
this line? Tried using Math.pow() but it doesn't give me the same result.

Thanks in advance,

Dave



More information about the thelist mailing list