From a3d650cb73ff1acd41e99facb0db2530719f72d6 Mon Sep 17 00:00:00 2001 From: PeiYong Zhang <peiyongz@apache.org> Date: Wed, 16 Jul 2003 17:50:17 +0000 Subject: [PATCH] strtod git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@175115 13f79535-47bb-0310-9956-ffa450edef68 --- doc/faq-build.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/faq-build.xml b/doc/faq-build.xml index ffd95398a..320e34214 100644 --- a/doc/faq-build.xml +++ b/doc/faq-build.xml @@ -395,4 +395,27 @@ catch (const XMLException& toCatch) { </a> </faq> + <faq title="Why my document is valid on some platforms while invalid on others"> + <q>"Why my document is valid on some platform while invalid on others"?</q> + <a> + <p>The parser relies on the system call, strtod(), to parse a string representation + of a double/float data. In the case of no invalid characters found, the strtod() + returns a double/float value if it is representable on that platform, or raises + ERANGE to indicate either underflow or underflow occurs. And the parser assigns + zero to the said data if underflow is found. + </p> + <p>The threshold, where the strtod() decides if an underflow occurs, varies on + platforms. On windows, it is roughly the order of e-308, on Linux, e-325, and + on AIX, HP and Solaris, e-324. + </p> + <p>So in an instance document, a data of value 1.0e-310 from a type with minExclusive 0, + is considered invalid on windows (since it is converted to 0 and therefore violates + the minExclusive constraint), but valid on other unix platforms (since it remains + the original value). + </p> + <p>The discussion above applies to data in xsd file as well. + </p> + </a> + </faq> + </faqs> -- GitLab