Skip to content

Commit

Permalink
Swapped operands in atanh for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabergia committed Jan 15, 2024
1 parent 8d62fb7 commit 2549003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/org/mozilla/javascript/NativeMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ private static Object atanh(Context cx, Scriptable scope, Scriptable thisObj, Ob
}
return ScriptRuntime.negativeZeroObj;
}
return Double.valueOf(0.5 * Math.log((x + 1.0) / (1.0 - x)));
return Double.valueOf(0.5 * Math.log((1.0 + x) / (1.0 - x)));
}
return ScriptRuntime.NaNobj;
}
Expand Down

0 comments on commit 2549003

Please sign in to comment.