/freebsd/crypto/openssl/crypto/modes/ |
H A D | gcm128.c | 2 * Copyright 2010-2021 The OpenSSL Project Authors. All Rights Reserved. 30 #define PACK(s) ((size_t)(s)<<(sizeof(size_t)*8-16)) 33 u64 T = U64(0xe100000000000000) & (0-(V.lo&1)); \ 34 V.lo = (V.hi<<63)|(V.lo>>1); \ 35 V.hi = (V.hi>>1 )^T; \ 38 u32 T = 0xe1000000U & (0-(u32)(V.lo&1)); \ 39 V.lo = (V.hi<<63)|(V.lo>>1); \ 40 V.hi = (V.hi>>1 )^((u64)T<<32); \ 44 /*- 47 * TABLE_BITS>1 are lookup-table-driven implementations referred to as [all …]
|
/freebsd/lib/msun/src/ |
H A D | s_sinl.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 47 union IEEEl2bits z; in sinl() local 50 long double hi, lo; in sinl() local 52 z.e = x; in sinl() 53 s = z.bits.sign; in sinl() 54 z.bits.sign = 0; in sinl() 56 /* If x = +-0 or x is a subnormal number, then sin(x) = x */ in sinl() 57 if (z.bits.exp == 0) in sinl() 61 if (z.bits.exp == 32767) in sinl() [all …]
|
H A D | s_tanl.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 53 union IEEEl2bits z; in tanl() local 56 long double hi, lo; in tanl() local 58 z.e = x; in tanl() 59 s = z.bits.sign; in tanl() 60 z.bits.sign = 0; in tanl() 62 /* If x = +-0 or x is subnormal, then tan(x) = x. */ in tanl() 63 if (z.bits.exp == 0) in tanl() 67 if (z.bits.exp == 32767) in tanl() [all …]
|
H A D | s_cosl.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 30 * Limited testing on pseudorandom numbers drawn within [-2e8:4e8] shows 45 pio4u = LD80C(0xc90fdaa22168c235, -00001, 7.85398163397448309628e-01L); 49 long double pio4 = 7.85398163397448309615660845819875721e-1L; 57 union IEEEl2bits z; in cosl() local 60 long double hi, lo; in cosl() local 62 z.e = x; in cosl() 63 z.bits.sign = 0; in cosl() 65 /* If x = +-0 or x is a subnormal number, then cos(x) = 1 */ in cosl() [all …]
|
/freebsd/crypto/openssl/crypto/modes/asm/ |
H A D | ghash-ia64.pl | 2 # Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved. 19 # The module implements "4-bit" GCM GHASH function and underlying 20 # single multiplication operation in GF(2^128). "4-bit" means that it 21 # uses 256 bytes per-key table [+128 bytes shared table]. Streamed 24 # code. To anchor to something else sha1-ia64.pl module processes one 35 # But occasionally you prove yourself wrong:-) I figured out a way to 46 for (@ARGV) { $ADDP="add" if (/[\+DD|\-mlp]64/); } 48 for (@ARGV) { $big_endian=1 if (/\-DB_ENDIAN/); 49 $big_endian=0 if (/\-DL_ENDIAN/); } 58 # in scalable manner;-) Naturally assuming data in L1 cache... [all …]
|
/freebsd/contrib/arm-optimized-routines/math/ |
H A D | log.c | 2 * Double-precision log(x) function. 4 * Copyright (c) 2018-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 35 double_t w, z, r, r2, r3, y, invc, logc, kd, hi, lo; in log() local 44 # define LO asuint64 (1.0 - 0x1p-5) in log() 45 # define HI asuint64 (1.0 + 0x1.1p-5) in log() macro 47 # define LO asuint64 (1.0 - 0x1p-4) in log() 48 # define HI asuint64 (1.0 + 0x1.09p-4) in log() macro 50 if (unlikely (ix - LO < HI - LO)) in log() 56 r = x - 1.0; in log() [all …]
|
H A D | log2.c | 2 * Double-precision log2(x) function. 4 * Copyright (c) 2018-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 35 double_t z, r, r2, r4, y, invc, logc, kd, hi, lo, t1, t2, t3, p; in log2() local 44 # define LO asuint64 (1.0 - 0x1.5b51p-5) in log2() 45 # define HI asuint64 (1.0 + 0x1.6ab2p-5) in log2() macro 47 if (unlikely (ix - LO < HI - LO)) in log2() 53 r = x - 1.0; in log2() 55 hi = r * InvLn2hi; in log2() 56 lo = r * InvLn2lo + fma (r, InvLn2hi, -hi); in log2() [all …]
|
H A D | pow.c | 2 * 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) 41 double_t z, r, y, invc, logc, logctail, kd, hi, t1, t2, lo, lo1, lo2, p; in log_inline() local 45 /* x = 2^k z; where z is in range [OFF,2*OFF) and exact. in log_inline() 47 The ith subinterval contains z and c is near its center. */ in log_inline() 48 tmp = ix - OFF; in log_inline() 49 i = (tmp >> (52 - POW_LOG_TABLE_BITS)) % N; in log_inline() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/ppc/ |
H A D | multc3.c | 3 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 10 (x).s.hi = crt_copysign(crt_isinf((x).s.hi) ? 1.0 : 0.0, (x).s.hi); \ 16 if (crt_isnan((x).s.hi)) { \ 17 (x).s.hi = crt_copysign(0.0, (x).s.hi); \ 32 if (crt_isnan(real.s.hi) && crt_isnan(imag.s.hi)) { in __multc3() 40 if (crt_isinf(aDD.s.hi) || crt_isinf(bDD.s.hi)) { in __multc3() 48 if (crt_isinf(cDD.s.hi) || crt_isinf(dDD.s.hi)) { in __multc3() 62 if (crt_isinf(acDD.s.hi) || crt_isinf(bdDD.s.hi) || in __multc3() 63 crt_isinf(adDD.s.hi) || crt_isinf(bcDD.s.hi)) { in __multc3() 73 real.s.hi = CRT_INFINITY * (aDD.s.hi * cDD.s.hi - bDD.s.hi * dDD.s.hi); in __multc3() [all …]
|
H A D | divtc3.c | 3 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // Use DOUBLE_PRECISION because the soft-fp method we use is logb (on the upper 9 // 128-bit floats. 19 (x).s.hi = crt_copysign(crt_isinf((x).s.hi) ? 1.0 : 0.0, (x).s.hi); \ 30 __compiler_rt_logb(__compiler_rt_fmax(crt_fabs(cDD.s.hi), in __divtc3() 31 crt_fabs(dDD.s.hi))); in __divtc3() 36 cDD.s.hi = __compiler_rt_scalbn(cDD.s.hi, -ilogbw); in __divtc3() 37 cDD.s.lo = __compiler_rt_scalbn(cDD.s.lo, -ilogbw); in __divtc3() 38 dDD.s.hi = __compiler_rt_scalbn(dDD.s.hi, -ilogbw); in __divtc3() 39 dDD.s.lo = __compiler_rt_scalbn(dDD.s.lo, -ilogbw); in __divtc3() [all …]
|
/freebsd/sys/contrib/device-tree/Bindings/iio/accel/ |
H A D | lis302.txt | 8 - compatible: should be set to "st,lis3lv02d-spi" 9 - reg: the chipselect index 10 - spi-max-frequency: maximal bus speed, should be set to 1000000 unless 12 - interrupts: the interrupt generated by the device 15 - compatible: should be set to "st,lis3lv02d" 16 - reg: i2c slave address 17 - Vdd-supply: The input supply for Vdd 18 - Vdd_IO-supply: The input supply for Vdd_IO 23 - st,click-single-{x,y,z}: if present, tells the device to issue an 25 x/y/z axis. [all …]
|
/freebsd/contrib/arm-optimized-routines/math/test/ |
H A D | runulp.sh | 5 # Copyright (c) 2019-2024, Arm Limited. 6 # SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 8 #set -x 9 set -eu 14 rmodes='n u d z' 16 flags="${ULPFLAGS:--q}" 25 # Second and third argument: lo and hi bounds 27 IFS=',' read -ra LO <<< "$1"; shift 28 IFS=',' read -ra HI <<< "$1"; shift 29 ITV="${LO[0]} ${HI[0]}" [all …]
|
H A D | mathbench.c | 4 * Copyright (c) 2018-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 17 # error "SVE not supported - please disable WANT_SVE_TESTS" 92 double hi; member 107 // clang-format off 108 #define D(func, lo, hi) {#func, 'd', 0, lo, hi, {.d = func}}, argument 109 #define F(func, lo, hi) {#func, 'f', 0, lo, hi, {.f = func}}, argument 110 #define VND(func, lo, hi) {#func, 'd', 'n', lo, hi, {.vnd = func}}, argument 111 #define VNF(func, lo, hi) {#func, 'f', 'n', lo, hi, {.vnf = func}}, argument 112 #define SVD(func, lo, hi) {#func, 'd', 's', lo, hi, {.svd = func}}, argument [all …]
|
/freebsd/contrib/arm-optimized-routines/math/aarch64/experimental/ |
H A D | log10_2u.c | 2 * 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) macro 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 38 log10(0x1.dc8710333a29bp-1) got -0x1.fee26884905a6p-6 39 want -0x1.fee26884905a8p-6. */ 44 double_t w, z, r, r2, r3, y, invc, logc, kd, hi, lo; in log10() local [all …]
|
/freebsd/contrib/arm-optimized-routines/math/aarch64/sve/ |
H A D | log10.c | 2 * Double-precision SVE log10(x) function. 4 * Copyright (c) 2022-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 14 #define Thres 0x7fe0000000000000 /* Max - Min. */ 25 .c0 = -0x1.bcb7b1526e506p-3, 26 .c1 = 0x1.287a7636be1d1p-3, 27 .c2 = -0x1.bcb7b158af938p-4, 28 .c3 = 0x1.63c78734e6d07p-4, 29 .c4 = -0x1.287461742fee4p-4, 30 .invln10 = 0x1.bcb7b1526e50ep-2, [all …]
|
H A D | log.c | 2 * Double-precision SVE log(x) function. 4 * Copyright (c) 2020-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 15 #define Thresh (0x7fe0000000000000) /* Max - Min. */ 24 .c0 = -0x1.ffffffffffff7p-2, 25 .c1 = 0x1.55555555170d4p-2, 26 .c2 = -0x1.0000000399c27p-2, 27 .c3 = 0x1.999b2e90e94cap-3, 28 .c4 = -0x1.554e550bd501ep-3, 29 .ln2 = 0x1.62e42fefa39efp-1, [all …]
|
/freebsd/lib/msun/ld80/ |
H A D | b_expl.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 42 p0u = LD80C(0xaaaaaaaaaaaaaaab, -3, 1.66666666666666666671e-01L), 43 p1u = LD80C(0xb60b60b60b60b59a, -9, -2.77777777777777775377e-03L), 44 p2u = LD80C(0x8ab355e008a3cfce, -14, 6.61375661375629297465e-05L), 45 p3u = LD80C(0xddebbc994b0c1376, -20, -1.65343915327882529784e-06L), 46 p4u = LD80C(0xb354784cb4ef4c41, -25, 4.17535101591534118469e-08L), 47 p5u = LD80C(0x913e8a718382ce75, -30, -1.05679137034774806475e-09L), 48 p6u = LD80C(0xe8f0042aa134502e, -36, 2.64819349895429516863e-11L); 59 * lntiny = (LDBL_MIN_EXP - 64 - 10) * log(2.) [all …]
|
H A D | k_expl.h | 1 /* from: FreeBSD: head/lib/msun/ld80/s_expl.c 251343 2013-06-03 19:51:32Z kargl */ 3 /*- 4 * SPDX-License-Identifier: BSD-2-Clause 6 * Copyright (c) 2009-2013 Steven G. Kargl 36 * See ../src/e_exp.c and ../src/k_exp.h for precision-independent comments 42 #define BIAS (LDBL_MAX_EXP - 1) 46 * ln2/INTERVALS = L1+L2 (hi+lo decomposition for multiplication). L1 must 47 * have at least 22 (= log2(|LDBL_MIN_EXP-extras|) + log2(INTERVALS)) lowest 50 INV_L = 1.8466496523378731e+2, /* 0x171547652b82fe.0p-45 */ 51 L1 = 5.4152123484527692e-3, /* 0x162e42ff000000.0p-60 */ [all …]
|
H A D | s_expl.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2009-2013 Steven G. Kargl 32 * Compute the exponential of x for Intel 80-bit format. This is based on: 34 * PTP Tang, "Table-driven implementation of the exponential function 35 * in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 15, 36 * 144-157 (1989). 55 tiny = 0x1p-10000L; 58 twom10000 = 0x1p-10000L; 61 /* log(2**16384 - 0.5) rounded towards zero: */ [all …]
|
/freebsd/contrib/arm-optimized-routines/math/aarch64/advsimd/ |
H A D | log10.c | 2 * Double-precision vector log10(x) function. 4 * Copyright (c) 2022-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 22 .c0 = V2 (-0x1.bcb7b1526e506p-3), 23 .c1 = 0x1.287a7636be1d1p-3, 24 .c2 = V2 (-0x1.bcb7b158af938p-4), 25 .c3 = 0x1.63c78734e6d07p-4, 26 .c4 = V2 (-0x1.287461742fee4p-4), 27 .invln10 = 0x1.bcb7b1526e50ep-2, 28 .log10_2 = 0x1.34413509f79ffp-2, [all …]
|
H A D | log.c | 2 * Double-precision vector log(x) function. 4 * Copyright (c) 2019-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 19 /* Rel error: 0x1.6272e588p-56 in [ -0x1.fc1p-9 0x1.009p-8 ]. */ 20 .c0 = V2 (-0x1.ffffffffffff7p-2), 21 .c1 = 0x1.55555555170d4p-2, 22 .c2 = V2 (-0x1.0000000399c27p-2), 23 .c3 = 0x1.999b2e90e94cap-3, 24 .c4 = -0x1.554e550bd501ep-3, 25 .ln2 = 0x1.62e42fefa39efp-1, [all …]
|
H A D | v_log_inline.h | 2 * Double-precision vector log(x) function - inline version 4 * Copyright (c) 2019-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 18 V2 (-0x1.ffffffffcbad3p-2), V2 (0x1.555555578ed68p-2), \ 19 V2 (-0x1.0000d3a1e7055p-2), V2 (0x1.999392d02a63ep-3) \ 24 V2 (-0x1.ffffffffffff7p-2), V2 (0x1.55555555170d4p-2), \ 25 V2 (-0x1.0000000399c27p-2), V2 (0x1.999b2e90e94cap-3), \ 26 V2 (-0x1.554e550bd501ep-3) \ 41 .poly = POLY, .ln2 = V2 (0x1.62e42fefa39efp-1), \ 45 #define A(i) d->poly[i] [all …]
|
/freebsd/contrib/bearssl/src/int/ |
H A D | i31_muladd.c | 29 br_i31_muladd_small(uint32_t *x, uint32_t z, const uint32_t *m) in br_i31_muladd_small() argument 34 uint32_t a0, a1, b0, hi, g, q, tb; in br_i31_muladd_small() local 49 hi = x[1] >> 1; in br_i31_muladd_small() 50 lo = (x[1] << 31) | z; in br_i31_muladd_small() 51 x[1] = br_rem(hi, lo, m[1]); in br_i31_muladd_small() 58 * Principle: we estimate the quotient (x*2^31+z)/m by in br_i31_muladd_small() 81 * u-2 <= q <= u in br_i31_muladd_small() 83 hi = x[mlen]; in br_i31_muladd_small() 86 memmove(x + 2, x + 1, (mlen - 1) * sizeof *x); in br_i31_muladd_small() 87 x[1] = z; in br_i31_muladd_small() [all …]
|
H A D | i15_muladd.c | 28 * Constant-time division. The divisor must not be larger than 16 bits, 39 for (i = 16; i >= 0; i --) { in divrem16() 44 x -= (-ctl) & d; in divrem16() 55 br_i15_muladd_small(uint16_t *x, uint16_t z, const uint16_t *m) in br_i15_muladd_small() argument 58 * Constant-time: we accept to leak the exact bit length of the in br_i15_muladd_small() 63 uint32_t hi, a0, a, b, q; in br_i15_muladd_small() local 76 divrem16(((uint32_t)x[1] << 15) | z, m[1], &rem); in br_i15_muladd_small() 84 * Principle: we estimate the quotient (x*2^15+z)/m by in br_i15_muladd_small() 107 * u-2 <= q <= u in br_i15_muladd_small() 109 hi = x[mlen]; in br_i15_muladd_small() [all …]
|
/freebsd/lib/msun/bsdsrc/ |
H A D | b_exp.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 47 * r will be represented as r := z+c for better accuracy. 51 * exp(r) = 1 + r + r*R1/(2-R1), 53 * R1 = x - x^2*(p1+x^2*(p2+x^2*(p3+x^2*(p4+p5*x^2)))). 59 * exp(-INF)= 0; 68 p1 = 1.6666666666666660e-01, /* 0x3fc55555, 0x55555553 */ 69 p2 = -2.7777777777564776e-03, /* 0xbf66c16c, 0x16c0ac3c */ 70 p3 = 6.6137564717940088e-05, /* 0x3f11566a, 0xb5c2ba0d */ 71 p4 = -1.6534060280704225e-06, /* 0xbebbbd53, 0x273e8fb7 */ [all …]
|