diff options
Diffstat (limited to 'sal/inc/rtl/math.h')
-rw-r--r-- | sal/inc/rtl/math.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h index 872d526b8835..fa81108df29f 100644 --- a/sal/inc/rtl/math.h +++ b/sal/inc/rtl/math.h @@ -140,9 +140,8 @@ enum rtl_math_DecimalPlaces /** Conversions analogous to sprintf() using internal rounding. - +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are - converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead - of '.'. + +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are + converted to "NaN". @param pResult Returns the resulting byte string. Must itself not be null, and must point @@ -216,9 +215,8 @@ void SAL_CALL rtl_math_doubleToString(rtl_String ** pResult, /** Conversions analogous to sprintf() using internal rounding. - +/-HUGE_VAL are converted to "1.#INF" and "-1.#INF", NAN values are - converted to "1.#NAN" and "-1.#NAN", of course using cDecSeparator instead - of '.'. + +/-HUGE_VAL are converted to "INF" and "-INF", NAN values are + converted to "NaN". @param pResult Returns the resulting Unicode string. Must itself not be null, and must @@ -296,8 +294,9 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult, Leading tabs (0x09) and spaces (0x20) are eaten. Overflow returns +/-HUGE_VAL, underflow 0. In both cases pStatus is set to rtl_math_ConversionStatus_OutOfRange, otherwise to - rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL, - pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is + rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are + recognized as +/-HUGE_VAL, pStatus is set to + rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are recognized and the value is set to +/-NAN, pStatus is set to rtl_math_ConversionStatus_Ok. @@ -320,7 +319,9 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult, @param pParsedEnd If non-null, returns one past the position of the last character parsed away. Thus if [pBegin..pEnd) only contains the numerical string to be - parsed, *pParsedEnd == pEnd on return. + parsed, *pParsedEnd == pEnd on return. If no numerical (sub-)string is + found, *pParsedEnd == pBegin on return, even if there was leading + whitespace. */ double SAL_CALL rtl_math_stringToDouble( sal_Char const * pBegin, sal_Char const * pEnd, sal_Char cDecSeparator, @@ -333,8 +334,9 @@ double SAL_CALL rtl_math_stringToDouble( Leading tabs (U+0009) and spaces (U+0020) are eaten. Overflow returns +/-HUGE_VAL, underflow 0. In both cases pStatus is set to rtl_math_ConversionStatus_OutOfRange, otherwise to - rtl_math_ConversionStatus_Ok. "+/-1.#INF" is recognized as +/-HUGE_VAL, - pStatus is set to rtl_math_ConversionStatus_OutOfRange. "+/-1.#NAN" is + rtl_math_ConversionStatus_Ok. "INF", "-INF" and "+/-1.#INF" are + recognized as +/-HUGE_VAL, pStatus is set to + rtl_math_ConversionStatus_OutOfRange. "NaN" and "+/-1.#NAN" are recognized and the value is set to +/-NAN, pStatus is set to rtl_math_ConversionStatus_Ok. @@ -357,7 +359,9 @@ double SAL_CALL rtl_math_stringToDouble( @param pParsedEnd If non-null, returns one past the position of the last character parsed away. Thus if [pBegin..pEnd) only contains the numerical string to be - parsed, *pParsedEnd == pEnd on return. + parsed, *pParsedEnd == pEnd on return. If no numerical (sub-)string is + found, *pParsedEnd == pBegin on return, even if there was leading + whitespace. */ double SAL_CALL rtl_math_uStringToDouble( sal_Unicode const * pBegin, sal_Unicode const * pEnd, |