Home
last modified time | relevance | path

Searched refs:DiyFp (Results 1 – 14 of 14) sorted by relevance

/external/v8/src/numbers/
Ddiy-fp.h21 class DiyFp {
25 DiyFp() : f_(0), e_(0) {} in DiyFp() function
26 DiyFp(uint64_t f, int e) : f_(f), e_(e) {} in DiyFp() function
32 void Subtract(const DiyFp& other) { in Subtract()
41 static DiyFp Minus(const DiyFp& a, const DiyFp& b) { in Minus()
42 DiyFp result = a; in Minus()
48 V8_EXPORT_PRIVATE void Multiply(const DiyFp& other);
51 static DiyFp Times(const DiyFp& a, const DiyFp& b) { in Times()
52 DiyFp result = a; in Times()
77 static DiyFp Normalize(const DiyFp& a) { in Normalize()
[all …]
Dfast-dtoa.cc357 static bool DigitGen(DiyFp low, DiyFp w, DiyFp high, Vector<char> buffer, in DigitGen()
374 DiyFp too_low = DiyFp(low.f() - unit, low.e()); in DigitGen()
375 DiyFp too_high = DiyFp(high.f() + unit, high.e()); in DigitGen()
378 DiyFp unsafe_interval = DiyFp::Minus(too_high, too_low); in DigitGen()
386 DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e()); in DigitGen()
393 BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()), &divisor, in DigitGen()
416 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f(), in DigitGen()
443 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit, in DigitGen()
477 static bool DigitGenCounted(DiyFp w, int requested_digits, Vector<char> buffer, in DigitGenCounted()
489 DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e()); in DigitGenCounted()
[all …]
Ddouble.h32 explicit Double(DiyFp diy_fp) : d64_(DiyFpToUint64(diy_fp)) {} in Double()
36 DiyFp AsDiyFp() const { in AsDiyFp()
39 return DiyFp(Significand(), Exponent()); in AsDiyFp()
43 DiyFp AsNormalizedDiyFp() const { in AsNormalizedDiyFp()
54 f <<= DiyFp::kSignificandSize - kSignificandSize; in AsNormalizedDiyFp()
55 e -= DiyFp::kSignificandSize - kSignificandSize; in AsNormalizedDiyFp()
56 return DiyFp(f, e); in AsNormalizedDiyFp()
121 DiyFp UpperBoundary() const { in UpperBoundary()
123 return DiyFp(Significand() * 2 + 1, Exponent() - 1); in UpperBoundary()
130 void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const { in NormalizedBoundaries()
[all …]
Dstrtod.cc129 static void ReadDiyFp(Vector<const char> buffer, DiyFp* result, in ReadDiyFp()
134 *result = DiyFp(significand, 0); in ReadDiyFp()
143 *result = DiyFp(significand, exponent); in ReadDiyFp()
205 static DiyFp AdjustmentPowerOfTen(int exponent) { in AdjustmentPowerOfTen()
213 return DiyFp(0xA000'0000'0000'0000, -60); in AdjustmentPowerOfTen()
215 return DiyFp(0xC800'0000'0000'0000, -57); in AdjustmentPowerOfTen()
217 return DiyFp(0xFA00'0000'0000'0000, -54); in AdjustmentPowerOfTen()
219 return DiyFp(0x9C40'0000'0000'0000, -50); in AdjustmentPowerOfTen()
221 return DiyFp(0xC350'0000'0000'0000, -47); in AdjustmentPowerOfTen()
223 return DiyFp(0xF424'0000'0000'0000, -44); in AdjustmentPowerOfTen()
[all …]
Dcached-powers.cc83 int min_exponent, int max_exponent, DiyFp* power, int* decimal_exponent) { in GetCachedPowerForBinaryExponentRange()
84 int kQ = DiyFp::kSignificandSize; in GetCachedPowerForBinaryExponentRange()
95 *power = DiyFp(cached_power.significand, cached_power.binary_exponent); in GetCachedPowerForBinaryExponentRange()
99 DiyFp* power, in GetCachedPowerForDecimalExponent()
106 *power = DiyFp(cached_power.significand, cached_power.binary_exponent); in GetCachedPowerForDecimalExponent()
Dcached-powers.h27 DiyFp* power,
36 DiyFp* power,
Ddiy-fp.cc12 void DiyFp::Multiply(const DiyFp& other) { in Multiply()
/external/icu/icu4c/source/i18n/
Ddouble-conversion-fast-dtoa.cpp314 static bool DigitGen(DiyFp low, in DigitGen()
315 DiyFp w, in DigitGen()
316 DiyFp high, in DigitGen()
335 DiyFp too_low = DiyFp(low.f() - unit, low.e()); in DigitGen()
336 DiyFp too_high = DiyFp(high.f() + unit, high.e()); in DigitGen()
339 DiyFp unsafe_interval = DiyFp::Minus(too_high, too_low); in DigitGen()
347 DiyFp one = DiyFp(static_cast<uint64_t>(1) << -w.e(), w.e()); in DigitGen()
354 BiggestPowerTen(integrals, DiyFp::kSignificandSize - (-one.e()), in DigitGen()
378 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f(), in DigitGen()
406 return RoundWeed(buffer, *length, DiyFp::Minus(too_high, w).f() * unit, in DigitGen()
[all …]
Ddouble-conversion-ieee.h70 explicit Double(DiyFp diy_fp) in Double()
75 DiyFp AsDiyFp() const { in AsDiyFp()
78 return DiyFp(Significand(), Exponent()); in AsDiyFp()
82 DiyFp AsNormalizedDiyFp() const { in AsNormalizedDiyFp()
93 f <<= DiyFp::kSignificandSize - kSignificandSize; in AsNormalizedDiyFp()
94 e -= DiyFp::kSignificandSize - kSignificandSize; in AsNormalizedDiyFp()
95 return DiyFp(f, e); in AsNormalizedDiyFp()
178 DiyFp UpperBoundary() const { in UpperBoundary()
180 return DiyFp(Significand() * 2 + 1, Exponent() - 1); in UpperBoundary()
187 void NormalizedBoundaries(DiyFp* out_m_minus, DiyFp* out_m_plus) const { in NormalizedBoundaries()
[all …]
Ddouble-conversion-diy-fp.h55 class DiyFp {
59 DiyFp() : f_(0), e_(0) {} in DiyFp() function
60 DiyFp(const uint64_t significand, const int32_t exponent) : f_(significand), e_(exponent) {} in DiyFp() function
66 void Subtract(const DiyFp& other) { in Subtract()
75 static DiyFp Minus(const DiyFp& a, const DiyFp& b) { in Minus()
76 DiyFp result = a; in Minus()
82 void Multiply(const DiyFp& other) { in Multiply()
104 static DiyFp Times(const DiyFp& a, const DiyFp& b) { in Times()
105 DiyFp result = a; in Times()
130 static DiyFp Normalize(const DiyFp& a) { in Normalize()
[all …]
Ddouble-conversion-strtod.cpp191 DiyFp* result, in ReadDiyFp()
196 *result = DiyFp(significand, 0); in ReadDiyFp()
205 *result = DiyFp(significand, exponent); in ReadDiyFp()
266 static DiyFp AdjustmentPowerOfTen(int exponent) { in AdjustmentPowerOfTen()
273 case 1: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xa0000000, 00000000), -60); in AdjustmentPowerOfTen()
274 case 2: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xc8000000, 00000000), -57); in AdjustmentPowerOfTen()
275 case 3: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xfa000000, 00000000), -54); in AdjustmentPowerOfTen()
276 case 4: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0x9c400000, 00000000), -50); in AdjustmentPowerOfTen()
277 case 5: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xc3500000, 00000000), -47); in AdjustmentPowerOfTen()
278 case 6: return DiyFp(DOUBLE_CONVERSION_UINT64_2PART_C(0xf4240000, 00000000), -44); in AdjustmentPowerOfTen()
[all …]
Ddouble-conversion-cached-powers.cpp156 DiyFp* power, in GetCachedPowerForBinaryExponentRange()
158 int kQ = DiyFp::kSignificandSize; in GetCachedPowerForBinaryExponentRange()
169 *power = DiyFp(cached_power.significand, cached_power.binary_exponent); in GetCachedPowerForBinaryExponentRange()
174 DiyFp* power, in GetCachedPowerForDecimalExponent()
181 *power = DiyFp(cached_power.significand, cached_power.binary_exponent); in GetCachedPowerForDecimalExponent()
Ddouble-conversion-cached-powers.h62 DiyFp* power,
71 DiyFp* power,
Ddouble-conversion-string-to-double.cpp423 double result = Double(DiyFp(number, exponent)).value(); in RadixStringToIeee()