com.logspace: Operations in Log-space

Description Usage Arguments Details Value Author(s) Examples

Description

Computes the difference of two values in log-space.

Usage

1
2
3

Arguments

x

first value

y

second value

Details

com.log.difference computes the difference of two values in log-space, log( e^x - e^y ), without significant chance of overflow or underflow.

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.factorial computes log(x!) which is equivalent to a summation.

Value

The requested computation in log-space.

Author(s)

Jeffrey Dunn

Examples

1
2
3
	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

compoisson documentation built on May 1, 2019, 11:17 p.m.