diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2017-06-16 12:30:08 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2017-06-16 15:24:33 -0400 |
commit | dd19b876d4c9a604946f6c4e39cc4eac5f12cfb9 (patch) | |
tree | dabceb4c021d2916092a080c02f880facd222e94 /conformance/conformance_test.cc | |
parent | 91bf623aa145cd1576451ed3764a64a089384ac4 (diff) | |
download | protobuf-dd19b876d4c9a604946f6c4e39cc4eac5f12cfb9.tar.gz protobuf-dd19b876d4c9a604946f6c4e39cc4eac5f12cfb9.tar.bz2 protobuf-dd19b876d4c9a604946f6c4e39cc4eac5f12cfb9.zip |
Raise the number of digits used for floats.
About 1.5% of all IEEE754 single-precision numbers require nine
decimal digits to represent accurately.
Diffstat (limited to 'conformance/conformance_test.cc')
-rw-r--r-- | conformance/conformance_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/conformance/conformance_test.cc b/conformance/conformance_test.cc index 0dd7787c..a899435d 100644 --- a/conformance/conformance_test.cc +++ b/conformance/conformance_test.cc @@ -759,6 +759,7 @@ bool ConformanceTestSuite::RunSuite(ConformanceTestRunner* runner, }); TestValidDataForType(FieldDescriptor::TYPE_FLOAT, { {flt(0.1), "0.1"}, + {flt(1.00000075e-36), "1.00000075e-36"}, {flt(3.402823e+38), "3.402823e+38"}, // 3.40282347e+38 {flt(1.17549435e-38f), "1.17549435e-38"} }); |