added libtomfloat-0.01
[libtomfloat.git] / mpf_const_l10e.c
blob85e6c36af25b6ce6fbbbc8b9807a0062ff04d430
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.
7 *
8 * This library is free for all purposes without any express
9 * gurantee it works
11 * Tom St Denis, tomstdenis@iahu.ca, http://float.libtomcrypt.org
13 #include <tomfloat.h>
15 int mpf_const_l10e(mp_float *a)
17 int err;
18 if ((err = mpf_const_ln_d(a, 10)) != MP_OKAY) {
19 return err;
21 return mpf_inv(a, a);
23 /* log_10 e == 1/ln(e) */