/openbmc/linux/arch/parisc/math-emu/ |
H A D | cnv_float.h | 46 #define Sgl_isinexact_to_fix(sgl_value,exponent) \ argument 47 ((exponent < (SGL_P - 1)) ? \ 48 (Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) : FALSE) 73 #define Sgl_isone_roundbit(sgl_value,exponent) \ argument 74 ((Sall(sgl_value) << (SGL_EXP_LENGTH + 1 + exponent)) >> 31) 76 #define Sgl_isone_stickybit(sgl_value,exponent) \ argument 77 (exponent < (SGL_P - 2) ? \ 78 Sall(sgl_value) << (SGL_EXP_LENGTH + 2 + exponent) : FALSE) 178 #define Dbl_isinexact_to_fix(dbl_valueA,dbl_valueB,exponent) \ argument 179 (exponent < (DBL_P-33) ? \ [all …]
|
H A D | sgl_float.h | 182 #define Sgl_setwrapped_exponent(sgl_value,exponent,op) \ argument 183 Deposit_sexponent(sgl_value,(exponent op SGL_WRAP)) 249 #define Sgl_normalize(sgl_opnd,exponent) \ argument 252 exponent -= 8; \ 256 exponent -= 4; \ 260 exponent -= 1; \ 289 #define Sgl_denormalize(opnd,exponent,guard,sticky,inexact) \ argument 291 if (exponent >= (1 - SGL_P)) { \ 292 guard = (Sall(opnd) >> -exponent) & 1; \ 293 if (exponent < 0) sticky |= Sall(opnd) << (32+exponent); \ [all …]
|
H A D | denormal.c | 47 int sign, exponent; in sgl_denormalize() local 52 exponent = Sgl_exponent(opnd) - SGL_WRAP; in sgl_denormalize() 54 Sgl_denormalize(opnd,exponent,guardbit,stickybit,inexact); in sgl_denormalize() 88 int sign, exponent; in dbl_denormalize() local 94 exponent = Dbl_exponent(opndp1) - DBL_WRAP; in dbl_denormalize() 96 Dbl_denormalize(opndp1,opndp2,exponent,guardbit,stickybit,inexact); in dbl_denormalize()
|
/openbmc/linux/arch/x86/math-emu/ |
H A D | poly_atan.c | 56 int exponent; in poly_atan() local 64 exponent = exponent(st0_ptr); in poly_atan() 68 exponent = exponent16(st0_ptr); in poly_atan() 71 exponent -= exponent(st1_ptr); in poly_atan() 75 exponent -= exponent16(st1_ptr); in poly_atan() 78 if ((exponent < 0) || ((exponent == 0) && in poly_atan() 88 exponent = -exponent; in poly_atan() 94 exponent += norm_Xsig(&argSignif); in poly_atan() 96 if ((exponent >= -1) in poly_atan() 97 || ((exponent == -2) && (argSignif.msw > 0xd413ccd0))) { in poly_atan() [all …]
|
H A D | poly_sin.c | 60 int exponent, echange; in poly_sine() local 66 exponent = exponent(st0_ptr); in poly_sine() 72 if ((exponent < -1) in poly_sine() 73 || ((exponent == -1) && (st0_ptr->sigh <= 0xe21240aa))) { in poly_sine() 80 shr_Xsig(&argSqrd, 2 * (-1 - exponent)); in poly_sine() 102 exponent = 3 * exponent; in poly_sine() 105 shr_Xsig(&accumulator, exponent(st0_ptr) - exponent); in poly_sine() 112 setexponentpos(&result, exponent(st0_ptr) + echange); in poly_sine() 119 if (exponent == 0) { in poly_sine() 190 if ((exponent(&result) >= 0) in poly_sine() [all …]
|
H A D | poly_l2.c | 29 long int exponent, expon, expon_expon; in poly_l2() local 35 exponent = exponent16(st0_ptr); in poly_l2() 42 exponent++; in poly_l2() 60 if (exponent < 0) { in poly_l2() 62 exponent = -exponent; in poly_l2() 65 expon_accum.msw = exponent; in poly_l2() 67 if (exponent) { in poly_l2() 110 long int exponent; in poly_l2p1() local 114 log2_kernel(st0_ptr, sign0, &accumulator, &exponent); in poly_l2p1() 120 exponent += round_Xsig(&accumulator); in poly_l2p1() [all …]
|
H A D | poly_2xm1.c | 55 long int exponent, shift; in poly_2xm1() local 60 exponent = exponent16(arg); in poly_2xm1() 63 if (exponent >= 0) { /* Don't want a |number| >= 1.0 */ in poly_2xm1() 73 if (exponent == -1) { in poly_2xm1() 76 exponent -= 2; in poly_2xm1() 79 } else if (exponent == -2) { in poly_2xm1() 82 exponent--; in poly_2xm1() 88 if (exponent < -2) { in poly_2xm1() 90 if (FPU_shrx(&Xll, -2 - exponent) >= 0x80000000U) in poly_2xm1() 100 add_two_Xsig(&accumulator, &argSignif, &exponent); in poly_2xm1() [all …]
|
H A D | poly_tan.c | 53 long int exponent; in poly_tan() local 59 exponent = exponent(st0_ptr); in poly_tan() 69 if ((exponent == 0) in poly_tan() 70 || ((exponent == -1) && (st0_ptr->sigh > 0xc90fdaa2))) { in poly_tan() 76 if (exponent == 0) { in poly_tan() 94 exponent = -1 + norm_Xsig(&argSignif); in poly_tan() 100 if (exponent < -1) { in poly_tan() 102 if (FPU_shrx(&XSIG_LL(accum), -1 - exponent) >= in poly_tan() 138 shr_Xsig(&accumulatore, -2 * (1 + exponent) + 1); in poly_tan() 158 shr_Xsig(&accum, -2 * (exponent + 1)); in poly_tan() [all …]
|
H A D | fpu_trig.c | 42 if (exponent(st0_ptr) >= 63) { in trig_arg() 61 q, exponent(st0_ptr) - exponent(&CONST_PI2)); in trig_arg() 62 setexponent16(&tmp, exponent(&CONST_PI2)); in trig_arg() 77 if ((exponent(st0_ptr) <= exponent(&CONST_PI2extra) + 64) in trig_arg() 88 exponent(&CONST_PI2extra) + in trig_arg() 89 exponent(&tmp)); in trig_arg() 110 && (exponent(st0_ptr) <= exponent(&CONST_PI2extra) + 64)) in trig_arg() 121 exponent(&CONST_PI2extra) + in trig_arg() 122 exponent(&tmp)); in trig_arg() 126 if ((exponent(st0_ptr) == exponent(&CONST_PI2)) && in trig_arg() [all …]
|
/openbmc/linux/arch/arm/vfp/ |
H A D | vfpsingle.c | 43 .exponent = 255, 51 str, s->sign != 0, s->exponent, s->significand); in vfp_single_dump() 61 vs->exponent -= bits - 1; in vfp_single_normalise_denormal() 76 int exponent, shift, underflow; in __vfp_single_normaliseround() local 83 if (vs->exponent == 255 && (vs->significand == 0 || exceptions)) in __vfp_single_normaliseround() 90 vs->exponent = 0; in __vfp_single_normaliseround() 94 exponent = vs->exponent; in __vfp_single_normaliseround() 104 exponent -= shift; in __vfp_single_normaliseround() 109 vs->exponent = exponent; in __vfp_single_normaliseround() 117 underflow = exponent < 0; in __vfp_single_normaliseround() [all …]
|
H A D | vfpdouble.c | 43 .exponent = 2047, 51 str, d->sign != 0, d->exponent, d->significand); in vfp_double_dump() 63 vd->exponent -= bits - 1; in vfp_double_normalise_denormal() 73 int exponent, shift, underflow; in vfp_double_normaliseround() local 81 if (vd->exponent == 2047 && (vd->significand == 0 || exceptions)) in vfp_double_normaliseround() 88 vd->exponent = 0; in vfp_double_normaliseround() 92 exponent = vd->exponent; in vfp_double_normaliseround() 99 exponent -= shift; in vfp_double_normaliseround() 104 vd->exponent = exponent; in vfp_double_normaliseround() 112 underflow = exponent < 0; in vfp_double_normaliseround() [all …]
|
H A D | vfp.h | 150 s16 exponent; member 193 s->exponent = vfp_single_packed_exponent(val); in vfp_single_unpack() 197 if (s->exponent && s->exponent != 255) in vfp_single_unpack() 210 (s->exponent << VFP_SINGLE_MANTISSA_BITS) + in vfp_single_pack() 228 if (s->exponent == 255) { in vfp_single_type() 235 } else if (s->exponent == 0) { in vfp_single_type() 255 s16 exponent; member 302 s->exponent = vfp_double_packed_exponent(val); in vfp_double_unpack() 306 if (s->exponent && s->exponent != 2047) in vfp_double_unpack() 319 ((u64)s->exponent << VFP_DOUBLE_MANTISSA_BITS) + in vfp_double_pack() [all …]
|
/openbmc/phosphor-power/phosphor-regulators/test/ |
H A D | pmbus_utils_tests.cpp | 200 int8_t exponent; in TEST() local 204 exponent = 2; in TEST() 205 EXPECT_DOUBLE_EQ(pmbus_utils::convertFromVoutLinear(value, exponent), 4); in TEST() 209 exponent = 0; in TEST() 210 EXPECT_DOUBLE_EQ(pmbus_utils::convertFromVoutLinear(value, exponent), 15); in TEST() 214 exponent = -3; in TEST() 215 EXPECT_DOUBLE_EQ(pmbus_utils::convertFromVoutLinear(value, exponent), in TEST() 220 exponent = 10; in TEST() 221 EXPECT_DOUBLE_EQ(pmbus_utils::convertFromVoutLinear(value, exponent), 0); in TEST() 227 int8_t exponent; in TEST() local [all …]
|
/openbmc/phosphor-power/phosphor-regulators/test/actions/ |
H A D | pmbus_write_vout_command_action_tests.cpp | 53 std::optional<int8_t> exponent{-8}; in TEST() local 55 PMBusWriteVoutCommandAction action{volts, format, exponent, isVerified}; in TEST() 73 std::optional<int8_t> exponent{}; in TEST() local 75 PMBusWriteVoutCommandAction action{volts, format, exponent, isVerified}; in TEST() 91 std::optional<int8_t> exponent{}; in TEST() local 93 PMBusWriteVoutCommandAction action{volts, format, exponent, isVerified}; in TEST() 141 std::optional<int8_t> exponent{-8}; in TEST() local 143 PMBusWriteVoutCommandAction action{volts, format, exponent, isVerified}; in TEST() 186 std::optional<int8_t> exponent{}; in TEST() local 188 PMBusWriteVoutCommandAction action{volts, format, exponent, isVerified}; in TEST() [all …]
|
H A D | pmbus_read_sensor_action_tests.cpp | 56 std::optional<int8_t> exponent{-8}; in TEST() local 57 PMBusReadSensorAction action{type, command, format, exponent}; in TEST() 70 std::optional<int8_t> exponent{}; in TEST() local 71 PMBusReadSensorAction action{type, command, format, exponent}; in TEST() 119 std::optional<int8_t> exponent{}; in TEST() local 120 PMBusReadSensorAction action{type, command, format, exponent}; in TEST() 166 std::optional<int8_t> exponent{-8}; in TEST() local 167 PMBusReadSensorAction action{type, command, format, exponent}; in TEST() 216 std::optional<int8_t> exponent{}; in TEST() local 217 PMBusReadSensorAction action{type, command, format, exponent}; in TEST() [all …]
|
/openbmc/qemu/tests/tcg/i386/ |
H A D | test-i386-fprem.c | 42 unsigned int exponent:15; member 52 unsigned int exponent:15; member 62 .ieee_nan.exponent = 0x7fff, 70 .ieee_nan.exponent = 0x7fff, 78 .ieee.exponent = 0x7fff, 85 .ieee.exponent = 0x7fff, 92 .ieee.exponent = 0, 99 .ieee.exponent = 1, 178 au.ieee.negative, au.ieee.exponent, au.ieee.one, in do_fprem() 182 bu.ieee.negative, bu.ieee.exponent, bu.ieee.one, in do_fprem() [all …]
|
/openbmc/qemu/libdecnumber/ |
H A D | decNumber.c | 379 if (dn->bits&DECSPECIAL || dn->digits>10 || dn->exponent!=0) ; /* bad */ in decNumberToInt32() 414 if (dn->bits&DECSPECIAL || dn->digits>10 || dn->exponent!=0 in decNumberToUInt32() 516 if (decNumberIsSpecial(dn) || (dn->exponent < 0) || in decNumberIntegralToInt64() 517 (dn->digits + dn->exponent > 19)) { in decNumberIntegralToInt64() 534 hi *= (uint64_t)powers[dn->exponent]; in decNumberIntegralToInt64() 565 if (decNumberIsSpecial(dn) || (dn->exponent < 0) || in decNumberIntegralToInt128() 566 (dn->digits + dn->exponent > 39)) { in decNumberIntegralToInt128() 585 if (mulUInt128ByPowOf10(&lo, &hi, dn->exponent)) { in decNumberIntegralToInt128() 655 Int exponent=0; /* working exponent [assume 0] */ in decNumberFromString() local 773 exponent=X10(exponent)+(Int)*c-(Int)'0'; in decNumberFromString() [all …]
|
/openbmc/phosphor-power/phosphor-regulators/src/ |
H A D | pmbus_utils.hpp | 159 int8_t exponent = static_cast<int8_t>(exponentField); in convertFromLinear() local 163 double decimal = mantissa * std::pow(2.0, exponent); in convertFromLinear() 180 inline double convertFromVoutLinear(uint16_t value, int8_t exponent) in convertFromVoutLinear() argument 183 double decimal = value * std::pow(2.0, exponent); in convertFromVoutLinear() 205 inline uint16_t convertToVoutLinear(double volts, int8_t exponent) in convertToVoutLinear() argument 208 double mantissa = volts / std::pow(2.0, static_cast<double>(exponent)); in convertToVoutLinear()
|
/openbmc/witherspoon-pfault-analysis/power-supply/ |
H A D | record_manager.cpp | 162 int8_t exponent = (data & 0xF800) >> 11; in linearToInteger() local 167 if (exponent & 0x10) in linearToInteger() 169 exponent = (~exponent) & 0x1F; in linearToInteger() 170 exponent = (exponent + 1) * -1; in linearToInteger() 181 auto value = static_cast<float>(mantissa) * pow(2, exponent); in linearToInteger()
|
/openbmc/qemu/stats/ |
H A D | stats-hmp-cmds.c | 21 value->has_unit || value->exponent ? ", " : ""); in print_stats_schema_value() 32 value->exponent >= -18 && value->exponent <= 18 && in print_stats_schema_value() 33 value->exponent % 3 == 0) { in print_stats_schema_value() 34 monitor_puts(mon, si_prefix(value->exponent)); in print_stats_schema_value() 36 value->exponent >= 0 && value->exponent <= 60 && in print_stats_schema_value() 37 value->exponent % 10 == 0) { in print_stats_schema_value() 39 monitor_puts(mon, iec_binary_prefix(value->exponent)); in print_stats_schema_value() 40 } else if (value->exponent) { in print_stats_schema_value() 43 value->base, value->exponent, in print_stats_schema_value()
|
/openbmc/phosphor-power/power-supply/ |
H A D | record_manager.cpp | 168 int8_t exponent = (data & 0xF800) >> 11; in linearToInteger() local 173 if (exponent & 0x10) in linearToInteger() 175 exponent = (~exponent) & 0x1F; in linearToInteger() 176 exponent = (exponent + 1) * -1; in linearToInteger() 187 auto value = static_cast<float>(mantissa) * pow(2, exponent); in linearToInteger()
|
/openbmc/phosphor-power/phosphor-regulators/src/actions/ |
H A D | pmbus_read_sensor_action.hpp | 71 std::optional<int8_t> exponent) : in PMBusReadSensorAction() argument 72 type{type}, command{command}, format{format}, exponent{exponent} in PMBusReadSensorAction() 119 return exponent; in getExponent() 185 const std::optional<int8_t> exponent{}; member in phosphor::power::regulators::PMBusReadSensorAction
|
H A D | pmbus_write_vout_command_action.hpp | 92 std::optional<int8_t> exponent, bool isVerified) : in PMBusWriteVoutCommandAction() argument 93 volts{volts}, format{format}, exponent{exponent}, in PMBusWriteVoutCommandAction() 139 return exponent; in getExponent() 240 const std::optional<int8_t> exponent{}; member in phosphor::power::regulators::PMBusWriteVoutCommandAction
|
/openbmc/phosphor-power/phosphor-regulators/docs/config_file/ |
H A D | pmbus_write_vout_command.md | 27 The linear data format requires an exponent value. 29 If the device supports the PMBus VOUT_MODE command, the exponent value can be 32 If VOUT_MODE is not supported by the device, the exponent value must be 33 specified using the "exponent" property. The exponent value can normally be 58 | exponent | no | number | Exponent value for linear data format. Can be … 71 "Get exponent from VOUT_MODE." 82 "Set output voltage. Explicitly specify volts and exponent.", 88 "exponent": -8,
|
H A D | pmbus_read_sensor.md | 39 … Two byte value with an 11-bit, two's complement mantissa and a 5-bit, two's complement exponent. | 40 …yte (16-bit), unsigned integer that is raised to the power of an exponent. The exponent is not sto… 44 The "linear_16" data format requires an exponent value. 46 If the device supports the PMBus VOUT_MODE command, the exponent value can be 49 If VOUT_MODE is not supported by the device, the exponent value must be 50 specified using the "exponent" property. The exponent value can normally be 107 | exponent | no | number | Exponent value for "linear_16" data format. Can be positive or neg… 128 "comments": ["Read output voltage from READ_VOUT. Specify exponent."], 133 "exponent": -8
|