Qualia
0.2
|
Go to the source code of this file.
Macros | |
#define | log1p(x) log(1+(x)) |
#define | LOG_2_PI 1.83787706640934548355 |
#define | LOG_ZERO -INF |
#define | LOG_ONE 0 |
real | logAdd (real log_a, real log_b) |
real | logSub (real log_a, real log_b) |
logSub(log_a,log_b) = log(a-b) More... | |
#define log1p | ( | x | ) | log(1+(x)) |
#define LOG_2_PI 1.83787706640934548355 |
Some simple functions for log operations.
#define LOG_ONE 0 |
#define LOG_ZERO -INF |
logAdd(log_a,log_b) = log(a+b) = log(exp(log_a)+exp(log_b)) but done in a smart way so that if log_a or log_b are large but not their difference the computation works correctly.