| /freebsd/sys/dev/bnxt/bnxt_en/ |
| H A D | bnxt_ulp.c | 1 /*- 2 * Broadcom NetXtreme-C/E network driver. 57 struct bnxt_softc *bp = edev->softc; in bnxt_register_dev() 58 struct bnxt_ulp *ulp; in bnxt_register_dev() local 59 int rc = 0; in bnxt_register_dev() 62 return -EINVAL; in bnxt_register_dev() 64 mtx_lock(&bp->en_ops_lock); in bnxt_register_dev() 65 ulp = &edev->ulp_tbl[ulp_id]; in bnxt_register_dev() 66 if (rcu_access_pointer(ulp->ulp_ops)) { in bnxt_register_dev() 67 device_printf(bp->dev, "ulp id %d already registered\n", ulp_id); in bnxt_register_dev() [all …]
|
| /freebsd/usr.bin/mkuzip/ |
| H A D | mkuz_lzma.c | 2 * Copyright (c) 2004-2016 Maxim Sobolev <sobomax@FreeBSD.org> 53 struct mkuz_lzma *ulp; in mkuz_lzma_init() local 57 if (*comp_level < 0 || *comp_level > 9) in mkuz_lzma_init() 62 ulp = mkuz_safe_zmalloc(sizeof(struct mkuz_lzma)); in mkuz_lzma_init() 65 ulp->strm = (lzma_stream)LZMA_STREAM_INIT; in mkuz_lzma_init() 66 if (lzma_lzma_preset(&ulp->opt_lzma, *comp_level)) in mkuz_lzma_init() 69 ulp->filters[0].id = LZMA_FILTER_LZMA2; in mkuz_lzma_init() 70 ulp->filters[0].options = &ulp->opt_lzma; in mkuz_lzma_init() 71 ulp->filters[1].id = LZMA_VLI_UNKNOWN; in mkuz_lzma_init() 73 return (void *)ulp; in mkuz_lzma_init() [all …]
|
| /freebsd/lib/msun/src/ |
| H A D | e_sqrt.c | 27 * ------------------------------------------ 29 * ------------------------------------------ 38 * i 0 40 * s = 2*q , and y = 2 * ( y - q ). (1) 46 * -(i+1) 2 49 * -(i+1) 55 * -(i+1) 68 * -i -(i+1) 69 * s = s + 2 , y = y - s - 2 (5) 74 * it does not necessary to do a full (53-bit) comparison [all …]
|
| H A D | e_sqrtl.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 35 /* Return (x + ulp) for normal positive x. Assumes no overflow. */ 42 if (++u.bits.manl == 0) { in inc() 43 if (++u.bits.manh == 0) { in inc() 51 /* Return (x - ulp) for normal positive x. Assumes no underflow. */ 58 if (u.bits.manl-- == 0) { in dec() 59 if (u.bits.manh-- == LDBL_NBIT) { in dec() 60 u.bits.exp--; in dec() 86 /* If x = -Inf, then sqrt(x) = NaN. */ in sqrtl() [all …]
|
| H A D | s_nextafterf.c | 1 /* s_nextafterf.c -- float version of s_nextafter.c. 27 ix = hx&0x7fffffff; /* |x| */ in nextafterf() 28 iy = hy&0x7fffffff; /* |y| */ in nextafterf() 30 if((ix>0x7f800000) || /* x is nan */ in nextafterf() 31 (iy>0x7f800000)) /* y is nan */ in nextafterf() 34 if(ix==0) { /* x == 0 */ in nextafterf() 35 SET_FLOAT_WORD(x,(hy&0x80000000)|1);/* return +-minsubnormal */ in nextafterf() 39 if(hx>=0) { /* x > 0 */ in nextafterf() 40 if(hx>hy) { /* x > y, x -= ulp */ in nextafterf() 41 hx -= 1; in nextafterf() [all …]
|
| H A D | s_nextafter.c | 14 * return the next machine floating-point number of x in the 33 ix = hx&0x7fffffff; /* |x| */ in nextafter() 34 iy = hy&0x7fffffff; /* |y| */ in nextafter() 36 if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || /* x is nan */ in nextafter() 37 ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) /* y is nan */ in nextafter() 40 if((ix|lx)==0) { /* x == 0 */ in nextafter() 41 INSERT_WORDS(x,hy&0x80000000,1); /* return +-minsubnormal */ in nextafter() 45 if(hx>=0) { /* x > 0 */ in nextafter() 46 if(hx>hy||((hx==hy)&&(lx>ly))) { /* x > y, x -= ulp */ in nextafter() 47 if(lx==0) hx -= 1; in nextafter() [all …]
|
| /freebsd/contrib/arm-optimized-routines/math/ |
| H A D | Dir.mk | 1 # Makefile fragment - requires GNU make 3 # Copyright (c) 2019-2024, Arm Limited. 4 # SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 13 $(warning WARNING: Double-precision ULP tests will not be usable without MPFR) 16 $(error Can only generate special GLIBC symbols on Linux - please disable USE_GLIBC_ABI) 29 math-src-dir := $(srcdir)/math 30 math-build-dir := build/math 32 math-lib-srcs := $(wildcard $(math-src-dir)/*.[cS]) 33 math-lib-srcs += $(wildcard $(math-src-dir)/$(ARCH)/*.[cS]) 36 math-lib-srcs += $(wildcard $(math-src-dir)/$(ARCH)/*/*.[cS]) [all …]
|
| 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 22 #define OFF 0x3fe6000000000000 44 # define LO asuint64 (1.0 - 0x1p-5) in log() 45 # define HI asuint64 (1.0 + 0x1.1p-5) in log() 47 # define LO asuint64 (1.0 - 0x1p-4) in log() 48 # define HI asuint64 (1.0 + 0x1.09p-4) in log() 50 if (unlikely (ix - LO < HI - LO)) in log() 55 return 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 22 #define OFF 0x3fe6000000000000 44 # define LO asuint64 (1.0 - 0x1.5b51p-5) in log2() 45 # define HI asuint64 (1.0 + 0x1.6ab2p-5) in log2() 47 if (unlikely (ix - LO < HI - LO)) in log2() 52 return 0; in log2() 53 r = x - 1.0; in log2() 56 lo = r * InvLn2lo + fma (r, InvLn2hi, -hi); in log2() [all …]
|
| H A D | exp2.c | 2 * Double-precision 2^x function. 4 * Copyright (c) 2018-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 18 #define C1 __exp_data.exp2_poly[0] 37 if ((ki & 0x80000000) == 0) in specialcase() 39 /* k > 0, the exponent of scale might have overflowed by 1. */ in specialcase() 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() [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) 17 ulperr_exp: 0.509 ULP (ULP error of exp, 0.511 ULP without fma) 25 #define OFF 0x3fe6955500000000 48 tmp = ix - OFF; in log_inline() 49 i = (tmp >> (52 - POW_LOG_TABLE_BITS)) % N; in log_inline() 51 iz = ix - (tmp & 0xfffULL << 52); in log_inline() [all …]
|
| H A D | exp.c | 2 * 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] 39 if ((ki & 0x80000000) == 0) in specialcase() 41 /* k > 0, the exponent of scale might have overflowed by <= 460. */ in specialcase() [all …]
|
| H A D | exp10.c | 2 * 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) 14 #define OFlowBound 0x1.34413509f79ffp8 /* log10(DBL_MAX). */ 15 #define UFlowBound -0x1.5ep+8 /* -350. */ 16 #define SmallTop 0x3c6 /* top12(0x1p-57). */ 17 #define BigTop 0x407 /* top12(0x1p8). */ 18 #define Thresh 0x41 /* BigTop - SmallTop. */ 27 if ((ki & 0x80000000) == 0) in special_case() [all …]
|
| /freebsd/contrib/arm-optimized-routines/math/test/ |
| H A D | runulp.sh | 3 # ULP error check script. 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 12 cd "${0%/*}" 16 flags="${ULPFLAGS:--q}" 19 FAIL=0 20 PASS=0 27 IFS=',' read -ra LO <<< "$1"; shift [all …]
|
| H A D | ulp.h | 2 * Generic functions for ULP error estimation. 4 * Copyright (c) 2019-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 21 mpfr_exp_t e = mpfr_get_exp (x) - RT(prec); in RT() 23 e = RT(emin) - 1; in RT() 24 if (e > RT(emax) - RT(prec)) in RT() 25 e = RT(emax) - RT(prec); in RT() 29 return RT(emin) - 1; in RT() 31 return RT(emax) - RT(prec); in RT() 33 return 0; in RT() [all …]
|
| /freebsd/sys/netpfil/ipfw/ |
| H A D | ip_fw2.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa 144 VNET_DEFINE(unsigned int, fw_tables_sets) = 0; /* Don't use set-aware tables */ 149 VNET_DEFINE(int, skipto_cache) = 0; 158 * Each rule belongs to one of 32 different sets (0..31). 178 VNET_DEFINE(int, ipfw_vnet_ready) = 0; 180 VNET_DEFINE(int, ipfw_nat_ready) = 0; 196 SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 199 CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_SECURE3, &VNET_NAME(fw_one_pass), 0, [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/input/ |
| H A D | iqs626a.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Jeff LaBundy <jeff@labundy.com> 13 The Azoteq IQS626A is a 14-channel capacitive touch controller that features 14 additional Hall-effect and inductive sensing capabilities. 19 - $ref: touchscreen/touchscreen.yaml# 31 "#address-cells": 34 "#size-cells": 35 const: 0 [all …]
|
| /freebsd/sys/dev/ocs_fc/ |
| H A D | ocs_hw_queues.c | 1 /*- 41 #define HW_QTOP_DEBUG 0 52 * @return returns 0 for success, an error code value for failure. 59 uint32_t rqset_len = 0, rqset_ulp = 0, rqset_count = 0; in ocs_hw_init_queues() 60 uint8_t rqset_filter_mask = 0; in ocs_hw_init_queues() 61 hw_eq_t *eqs[hw->config.n_rq]; in ocs_hw_init_queues() 62 hw_cq_t *cqs[hw->config.n_rq]; in ocs_hw_init_queues() 63 hw_rq_t *rqs[hw->config.n_rq]; in ocs_hw_init_queues() 74 mrq.num_pairs = 0; in ocs_hw_init_queues() 76 default_lengths[QTOP_CQ] = hw->num_qentries[SLI_QTYPE_CQ]; in ocs_hw_init_queues() [all …]
|
| /freebsd/sys/dev/e1000/ |
| H A D | e1000_ich8lan.h | 2 SPDX-License-Identifier: BSD-3-Clause 4 Copyright (c) 2001-2020, Intel Corporation 38 #define ICH_FLASH_GFPREG 0x0000 39 #define ICH_FLASH_HSFSTS 0x0004 40 #define ICH_FLASH_HSFCTL 0x0006 41 #define ICH_FLASH_FADDR 0x0008 42 #define ICH_FLASH_FDATA0 0x0010 48 #define ICH_FLASH_LINEAR_ADDR_MASK 0x00FFFFFF 51 #define ICH_CYCLE_READ 0 55 #define FLASH_GFPREG_BASE_MASK 0x1FFF [all …]
|
| /freebsd/lib/msun/man/ |
| H A D | ieee.3 | 33 .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 …]
|
| /freebsd/lib/msun/bsdsrc/ |
| H A D | b_tgamma.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 41 * The algorithm remains, but the code has been re-arranged to facilitate 65 * xleft > x > iota: smaller_gam(x) where iota = 1e-17. 66 * iota > x > -itoa: Handle x near 0. 67 * -iota > x : neg_gam 70 * -Inf: return NaN and raise invalid; 72 * other x ~< 177.79: return +-0 and raise underflow; 73 * +-0: return +-Inf and raise divide-by-zero; 79 * x > 0: error provably < 0.9ulp. [all …]
|
| /freebsd/contrib/arm-optimized-routines/math/aarch64/experimental/ |
| H A D | exp_inline.h | 2 * 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] 40 if ((ki & 0x80000000) == 0) in exp_inline_special_case() 42 /* k > 0, the exponent of scale might have overflowed by <= 460. */ in exp_inline_special_case() [all …]
|
| H A D | acoshf_2u8.c | 2 * Single-precision acosh(x) function. 4 * Copyright (c) 2022-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 12 #define Ln2 (0x1.62e4p-1f) 13 #define MinusZero 0x80000000 14 #define SquareLim 0x5f800000 /* asuint(0x1p64). */ 15 #define Two 0x40000000 19 x >= 2^64: We cannot square x without overflow. For huge x, sqrt(x*x - 1) is 21 ln(2). The greatest error in the region is 0.94 ULP: 22 acoshf(0x1.15f706p+92) got 0x1.022e14p+6 want 0x1.022e16p+6. [all …]
|
| H A D | acosh_3u.c | 2 * Double-precision acosh(x) function. 4 * Copyright (c) 2022-2024, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 13 #define Ln2 (0x1.62e42fefa39efp-1) 14 #define MinusZero (0x8000000000000000) 15 #define SquareLim (0x5fe0000000000000) /* asuint64(0x1.0p511). */ 16 #define Two (0x4000000000000000) /* asuint64(2.0). */ 20 acosh(x) = ln(x + sqrt(x * x - 1)). 22 x >= 2^511: We cannot square x without overflow. For huge x, sqrt(x*x - 1) 24 ln(2). The greatest observed error in this region is 0.98 ULP: [all …]
|
| /freebsd/contrib/gdtoa/ |
| H A D | strtod.c | 5 Copyright (C) 1998-2001 by Lucent Technologies 49 static CONST double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, 50 9007199254740992.*9007199254740992.e-256 75 rv = ulp(x); 76 if (!scale || (i = 2*P + 1 - ((word0(x) & Exp_mask) >> Exp_shift)) <= 0) 77 return rv; /* Is there an example where i <= 0 ? */ 79 word1(&u) = 0; 111 char *decimalpoint = localeconv_l(loc)->decimal_point; 118 s0 = localeconv_l(loc)->decimal_point; 138 case FE_TOWARDZERO: Rounding = 0; break; [all …]
|