mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +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
|
@ -1,3 +1,3 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
[dialect_revision=767, security_mode=1, server_guid=[persistent=7021797314968118638, volatile=25959], system_time=XXXXXXXXXX.XXXXXX, server_start_time=-1.164447e+10, negotiate_context_count=0, negotiate_context_values=[]]
|
||||
[dialect_revision=785, security_mode=1, server_guid=[persistent=7021797314968118638, volatile=25959], system_time=XXXXXXXXXX.XXXXXX, server_start_time=-1.164447e+10, negotiate_context_count=2, negotiate_context_values=[[context_type=1, data_length=38, preauth_info=[hash_alg_count=1, salt_length=32, hash_alg=[1], salt=\x0d&\xc9\xca\xf2\xd8\xfc\x87\xa7\x10\x9c\x04W\x82p\x09T8Rl\xed\xe0\x84\x10\xca4\xaa\x87B\xb9Z\x80], encryption_info=<uninitialized>, compression_info=<uninitialized>, netname=<uninitialized>], [context_type=2, data_length=4, preauth_info=<uninitialized>, encryption_info=[cipher_count=1, ciphers=[1]], compression_info=<uninitialized>, netname=<uninitialized>]]]
|
||||
[dialect_revision=767, security_mode=1, server_guid=[persistent=7021797314968118638, volatile=25959], system_time=XXXXXXXXXX.XXXXXX, server_start_time=-1.16444736e+10, negotiate_context_count=0, negotiate_context_values=[]]
|
||||
[dialect_revision=785, security_mode=1, server_guid=[persistent=7021797314968118638, volatile=25959], system_time=XXXXXXXXXX.XXXXXX, server_start_time=-1.16444736e+10, negotiate_context_count=2, negotiate_context_values=[[context_type=1, data_length=38, preauth_info=[hash_alg_count=1, salt_length=32, hash_alg=[1], salt=\x0d&\xc9\xca\xf2\xd8\xfc\x87\xa7\x10\x9c\x04W\x82p\x09T8Rl\xed\xe0\x84\x10\xca4\xaa\x87B\xb9Z\x80], encryption_info=<uninitialized>, compression_info=<uninitialized>, netname=<uninitialized>], [context_type=2, data_length=4, preauth_info=<uninitialized>, encryption_info=[cipher_count=1, ciphers=[1]], compression_info=<uninitialized>, netname=<uninitialized>]]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue