Bladeren bron

Fix typos

pull/217/head
Kian-Meng, Ang 3 jaren geleden
bovenliggende
commit
7c565c56c3
6 gewijzigde bestanden met toevoegingen van 9 en 9 verwijderingen
  1. +2
    -2
      c_src/double-conversion/bignum-dtoa.cc
  2. +3
    -3
      c_src/double-conversion/double-conversion.h
  3. +1
    -1
      c_src/double-conversion/fixed-dtoa.cc
  4. +1
    -1
      c_src/double-conversion/strtod.cc
  5. +1
    -1
      src/jiffy_utf8.erl
  6. +1
    -1
      test/jiffy_16_dedupe_keys_tests.erl

+ 2
- 2
c_src/double-conversion/bignum-dtoa.cc Bestand weergeven

@ -276,7 +276,7 @@ static void GenerateShortestDigits(Bignum* numerator, Bignum* denominator,
// Let v = numerator / denominator < 10.
// Then we generate 'count' digits of d = x.xxxxx... (without the decimal point)
// from left to right. Once 'count' digits have been produced we decide wether
// from left to right. Once 'count' digits have been produced we decide whether
// to round up or down. Remainders of exactly .5 round upwards. Numbers such
// as 9.999999 propagate a carry all the way, and change the
// exponent (decimal_point), when rounding upwards.
@ -548,7 +548,7 @@ static void InitialScaledStartValuesNegativeExponentNegativePower(
//
// Let ep == estimated_power, then the returned values will satisfy:
// v / 10^ep = numerator / denominator.
// v's boundarys m- and m+:
// v's boundaries m- and m+:
// m- / 10^ep == v / 10^ep - delta_minus / denominator
// m+ / 10^ep == v / 10^ep + delta_plus / denominator
// Or in other words:

+ 3
- 3
c_src/double-conversion/double-conversion.h Bestand weergeven

@ -96,7 +96,7 @@ class DoubleToStringConverter {
// Example with max_leading_padding_zeroes_in_precision_mode = 6.
// ToPrecision(0.0000012345, 2) -> "0.0000012"
// ToPrecision(0.00000012345, 2) -> "1.2e-7"
// Similarily the converter may add up to
// Similarly the converter may add up to
// max_trailing_padding_zeroes_in_precision_mode in precision mode to avoid
// returning an exponential representation. A zero added by the
// EMIT_TRAILING_ZERO_AFTER_POINT flag is counted for this limit.
@ -138,7 +138,7 @@ class DoubleToStringConverter {
// Example with decimal_in_shortest_low = -6,
// decimal_in_shortest_high = 21,
// EMIT_POSITIVE_EXPONENT_SIGN activated, and
// EMIT_TRAILING_DECIMAL_POINT deactived:
// EMIT_TRAILING_DECIMAL_POINT deactivated:
// ToShortest(0.000001) -> "0.000001"
// ToShortest(0.0000001) -> "1e-7"
// ToShortest(111111111111111111111.0) -> "111111111111111110000"
@ -242,7 +242,7 @@ class DoubleToStringConverter {
// Example with max_leading_padding_zeroes_in_precision_mode = 6.
// ToPrecision(0.0000012345, 2) -> "0.0000012"
// ToPrecision(0.00000012345, 2) -> "1.2e-7"
// Similarily the converter may add up to
// Similarly the converter may add up to
// max_trailing_padding_zeroes_in_precision_mode in precision mode to avoid
// returning an exponential representation. A zero added by the
// EMIT_TRAILING_ZERO_AFTER_POINT flag is counted for this limit.

+ 1
- 1
c_src/double-conversion/fixed-dtoa.cc Bestand weergeven

@ -395,7 +395,7 @@ bool FastFixedDtoa(double v,
TrimZeros(buffer, length, decimal_point);
buffer[*length] = '\0';
if ((*length) == 0) {
// The string is empty and the decimal_point thus has no importance. Mimick
// The string is empty and the decimal_point thus has no importance. Mimic
// Gay's dtoa and and set it to -fractional_count.
*decimal_point = -fractional_count;
}

+ 1
- 1
c_src/double-conversion/strtod.cc Bestand weergeven

@ -522,7 +522,7 @@ float Strtof(Vector buffer, int exponent) {
// low-precision (3 digits):
// when read from input: 123
// when rounded from high precision: 124.
// To do this we simply look at the neigbors of the correct result and see
// To do this we simply look at the neighbors of the correct result and see
// if they would round to the same float. If the guess is not correct we have
// to look at four values (since two different doubles could be the correct
// double).

+ 1
- 1
src/jiffy_utf8.erl Bestand weergeven

@ -77,7 +77,7 @@ loose_decode(Bin, O, Acc) ->
<<_:O/binary, _:8/integer, R/binary>> ->
% Broken lead or continuation byte. Discard first
% byte and all broken continuations. Replace the
% whole mess with a replacment code point.
% whole mess with a replacement code point.
T = 1 + count_continuation_bytes(R, 0),
loose_decode(Bin, O+T, [16#FFFD | Acc])
end.

+ 1
- 1
test/jiffy_16_dedupe_keys_tests.erl Bestand weergeven

@ -38,7 +38,7 @@ dedupe_keys_test_() ->
{[{<<"foo">>, {[{<<"bar">>, 1}, {<<"bar">>, 2}]}}]},
{[{<<"foo">>, {[{<<"bar">>, 2}]}}]}
},
% Objets in arrays are handled
% Objects in arrays are handled
{
[{[{<<"foo">>, 1}, {<<"foo">>, 2}]}],
[{[{<<"foo">>, 2}]}]

Laden…
Annuleren
Opslaan