lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] No manipulator for number of exponent digits?!


From: Greg Chicares
Subject: [lmi] No manipulator for number of exponent digits?!
Date: Thu, 21 Mar 2019 01:57:45 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1

Upgrading from gcc-7.x to -8.x, I see this regression in 'make system_test'
results from a proprietary testdeck:

--8.33299753535067966748e-005
+-8.33299753535067966748e-05

Obviously I should be able to add a manipulator in the implementation of
  template<typename T> void SpewVector()
to fix the number of exponent digits at three, as nature intends--but no,
it can't be done, standardly, according to Kühl and Kanze...

https://stackoverflow.com/questions/9226400/portable-printing-of-exponent-of-a-double-to-c-iostreams/9226588#9226588

...except with a custom num_put facet, which is too much work: we'll be
better off just updating the stored system_test touchstone results when
we upgrade the compiler. Still, it seems surprising that the number of
exponent digits is left to the implementation's discretion, and that gcc
(or MinGW-w64) has changed it.

The really welcome news is that, aside from the meaningless regression
above, all test results match perfectly except for some one-ulp changes
in a few '.tsv' and '.xml' files that deliberately show all possible
precision. We'll upgrade to gcc-8.x as soon as we find a convenient time.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]