| 129 | } |
| 130 | |
| 131 | private static Object asinh( |
| 132 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |
| 133 | double x = ScriptRuntime.toNumber(args, 0); |
| 134 | if (Double.isInfinite(x)) { |
| 135 | return Double.valueOf(x); |
| 136 | } |
| 137 | if (!Double.isNaN(x)) { |
| 138 | if (x == 0) { |
| 139 | if (1 / x > 0) { |
| 140 | return ScriptRuntime.zeroObj; |
| 141 | } |
| 142 | return ScriptRuntime.negativeZeroObj; |
| 143 | } |
| 144 | return Double.valueOf(Math.log(x + Math.sqrt(x * x + 1.0))); |
| 145 | } |
| 146 | return ScriptRuntime.NaNobj; |
| 147 | } |
| 148 | |
| 149 | private static Object atan( |
| 150 | Context cx, JSFunction f, Object nt, VarScope s, Object thisObj, Object[] args) { |