Home
last modified time | relevance | path

Searched +full:range +full:- +full:double (Results 1 – 25 of 971) sorted by relevance

12345678910>>...39

/freebsd/contrib/arm-optimized-routines/math/aarch64/advsimd/
H A Dfinite_pow.h2 * Double-precision x^y function.
4 * Copyright (c) 2018-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
20 #define SmallExp 0x3c9 /* top12(0x1p-54). */
22 #define ThresExp 0x03f /* BigExp - SmallExp. */
30 #define SmallPowX 0x001 /* top12(0x1p-126). */
32 #define ThresPowX 0x7fe /* BigPowX - SmallPowX. */
33 #define SmallPowY 0x3be /* top12(0x1.e7b6p-65). */
35 #define ThresPowY 0x080 /* BigPowY - SmallPowY. */
37 /* Top 12 bits of a double (sign and exponent bits). */
[all …]
/freebsd/contrib/arm-optimized-routines/math/
H A Dtgamma128.c3 * for 128-bit long double.
5 * Copyright (c) 2006-2024, Arm Limited.
6 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
12 * maths libraries under the standard name tgammal, if long double is
13 * 128-bit. Such a library will probably want to check the error
34 static long double poly(const long double *coeffs, size_t n, long double x) in poly()
36 long double result = coeffs[--n]; in poly()
39 result = (result * x) + coeffs[--n]; in poly()
46 * relates gamma(-x) and gamma(x).
48 static long double sin_pi_x_over_pi(long double x) in sin_pi_x_over_pi()
[all …]
H A Dexp.c2 * Double-precision e^x function.
4 * Copyright (c) 2018-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
21 #define C2 __exp_data.poly[5 - EXP_POLY_ORDER]
22 #define C3 __exp_data.poly[6 - EXP_POLY_ORDER]
23 #define C4 __exp_data.poly[7 - EXP_POLY_ORDER]
24 #define C5 __exp_data.poly[8 - EXP_POLY_ORDER]
25 #define C6 __exp_data.poly[9 - EXP_POLY_ORDER]
31 a double. (int32_t)KI is the k used in the argument reduction and exponent
34 static inline double
[all …]
H A Dexp2.c2 * Double-precision 2^x function.
4 * Copyright (c) 2018-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
29 a double. (int32_t)KI is the k used in the argument reduction and exponent
32 static inline double
40 sbits -= 1ull << 52; in specialcase()
45 /* k < 0, need special care in the subnormal range. */ in specialcase()
52 range to avoid double rounding that can cause 0.5+E/2 ulp error where in specialcase()
53 E is the worst-case ulp error outside the subnormal range. So this in specialcase()
54 is only useful if the goal is better than 1 ulp worst-case error. */ in specialcase()
[all …]
H A Dexp10.c2 * Double-precision 10^x function.
4 * Copyright (c) 2023-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
13 #define IndexMask (N - 1)
15 #define UFlowBound -0x1.5ep+8 /* -350. */
16 #define SmallTop 0x3c6 /* top12(0x1p-57). */
18 #define Thresh 0x41 /* BigTop - SmallTop. */
22 static double
30 sbits -= 1ull << 52; in special_case()
36 /* n < 0, need special care in the subnormal range. */ in special_case()
[all …]
H A Dsincosf.h4 * Copyright (c) 2018-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
12 /* 2PI * 2^-64. */
13 static const double pi63 = 0x1.921FB54442D18p-62;
15 static const float pio4f = 0x1.921FB6p-1f;
20 double sign[4]; /* Sign of sine in quadrants 0..3. */
21 double hpi_inv; /* 2 / PI ( * 2^24 if !TOINT_INTRINSICS). */
22 double hpi; /* PI / 2. */
23 double c0, c1, c2, c3, c4; /* Cosine polynomial. */
24 double s1, s2, s3; /* Sine polynomial. */
[all …]
H A Dpow.c2 * Double-precision x^y function.
4 * Copyright (c) 2018-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
15 Worst-case error: 0.54 ULP (~= ulperr_exp + 1024*Ln2*relerr_log*2^53)
16 relerr_log: 1.3 * 2^-68 (Relative error of log, 1.5 * 2^-68 without fma)
27 /* Top 12 bits of a double (sign and exponent bits). */
29 top12 (double x) in top12()
36 normalized in the subnormal range using the sign bit for the exponent. */
45 /* x = 2^k z; where z is in range [OFF,2*OFF) and exact. in log_inline()
46 The range is split into N subintervals. in log_inline()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/
H A DREADME.txt1 Compiler-RT
7 Compiler-RT is open source software. You may freely distribute it under the
70 di_int __negdi2 (di_int a); // -a
71 ti_int __negti2 (ti_int a); // -a
101 si_int __negvsi2(si_int a); // -a
102 di_int __negvdi2(di_int a); // -a
103 ti_int __negvti2(ti_int a); // -a
109 si_int __subvsi3(si_int a, si_int b); // a - b
110 di_int __subvdi3(di_int a, di_int b); // a - b
111 ti_int __subvti3(ti_int a, ti_int b); // a - b
[all …]
/freebsd/contrib/arm-optimized-routines/math/aarch64/
H A Dsincospi_4u.c2 * Double-precision scalar sincospi function.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
16 C2_hi = 4, C2_lo = C2 - C2_hi (~=1.16771278)
21 double poly[10];
24 .poly = { 0x1.921fb54442d184p1, -0x1.2aef39896f94bp0, 0x1.466bc6775ab16p1,
25 -0x1.32d2cce62dc33p-1, 0x1.507834891188ep-4, -0x1.e30750a28c88ep-8,
26 0x1.e8f48308acda4p-12, -0x1.6fc0032b3c29fp-16,
27 0x1.af86ae521260bp-21, -0x1.012a9870eeb7dp-25 },
30 /* Top 12 bits of a double (sign and exponent bits). */
32 abstop12 (double x) in abstop12()
[all …]
H A Dcospi_3u5.c2 * Double-precision scalar cospi function.
4 * Copyright (c) 2023-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
16 C2_hi = 4, C2_lo = C2 - C2_hi (~=1.16771278)
19 static const double poly[]
20 = { 0x1.921fb54442d184p1, -0x1.2aef39896f94bp0, 0x1.466bc6775ab16p1,
21 -0x1.32d2cce62dc33p-1, 0x1.507834891188ep-4, -0x1.e30750a28c88ep-8,
22 0x1.e8f48308acda4p-12, -0x1.6fc0032b3c29fp-16, 0x1.af86ae521260bp-21,
23 -0x1.012a9870eeb7dp-25 };
27 /* Approximation for scalar double-precision cospi(x).
[all …]
/freebsd/lib/msun/ld128/
H A Ds_expl.c1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2009-2013 Steven G. Kargl
43 static const volatile long double
45 tiny = 0x1p-10000L;
47 static const long double
48 twom10000 = 0x1p-10000L;
50 static const long double
51 /* log(2**16384 - 0.5) rounded towards zero: */
52 /* log(2**16384 - 0.5 + 1) rounded towards zero for expm1l() is the same: */
[all …]
H A De_lgammal_r.c15 * Converted to long double by Steven G. Kargl.
22 static const volatile double vzero = 0;
24 static const double
29 static const long double
32 * Domain y in [0x1p-119, 0.28], range ~[-1.4065e-36, 1.4065e-36]:
33 * |(lgamma(2 - y) + y / 2) / y - a(y)| < 2**-119.1
35 static const long double
36 a0 = 7.72156649015328606065120900824024296e-02L,
37 a1 = 3.22467033424113218236207583323018498e-01L,
38 a2 = 6.73523010531980951332460538330282217e-02L,
[all …]
/freebsd/contrib/llvm-project/llvm/tools/llvm-xray/
H A Dxray-color-helper.h1 //===-- xray-graph.h - XRay Function Call Graph Renderer --------*- C++ -*-===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
23 /// color in a gradient. This is used to color-code edges in XRay-Graph tools.
26 /// - Sequential schemes, which are used to represent information from some
27 /// minimum to some maximum. These take an input in the range [0,1]
28 /// - Diverging schemes, which are used to represent information representing
29 /// differenes, or a range that goes from negative to positive. These take
30 /// an input in the range [-1,1].
[all …]
H A Dxray-color-helper.cpp1 //===-- xray-graph.cpp: XRay Function Call Graph Renderer -----------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
13 #include "xray-color-helper.h"
44 // Sequential Maps extend the last colors given out of range inputs.
58 // representing differenes, or a range that goes from negative to positive.
59 // These take an input in the range [-1,1].
78 : MinIn(-1.0), MaxIn(1.0), ColorMap(DivergingCoeffs[static_cast<int>(S)]), in ColorHelper()
83 static std::tuple<double, double, double>
[all …]
/freebsd/lib/msun/man/
H A Dieee.333 .Nd IEEE standard 754 for floating-point arithmetic
35 The IEEE Standard 754 for Binary Floating-Point Arithmetic
36 defines representations of floating-point numbers and abstract
39 .Ss IEEE STANDARD 754 Floating-Point Arithmetic
43 .Bd -ragged -offset indent -compact
49 Zero is represented ambiguously as +0 or \-0.
50 .Bd -ragged -offset indent -compact
53 with like signs; but x\-x yields +0 for every
57 .Fn copysign x \(+-0 .
60 finite x = y then \*(If = 1/(x\-y) \(!= \-1/(y\-x) = \-\*(If.
[all …]
H A Dlgamma.353 .Ft double
54 .Fn lgamma "double x"
55 .Ft double
56 .Fn lgamma_r "double x" "int *signgamp"
61 .Ft "long double"
62 .Fn lgammal "long double x"
63 .Ft "long double"
64 .Fn lgammal_r "long double x" "int *signgamp"
65 .Ft double
66 .Fn gamma "double
[all...]
/freebsd/contrib/gdtoa/
H A DREADME1 This directory contains source for a library of binary -> decimal
2 and decimal -> binary conversion routines, for single-, double-,
3 and extended-precision IEEE binary floating-point arithmetic, and
4 other IEEE-like binary floating-point, including "double double",
7 T. J. Dekker, "A Floating-Point Technique for Extending the
8 Available Precision", Numer. Math. 18 (1971), pp. 224-242
12 "Inside Macintosh: PowerPC Numerics", Addison-Wesley, 1994
14 The conversion routines use double-precision floating-point arithmetic
18 David M. Gay, "Correctly Rounded Binary-Decimal and
19 Decimal-Binary Conversions", Numerical Analysis Manuscript
[all …]
/freebsd/contrib/arm-optimized-routines/math/aarch64/experimental/
H A Dexp_inline.h2 * Double-precision e^x function.
4 * Copyright (c) 2018-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
22 #define C2 __exp_data.poly[5 - EXP_POLY_ORDER]
23 #define C3 __exp_data.poly[6 - EXP_POLY_ORDER]
24 #define C4 __exp_data.poly[7 - EXP_POLY_ORDER]
25 #define C5 __exp_data.poly[8 - EXP_POLY_ORDER]
26 #define C6 __exp_data.poly[9 - EXP_POLY_ORDER]
32 a double. (int32_t)KI is the k used in the argument reduction and exponent
35 static inline double
[all …]
H A Dlog10_2u.c2 * Double-precision log10(x) function.
4 * Copyright (c) 2020-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
22 #define LO asuint64 (1.0 - 0x1p-4)
23 #define HI asuint64 (1.0 + 0x1.09p-4)
25 /* Top 16 bits of a double. */
27 top16 (double x) in top16()
34 - Polynomials are computed for log10(1+r) with r on same intervals as log.
35 - Lookup parameters are scaled (at runtime) to switch from base e to
36 base 10. Many errors above 1.59 ulp are observed across the whole range of
[all …]
H A Derfc_1u8.c2 * Double-precision erfc(x) function.
4 * Copyright (c) 2023-2024, Arm Limited.
5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
13 #define P20 0x1.5555555555555p-2 /* 1/3. */
14 #define P21 0x1.5555555555555p-1 /* 2/3. */
16 #define P40 0x1.999999999999ap-4 /* 1/10. */
17 #define P41 0x1.999999999999ap-2 /* 2/5. */
18 #define P42 0x1.11111111111111p-3 /* 2/15. */
20 #define P50 0x1.5555555555555p-3 /* 1/6. */
21 #define P51 0x1.c71c71c71c71cp-3 /* 2/9. */
[all …]
/freebsd/usr.bin/jot/
H A Djot.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
33 * jot - print sequential or random data
64 #define is_default(s) (*(s) == 0 || strcmp((s), "-") == 0)
67 static int prec = -1;
77 static int putdata(double, bool);
92 double begin = BEGIN_DEF; in main()
93 double divisor; in main()
94 double ender = ENDER_DEF; in main()
95 double s = STEP_DEF; in main()
[all …]
/freebsd/lib/libc/quad/
H A Dfixunsdfdi.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
38 #define ONE_FOURTH (1L << (LONG_BITS - 2))
43 * Convert double to (unsigned) quad.
44 * Not sure what to do with negative numbers---for now, anything out
45 * of range becomes UQUAD_MAX.
48 __fixunsdfdi(double x) in __fixunsdfdi()
50 double toppart; in __fixunsdfdi()
58 #else /* so we wire in 2^64-1 instead */ in __fixunsdfdi()
[all …]
H A Dfixunssfdi.c1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
38 #define ONE_FOURTH (1L << (LONG_BITS - 2))
43 * Convert float to (unsigned) quad. We do most of our work in double,
46 * Not sure what to do with negative numbers---for now, anything out
47 * of range becomes UQUAD_MAX.
54 double x, toppart; in __fixunssfdi()
62 #else /* so we wire in 2^64-1 instead */ in __fixunssfdi()
72 toppart = (x - ONE_HALF) / ONE; in __fixunssfdi()
[all …]
/freebsd/usr.bin/random/
H A Drandomize_fd.h41 int randomize_fd(int fd, int type, int unique, double denom);
44 * Generates a random number uniformly in the range [0.0, 1.0).
46 static inline double
50 static const uint64_t mask = denom - 1; in random_unit_float()
58 * The double mantissa only has 53 bits, so we uniformly mask off the in random_unit_float()
59 * high 11 bits and then floating-point divide by 2^53 to achieve a in random_unit_float()
63 * the possible range of the preceeding step. in random_unit_float()
67 return ((double)rand64 / denom); in random_unit_float()
75 random_uniform_denom(double denom) in random_uniform_denom()
/freebsd/lib/msun/src/
H A Ds_sincosl.c1 /*-
2 * Copyright (c) 2007, 2010-2013 Steven G. Kargl
43 #error "Unsupported long double format"
47 sincosl(long double x, long double *sn, long double *cs) in sincosl()
51 long double y[2]; in sincosl()
58 /* Optimize the case where x is already within range. */ in sincosl()
61 * If x = +-0 or x is a subnormal number, then sin(x) = x and in sincosl()
74 *sn = x - x; in sincosl()
75 *cs = x - x; in sincosl()
79 /* Range reduction. */ in sincosl()
[all …]

12345678910>>...39