1 |
+ |
/* $MidnightBSD$ */ |
2 |
|
/* From: @(#)e_hypot.c 1.3 95/01/18 */ |
3 |
|
/* |
4 |
|
* ==================================================== |
12 |
|
*/ |
13 |
|
|
14 |
|
#include <sys/cdefs.h> |
15 |
< |
__MBSDID("$MidnightBSD$"); |
15 |
> |
__FBSDID("$FreeBSD: stable/10/lib/msun/src/e_hypotl.c 226412 2011-10-16 05:36:39Z das $"); |
16 |
|
|
17 |
|
/* long double version of hypot(). See e_hypot.c for most comments. */ |
18 |
|
|
22 |
|
#include "math.h" |
23 |
|
#include "math_private.h" |
24 |
|
|
24 |
– |
#define GET_LDBL_EXPSIGN(i, v) do { \ |
25 |
– |
union IEEEl2bits uv; \ |
26 |
– |
\ |
27 |
– |
uv.e = v; \ |
28 |
– |
i = uv.xbits.expsign; \ |
29 |
– |
} while (0) |
30 |
– |
|
25 |
|
#define GET_LDBL_MAN(h, l, v) do { \ |
26 |
|
union IEEEl2bits uv; \ |
27 |
|
\ |
28 |
|
uv.e = v; \ |
29 |
|
h = uv.bits.manh; \ |
30 |
|
l = uv.bits.manl; \ |
37 |
– |
} while (0) |
38 |
– |
|
39 |
– |
#define SET_LDBL_EXPSIGN(v, i) do { \ |
40 |
– |
union IEEEl2bits uv; \ |
41 |
– |
\ |
42 |
– |
uv.e = v; \ |
43 |
– |
uv.xbits.expsign = i; \ |
44 |
– |
v = uv.e; \ |
31 |
|
} while (0) |
32 |
|
|
33 |
|
#undef GET_HIGH_WORD |