[SNIP]
But you are right that it would be better to check that numeric_limits::digits exists and isn't something silly before using the formula. With all the built-in floating point types it should be fine, and for other (well) User defined floating point types too. (I will look at this).[TRUNCATE]
I think you need to check numeric_limits::radix since your algorithm had a base-2-to-10 conversion (the type may not actually be binary!). The algorithm was based off a paper about IEEE-754; if IEEE-754 is a requirement, you may have to check for that too (via numeric_limits::is_iec559). Remember that even the built-in floating-point types aren't guaranteed to match IEEE-754!
Daryle
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost