mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
GH-1450: Improve printing/logging of large double/interval/time values
The modp_dtoa/modp_dtoa2 functions aren't capable of handling double values larger than INT_MAX and fallback on using sprintf() in that situation. Previously, the format string to that sprintf() was "%e", defaulting to a precision of 6, which is already too few digits to represent a number known to be larger than INT_MAX. Now, an sprintf() is still performed for values larger than INT_MAX and still uses a scientific notation format, but in a way that uses as many decimal digits as needed to preserve information.
This commit is contained in:
parent
ea8367713b
commit
cc15c985ca
7 changed files with 88 additions and 19 deletions
|
@ -7,12 +7,13 @@
|
|||
#open XXXX-XX-XX-XX-XX-XX
|
||||
#fields data
|
||||
#types time
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
XXXXXXXXXX.XXXXXX
|
||||
1234567890.000000
|
||||
1234567890.000000
|
||||
1234567890.010000
|
||||
1234567890.001000
|
||||
1234567890.000100
|
||||
1234567890.000010
|
||||
1234567890.000001
|
||||
1234567890.000000
|
||||
2.385642157e+09
|
||||
#close XXXX-XX-XX-XX-XX-XX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue