1 /* LibTomFloat, multiple-precision floating-point library
3 * LibTomFloat is a library that provides multiple-precision
4 * floating-point artihmetic as well as trigonometric functionality.
6 * This library requires the public domain LibTomMath to be installed.
8 * This library is free for all purposes without any express
11 * Tom St Denis, tomstdenis@iahu.ca, http://float.libtomcrypt.org
17 int mpf_const_pi(mp_float
*a
)
20 if ((err
= mpf_const_d(a
, 1)) != MP_OKAY
) {
23 if ((err
= mpf_atan(a
, a
)) != MP_OKAY
) {
26 if ((err
= mpf_mul_2(a
, a
)) != MP_OKAY
) {
29 return mpf_mul_2(a
, a
);