powered by
com.log.difference(x, y) com.log.sum(x, y) com.log.factorial(x)
com.log.difference
com.log.sum computes the sum of two values in log-space, $log( e^x + e^y )$, without significant change of overflow or underflow.
com.log.sum
com.log.factorial computes $log(x!)$ which is equivalent to a summation.
com.log.factorial
a = exp(com.log.difference(log(100), log(20))); # a = 80 b = exp(com.log.sum(log(100), log(20))); # b = 120 c = exp(com.log.factorial(4)); # c = 24
Run the code above in your browser using DataLab