Jasmine
2.0.0
finished in 0.138s
raise exceptions
25 specs, 0 failures
Test exceptional cases
log(-1) = NaN
log(0) = -Infinity
log(Infinity) = Infinity
log(NaN) = NaN
Test special values
log(1) = 0
log(Math.E) = 1
log(1/Math.E) = -1
log(sqrt(Math.E)) = 0.5
log(sqrt(1/Math.E)) = -0.5
log(2^-1023) = -709.0895657128241d0, denormal arg
log(1.7976931348623157e308) = 709.7827128933840, largest double value
log(1+2^-21) = 4.7683704451632344e-7
log(2+2^-20) = 0.6931476573969898e0
log(4) = 1.3862943611198906
log(1.3799991607666016) = 0.3220828910287846; main path, i > 0, k = 0
log(1.419999122619629) = 0.35065625373947773; main path, i > 0, k = 1
log(0.6899995803833008) = -0.3710642895311607; main path, i > 0 k = -1
log(1.3799982070922852) = 0.3220821999597803; main path i < 0, k = 0
log(2.7599964141845703) = 1.0152293805197257; main path i < 0, k = 1
log(0.6899991035461426) = -0.37106498060016496; main path i < 0, k = -1
Test relationships
|log(x) + log(1/x)| < 1.77635684e-15, x = 1.2^k, 0 <= k < 2000
|Math.exp(log(x)) - x|/x < 1.2908444e-13, x = 1.4^k, 0 <= k < 2000
|Math.exp(log(x)) - x|/x < 1.266577e-13, x = 1.4^(-k), 0 <= k < 2000
|exp(log(x)) - x|/x < 5.6766649e-14, x = 1.4^k, 0 <= k < 2000
|exp(log(x)) - x|/x < 5.68410245e-14, x = 1.4^(-k), 0 <= k < 2000