ulps: Fix long lines
[mathlib.git] / ulps / subr_mpc.c
CommitLineData
4dfa4f2a
SK
1#include <mpc.h>
2#include "mytypes.h"
24d04885 3#include "subr_mpc.h"
4dfa4f2a 4
918436de 5#if MPC_VERSION_MAJOR == 0 && MPC_VERSION_MINOR < 9
4dfa4f2a 6double complex
8a710f61 7mpc_get_dc(mpc_t op, mpfr_rnd_t rnd)
4dfa4f2a
SK
8{
9 mpfr_t mp_real;
10 mpfr_t mp_imag;
11 double_complex z;
12
13 mpfr_init2(mp_real, 200);
14 mpfr_init2(mp_imag, 200);
15
16 mpc_real(mp_real, op, rnd);
17 mpc_imag(mp_imag, op, rnd);
18
19 z.parts[0] = mpfr_get_d(mp_real, rnd);
20 z.parts[1] = mpfr_get_d(mp_imag, rnd);
21
22 mpfr_clear(mp_real);
23 mpfr_clear(mp_imag);
24
25 return (z.z);
26}
27
28long double complex
8a710f61 29mpc_get_ldc(mpc_t op, mpfr_rnd_t rnd)
4dfa4f2a 30{
3ea73282
SK
31 mpfr_t mp_real;
32 mpfr_t mp_imag;
4dfa4f2a
SK
33 long_double_complex z;
34
3ea73282
SK
35 mpfr_init2(mp_real, 200);
36 mpfr_init2(mp_imag, 200);
37
38 mpc_real(mp_real, op, rnd);
39 mpc_imag(mp_imag, op, rnd);
40
41 z.parts[0] = mpfr_get_ld(mp_real, rnd);
42 z.parts[1] = mpfr_get_ld(mp_imag, rnd);
43
44 mpfr_clear(mp_real);
45 mpfr_clear(mp_imag);
46
4dfa4f2a
SK
47 return (z.z);
48}
918436de 49#endif