(
Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args)
| 466 | } |
| 467 | |
| 468 | private static Object log( |
| 469 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
| 470 | double x = ScriptRuntime.toNumber(args, 0); |
| 471 | // Java's log(<0) = -Infinity; we need NaN |
| 472 | x = (x < 0) ? Double.NaN : Math.log(x); |
| 473 | return ScriptRuntime.wrapNumber(x); |
| 474 | } |
| 475 | |
| 476 | private static Object log1p( |
| 477 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |