-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Brian Kuhl via Boost Sent: 29 January 2019 17:28 To: boost@lists.boost.org Cc: Brian Kuhl; adrian.park@windriver.com Subject: [boost] [lexical_cast] Assumed internal double conversion of float?
Hi Boost experts, We are chasing down some test failures with floats on VxWorks using the Dinkum clib and c++lib. We are testing with clang on Intel and Arm targets and GCC on PowerPC targets. An example failure at the bottom of this email.
We have determined that boost::detail::lcast_get_precision<float>() is returning 9, well in access of the defined FLT_DIG of 6, or the practical float limit of 6.92.
It returns std::numeric_limits<float>::maxdigits_10 = 9 This is maximum number of decimal digits that can contain information. Any more are just noise. std::numeric_limits<float>::digits_10 = 6 This is the number of decimal digits that are certain to be correct. The other 3 digits are 'noisy'. Our ancestors should have just used their fingers, and not their thumbs ;-) HTH Paul --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830