I was surprised to see the doc of Math.log make it explicit: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Math.html#log(double) """The computed result must be within 1 ulp of the exact result. Results must be semi-monotonic."""