Deleted Added
full compact
s_truncl.c (176102) s_truncl.c (176243)
1/*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4 *
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
8 * is preserved.
9 * ====================================================
10 *
11 * From: @(#)s_floor.c 5.1 93/09/24
12 */
13
14#ifndef lint
1/*
2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
4 *
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
8 * is preserved.
9 * ====================================================
10 *
11 * From: @(#)s_floor.c 5.1 93/09/24
12 */
13
14#ifndef lint
15static char rcsid[] = "$FreeBSD: head/lib/msun/src/s_truncl.c 176102 2008-02-08 01:45:52Z bde $";
15static char rcsid[] = "$FreeBSD: head/lib/msun/src/s_truncl.c 176243 2008-02-13 16:56:52Z bde $";
16#endif
17
18/*
19 * truncl(x)
20 * Return x rounded toward 0 to integral value
21 * Method:
22 * Bit twiddling.
23 * Exception:

--- 38 unchanged lines hidden (view full) ---

62 uint64_t m = (uint64_t)-1 >> (64 - LDBL_MANT_DIG + e + 1);
63 if ((u.bits.manl & m) == 0)
64 return (x); /* x is integral */
65 if (huge + x > 0.0) /* raise inexact flag */
66 u.bits.manl &= ~m;
67 }
68 return (u.e);
69}
16#endif
17
18/*
19 * truncl(x)
20 * Return x rounded toward 0 to integral value
21 * Method:
22 * Bit twiddling.
23 * Exception:

--- 38 unchanged lines hidden (view full) ---

62 uint64_t m = (uint64_t)-1 >> (64 - LDBL_MANT_DIG + e + 1);
63 if ((u.bits.manl & m) == 0)
64 return (x); /* x is integral */
65 if (huge + x > 0.0) /* raise inexact flag */
66 u.bits.manl &= ~m;
67 }
68 return (u.e);
69}
70
71#if LDBL_MANT_DIG == 53
72__weak_reference(trunc, truncl);
73#endif