Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
add logmath functions for completeness if nothing else
Browse files Browse the repository at this point in the history
  • Loading branch information
dhdaines committed Apr 5, 2019
1 parent 10b1655 commit 562d047
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions swig/logmath.i
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,36 @@
double exp(int prob) {
return logmath_exp($self, prob);
}

int log(double prob) {
return logmath_log($self, prob);
}

int add(int logb_p, int logb_q) {
return logmath_add($self, logb_p, logb_q);
}

int ln_to_log(double log_p) {
return logmath_ln_to_log($self, log_p);
}

double log_to_ln(int logb_p) {
return logmath_log_to_ln($self, logb_p);
}

int log10_to_log(double log_p) {
return logmath_log10_to_log($self, log_p);
}

double log_to_log10(int logb_p) {
return logmath_log_to_log10($self, logb_p);
}

float log10_to_log_float(double log_p) {
return logmath_log10_to_log_float($self, log_p);
}

double log_float_to_log10(float log_p) {
return logmath_log_float_to_log10($self, log_p);
}
}

0 comments on commit 562d047

Please sign in to comment.