diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2010-08-31 18:11:38 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2010-08-31 18:11:38 +0000 |
commit | 3e9daad0e04c9504b6372f3ad702f9f292f3a442 (patch) | |
tree | 9dd3a059430e9c307f564e31415566befff0c995 /src/mpc.h | |
parent | 8127c551c5936221227fdf7292cb2f1bc511580f (diff) | |
download | mpc-3e9daad0e04c9504b6372f3ad702f9f292f3a442.tar.gz |
new functions mpc_set_c, mpc_set_lc, mpc_get_c, mpc_get_lc
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@820 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/mpc.h')
-rw-r--r-- | src/mpc.h | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -51,6 +51,11 @@ MA 02111-1307, USA. */ # define _MPC_H_HAVE_INTMAX_T 1 #endif +/* Check if complex.h is included */ +#if defined (_COMPLEX_H) +# define _MPC_H_HAVE_COMPLEX 1 +#endif + /* Return values */ /* Transform negative to 2, positive to 1, leave 0 unchanged */ @@ -75,8 +80,8 @@ MA 02111-1307, USA. */ typedef int mpc_rnd_t; #define RNDC(r1,r2) (((int)(r1)) + ((int)(r2) << 4)) -#define MPC_RND_RE(x) ((mp_rnd_t)((x) & 0x0F)) -#define MPC_RND_IM(x) ((mp_rnd_t)((x) >> 4)) +#define MPC_RND_RE(x) ((mpfr_rnd_t)((x) & 0x0F)) +#define MPC_RND_IM(x) ((mpfr_rnd_t)((x) >> 4)) #define MPC_RNDNN RNDC(GMP_RNDN,GMP_RNDN) #define MPC_RNDNZ RNDC(GMP_RNDN,GMP_RNDZ) @@ -163,8 +168,8 @@ __MPC_DECLSPEC int mpc_div_2exp __MPC_PROTO ((mpc_ptr, mpc_srcptr, unsigned lon __MPC_DECLSPEC int mpc_mul_2exp __MPC_PROTO ((mpc_ptr, mpc_srcptr, unsigned long int, mpc_rnd_t)); __MPC_DECLSPEC int mpc_conj __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t)); __MPC_DECLSPEC int mpc_neg __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t)); -__MPC_DECLSPEC int mpc_norm __MPC_PROTO ((mpfr_ptr, mpc_srcptr, mp_rnd_t)); -__MPC_DECLSPEC int mpc_abs __MPC_PROTO ((mpfr_ptr, mpc_srcptr, mp_rnd_t)); +__MPC_DECLSPEC int mpc_norm __MPC_PROTO ((mpfr_ptr, mpc_srcptr, mpfr_rnd_t)); +__MPC_DECLSPEC int mpc_abs __MPC_PROTO ((mpfr_ptr, mpc_srcptr, mpfr_rnd_t)); __MPC_DECLSPEC int mpc_sqrt __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t)); __MPC_DECLSPEC int mpc_set __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_rnd_t)); __MPC_DECLSPEC int mpc_set_d __MPC_PROTO ((mpc_ptr, double, mpc_rnd_t)); @@ -192,6 +197,13 @@ __MPC_DECLSPEC int mpc_set_sj_sj __MPC_PROTO ((mpc_ptr, intmax_t, intmax_t, mpc __MPC_DECLSPEC int mpc_set_uj_uj __MPC_PROTO ((mpc_ptr, uintmax_t, uintmax_t, mpc_rnd_t)); #endif +#ifdef _MPC_H_HAVE_COMPLEX +__MPC_DECLSPEC int mpc_set_c __MPC_PROTO ((mpc_ptr, double _Complex, mpc_rnd_t)); +__MPC_DECLSPEC int mpc_set_lc __MPC_PROTO ((mpc_ptr, long double _Complex, mpc_rnd_t)); +__MPC_DECLSPEC double _Complex mpc_get_c __MPC_PROTO ((mpc_srcptr, mpc_rnd_t)); +__MPC_DECLSPEC long double _Complex mpc_get_lc __MPC_PROTO ((mpc_srcptr, mpc_rnd_t)); +#endif + __MPC_DECLSPEC void mpc_set_nan __MPC_PROTO ((mpc_ptr)); __MPC_DECLSPEC int mpc_real __MPC_PROTO ((mpfr_ptr, mpc_srcptr, mpfr_rnd_t)); |