intrte_approx(doublealpha,doubled,uint32_t*p,uint32_t*q)
Find best rational approximation
Parametersalpha Rational number to approximate
d Precision for the rational approximation
p Pointer to pre-allocated space where the numerator of the rational approximation will be stored
when operation is successful
q Pointer to pre-allocated space where the denominator of the rational approximation will be stored
when operation is successful
Returns
0 upon success, error code otherwise
intrte_approx_64(doublealpha,doubled,uint64_t*p,uint64_t*q)
Find best rational approximation (64 bit version)
Parametersalpha Rational number to approximate
d Precision for the rational approximation
p Pointer to pre-allocated space where the numerator of the rational approximation will be stored
when operation is successful
q Pointer to pre-allocated space where the denominator of the rational approximation will be stored
when operation is successful
Returns
0 upon success, error code otherwise