What constants are available to help with math operations?
Created May 7, 2012
John Zukowski The Math object includes properties for several different constants:
- E - base of the natural logarithms, 2.71828...
- LN10 - natural log of 10, 2.30258...
- LN2 - natural log of 2, 0.69314...
- LOG10E - base 10 log of E, 0.43429...
- LOG2E - base 2 log of E, 1.44269...
- PI - PI, 3.14159...
- SQRT2 - Square root of 2, 1.41421...
- SQRT1_2 - Square root of 1/2, 0.70710...
<form> <input type="button" value="PI" onClick="window.alert(Math.PI);"> </form>You'll finds these documented at the following locations, among others: