The table below shows the relative performance of various functions provided by the Math class, based on measurements made on an Intel Pentium.
| Method | Operation | Approx time (compared to floating point addition) |
|---|---|---|
| Math.exp(x) | ex | 9 |
| Math.log(x) | log2 x | 27 |
| Math.sqrt(x) | √x | 10 |
| Math.sin(x) | sin x | 16 |
| Math.cos(x) | cos x | 20 |
| Math.pow(x, y) | xy | 15 or 150 |
| Math.exp(y * Math.log(x)) | 90 |