Lines Matching refs:exponent
115 int exponent,
128 exponent + (buffer.length() - kMaxSignificantDecimalDigits);
167 // Compute the binary exponent.
168 int exponent = 0;
169 *result = DiyFp(significand, exponent);
176 int exponent,
192 // If the 10^exponent (resp. 10^-exponent) fits into a double too then we
197 if (exponent < 0 && -exponent < kExactPowersOfTenSize) {
198 // 10^-exponent fits into a double.
201 *result /= exact_powers_of_ten[-exponent];
204 if (0 <= exponent && exponent < kExactPowersOfTenSize) {
205 // 10^exponent fits into a double.
208 *result *= exact_powers_of_ten[exponent];
213 if ((0 <= exponent) &&
214 (exponent - remaining_digits < kExactPowersOfTenSize)) {
216 // 10^remaining_digits. As a result the remaining exponent now fits
221 *result *= exact_powers_of_ten[exponent - remaining_digits];
229 // Returns 10^exponent as an exact DiyFp.
230 // The given exponent must be in the range [1; kDecimalExponentDistance[.
231 static DiyFp AdjustmentPowerOfTen(int exponent) {
232 ASSERT(0 < exponent);
233 ASSERT(exponent < PowersOfTenCache::kDecimalExponentDistance);
234 // Simply hardcode the remaining powers for the given decimal exponent
237 switch (exponent) {
256 int exponent,
268 // Move the remaining decimals into the exponent.
269 exponent += remaining_decimals;
276 ASSERT(exponent <= PowersOfTenCache::kMaxDecimalExponent);
277 if (exponent < PowersOfTenCache::kMinDecimalExponent) {
283 PowersOfTenCache::GetCachedPowerForDecimalExponent(exponent,
287 if (cached_decimal_exponent != exponent) {
288 int adjustment_exponent = exponent - cached_decimal_exponent;
365 // Returns the correct double for the buffer*10^exponent.
369 // buffer.length() + exponent <= kMaxDecimalPower + 1
370 // buffer.length() + exponent > kMinDecimalPower
373 int exponent,
381 ASSERT(buffer.length() + exponent <= kMaxDecimalPower + 1);
382 ASSERT(buffer.length() + exponent > kMinDecimalPower);
393 if (exponent >= 0) {
394 input.MultiplyByPowerOfTen(exponent);
396 boundary.MultiplyByPowerOfTen(-exponent);
417 double Strtod(Vector<const char> buffer, int exponent) {
420 exponent += left_trimmed.length() - trimmed.length();
425 TrimToMaxSignificantDigits(trimmed, exponent,
431 if (exponent + trimmed.length() - 1 >= kMaxDecimalPower) return V8_INFINITY;
432 if (exponent + trimmed.length() <= kMinDecimalPower) return 0.0;
435 if (DoubleStrtod(trimmed, exponent, &guess) ||
436 DiyFpStrtod(trimmed, exponent, &guess)) {
439 return BignumStrtod(trimmed, exponent, guess);