[−][src]Crate r_mathlib
Things I've done to make R's nmath library work
 Copied the nmath source
 Set
MATHLIB_STANDALONE
: telling nmath to build for use outside R  Copied R's includes since they are still needed even with
MATHLIB_STANDALONE
.  Copy
Rconfig.h
andconfig.h
from the mingw dir (normally these files would be generated, but I think the math libs use very little of them).  Copy
Rmath.h
fromRmath.h0.in
and replace the build system placeholders (there are only 2).  Manually whitelist the functions to include, otherwise we pull in a lot of stuff, including stuff outside the source tree (and also it doesn't compile for some reason).
Rmath.h
wierdly sets the normal functions as aliases  we have to use the raw function name here e.g.dnorm4
.
I've done some work on rust versions of these functions in the riir
branch. This branch
should be used for testing those functions in future.
R is released as GPLv2 which I interpret as meaning this library must also be released as GPLv2. If all the functions were replaced with native rust ones, then the license could be changed to something more permissive.
Modules
ffi  This module provides the output of bindgen, in case the raw functions are useful. 
Functions
beta_cdf  Evaluate the culmulative distribution function of the beta distribution with parameters 
beta_pdf  Evaluate the probability density function of the beta distribution with parameters 
beta_quantile  Evaluate the quantile function of the beta distribution with parameters 
binomial_cdf  Evaluate the culmulative distribution function of the binomial distribution with 
binomial_pdf  Evaluate the probability density function of the binomial distribution with 
binomial_quantile  Evaluate the quantile function of the binomial distribution with 
cauchy_cdf  Evaluate the culmulative distribution function of the Cauchy distribution with parameters

cauchy_pdf  Evaluate the probability density function of the Cauchy distribution with parameters 
cauchy_quantile  Evaluate the quantile function of the Cauchy distribution with parameters

chi_squared_cdf  Evaluate the culmulative distribution function of the chisquared distribution with 
chi_squared_pdf  Evaluate the probability density function of the chisquared distribution with 
chi_squared_quantile  Evaluate the quantile function of the chisquared distribution with 
exponential_cdf  Evaluate the culmulative distribution function of the exponential distribution with given

exponential_pdf  Evaluate the probability density function of the exponential distribution with given 
exponential_quantile  Evaluate the quantile function of the exponential distribution with given 
f_cdf  Evaluate the culmulative distribution function of the f distribution with parameters 
f_pdf  Evaluate the probability density function of the f distribution with parameters 
f_quantile  Evaluate the quantile function of the f distribution with parameters 
gamma_cdf  Evaluate the culmulative density function of the gamma distribution with 
gamma_pdf  Evaluate the probability density function of the gamma distribution with given 
gamma_quantile  Evaluate the quantile function of the gamma distribution with 
geometric_cdf  Evaluate the culmulative distribution function of the geometric distribution with trial
probability 
geometric_pdf  Evaluate the probability density function of the geometric distribution with trial probability

geometric_quantile  Evaluate the quantile function of the geometric distribution with trial probability 
hypergeometric_cdf  Evaluate the culmulative distribution function of the hypergeometric distribution. If 
hypergeometric_pdf  Evaluate the probability density function of the hypergeometric distribution. If 
hypergeometric_quantile  Evaluate the quantile function of the hypergeometric distribution. If 
logistic_cdf  Evaluate the culmulative distribution function of the logistic distribution. 
logistic_pdf  Evaluate the probability density function of the logistic distribution. 
logistic_quantile  Evaluate the quantile function of the logistic distribution. 
lognormal_cdf  Evaluate the culmulative distribution function of the lognormal distribution with parameters

lognormal_pdf  Evaluate the probability density function of the lognormal distribution with parameters

lognormal_quantile  Evaluate the quantile function of the lognormal distribution with parameters 
neg_binomial_cdf  Evaluate the culmulative distribution function of the negative binomial distribution. If there
is 
neg_binomial_pdf  Evaluate the probability density function of the negative binomial distribution. If there is

neg_binomial_quantile  Evaluate the quantile function of the negative binomial distribution. If there
is 
non_central_beta_cdf  Evaluate the culmulative distribution function of the noncentral beta distribution. 
non_central_beta_pdf  Evaluate the probability density function of the noncentral beta distribution. 
non_central_beta_quantile  Evaluate the quantile function of the noncentral beta distribution. 
non_central_f_cdf  Evaluate the culmulative distribution function of the noncentral f distribution. 
non_central_f_pdf  Evaluate the probability density function of the noncentral f distribution. 
non_central_f_quantile  Evaluate the quantile function of the noncentral f distribution. 
non_central_t_cdf  Evaluate the culmulative distribution function of the noncentral student's t distribution. 
non_central_t_pdf  Evaluate the probability density function of the noncentral student's t distribution. 
non_central_t_quantile  Evaluate the quantile function of the noncentral student's t distribution. 
noncentral_chi_squared_cdf  Evaluate the culmulative distribution function of the noncentral chisquared distribution with

noncentral_chi_squared_pdf  Evaluate the probability density function of the noncentral chisquared distribution with 
noncentral_chi_squared_quantile  Evaluate the quantile function of the noncentral chisquared distribution with 
normal_cdf  Evaluate the culmulative density function of the normal distribution with mean 
normal_cdf_both  Evaluate the culmulative density function of the normal distribution with mean 
normal_pdf  Evaluate the probability density function of the normal distribution with mean 
normal_quantile  Evaluate the quantile function of the normal distribution with mean 
poisson_cdf  Evaluate the culmulative distribution function of the poisson distribution. 
poisson_pdf  Evaluate the probability density function of the poisson distribution. 
poisson_quantile  Evaluate the quantile function of the poisson distribution. 
signrank_cdf  Evaluate the culmulative distribution function of the signrankon signed rank distribution. 
signrank_pdf  Evaluate the probability density function of the Wilcoxon signed rank distribution. 
signrank_quantile  Evaluate the quantile function of the signrankon signed rank distribution. 
students_t_cdf  Evaluate the culmulative distribution function of the student's t distribution with degrees of
freedom 
students_t_pdf  Evaluate the probability density function of the student's t distribution with degrees of
freedom 
students_t_quantile  Evaluate the quantile function of the student's t distribution with degrees of
freedom 
tukey_pdf  Evaluate the culmulative distribution function of the studentized range distribution. 
tukey_quantile  Evaluate the quantile function of the studentized range distribution. 
weibull_cdf  Evaluate the culmulative distribution function of the Weibull distribution. 
weibull_pdf  Evaluate the probability density function of the Weibull distribution. 
weibull_quantile  Evaluate the quantile function of the Weibull distribution. 
wilcox_cdf  Evaluate the culmulative distribution function of the Wilcoxon ranksum distribution. 
wilcox_pdf  Evaluate the probability density function of the Wilcoxon ranksum distribution. 
wilcox_quantile  Evaluate the quantile function of the Wilcoxon ranksum distribution. 