diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-11-05 15:41:27 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2006-11-05 15:41:27 +0000 |
commit | b0cb4e8e22ea7c4523d033fd422489466f2cbc67 (patch) | |
tree | 2284f4be4590762b3c421f727921c9adda0f8d36 /mpfr.h | |
parent | 802adf8fc0607c0c4334221a9263080497ebdfc6 (diff) | |
download | mpfr-b0cb4e8e22ea7c4523d033fd422489466f2cbc67.tar.gz |
added new (preliminary) conversions functions to/from decimal64
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4185 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr.h')
-rw-r--r-- | mpfr.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -124,6 +124,14 @@ typedef enum { MPFR_INF_KIND = 1, MPFR_ZERO_KIND = 2, MPFR_REGULAR_KIND = 3 } mpfr_kind_t; +/* the decimal64 conversion routines depend on _GMP_IEEE_FLOATS */ +#define WANT_DECIMAL64 _GMP_IEEE_FLOATS + +#ifdef WANT_DECIMAL64 +/* FIXME: remove/replaced when decimal64 is a standard C type */ +typedef double decimal64; +#endif + /* GMP defines: + size_t: Standard size_t + __GMP_ATTRIBUTE_PURE Attribute for math functions. @@ -227,6 +235,10 @@ __MPFR_DECLSPEC void mpfr_set_default_prec _MPFR_PROTO((mpfr_prec_t)); __MPFR_DECLSPEC mp_prec_t mpfr_get_default_prec _MPFR_PROTO((void)); __MPFR_DECLSPEC int mpfr_set_d _MPFR_PROTO ((mpfr_ptr, double, mpfr_rnd_t)); +#ifdef WANT_DECIMAL64 +__MPFR_DECLSPEC int mpfr_set_decimal64 _MPFR_PROTO ((mpfr_ptr, decimal64, + mp_rnd_t)); +#endif __MPFR_DECLSPEC int mpfr_set_ld _MPFR_PROTO ((mpfr_ptr, long double, mpfr_rnd_t)); __MPFR_DECLSPEC int @@ -280,6 +292,10 @@ __MPFR_DECLSPEC uintmax_t mpfr_get_uj _MPFR_PROTO ((mpfr_srcptr, mpfr_rnd_t)); __MPFR_DECLSPEC mp_exp_t mpfr_get_z_exp _MPFR_PROTO ((mpz_ptr, mpfr_srcptr)); __MPFR_DECLSPEC double mpfr_get_d _MPFR_PROTO ((mpfr_srcptr, mpfr_rnd_t)); +#ifdef WANT_DECIMAL64 +__MPFR_DECLSPEC decimal64 mpfr_get_decimal64 _MPFR_PROTO ((mpfr_srcptr, + mp_rnd_t)); +#endif __MPFR_DECLSPEC long double mpfr_get_ld _MPFR_PROTO ((mpfr_srcptr, mpfr_rnd_t)); __MPFR_DECLSPEC double mpfr_get_d1 _MPFR_PROTO ((mpfr_srcptr)); |