20 #ifndef INCLUDED_RTL_MATH_H
21 #define INCLUDED_RTL_MATH_H
29 #if defined __cplusplus
57 rtl_math_StringFormat_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
74 rtl_math_ConversionStatus_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
115 rtl_math_RoundingMode_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
201 sal_Int32 * pResultCapacity,
202 sal_Int32 nResultOffset,
double fValue,
204 sal_Int32 nDecPlaces,
206 sal_Int32
const * pGroups,
276 sal_Int32 * pResultCapacity,
277 sal_Int32 nResultOffset,
double fValue,
279 sal_Int32 nDecPlaces,
281 sal_Int32
const * pGroups,
469 #if defined __cplusplus
SAL_DLLPUBLIC void rtl_math_doubleToUString(rtl_uString **pResult, sal_Int32 *pResultCapacity, sal_Int32 nResultOffset, double fValue, enum rtl_math_StringFormat eFormat, sal_Int32 nDecPlaces, sal_Unicode cDecSeparator, sal_Int32 const *pGroups, sal_Unicode cGroupSeparator, sal_Bool bEraseTrailingDecZeros) SAL_THROW_EXTERN_C()
Conversions analogous to sprintf() using internal rounding.
SAL_DLLPUBLIC double rtl_math_expm1(double fValue) SAL_THROW_EXTERN_C()
Returns more accurate e^x-1 for x near 0 than calculating directly.
Ceil of absolute value, signed return (commercial).
Definition: math.h:92
unsigned char sal_Bool
Definition: types.h:46
Conversion caused overflow or underflow.
Definition: math.h:71
SAL_DLLPUBLIC double rtl_math_erf(double fValue) SAL_THROW_EXTERN_C()
Returns values of the Errorfunction erf.
Like sprintf() E.
Definition: math.h:40
SAL_DLLPUBLIC double rtl_math_log1p(double fValue) SAL_THROW_EXTERN_C()
Returns more accurate log(1+x) for x near 0 than calculating directly.
SAL_DLLPUBLIC double rtl_math_atanh(double fValue) SAL_THROW_EXTERN_C()
Returns more accurate atanh(x) for x near 0 than calculating 0.5*log((1+x)/(1-x)).
Frac < 0.5 ? floor of abs : ceil of abs, signed return (mathematical).
Definition: math.h:108
Frac <= 0.5 ? floor of abs : ceil of abs, signed return.
Definition: math.h:104
Ceil of signed value.
Definition: math.h:100
SAL_DLLPUBLIC double rtl_math_approxValue(double fValue) SAL_THROW_EXTERN_C()
Rounds value to 15 significant decimal digits.
Like sprintf() f.
Definition: math.h:44
SAL_DLLPUBLIC double rtl_math_pow10Exp(double fValue, int nExp) SAL_THROW_EXTERN_C()
Scales fVal to a power of 10 without calling pow() or div() for nExp values between -16 and +16...
char sal_Char
A legacy synonym for char.
Definition: types.h:128
rtl_math_DecimalPlaces
Special decimal places constants for rtl_math_doubleToString and rtl_math_doubleToUString and rtl_mat...
Definition: math.h:122
Like sprintf() G, 'F' or 'E' format is used depending on which one is more compact.
Definition: math.h:49
Floor of signed value.
Definition: math.h:96
SAL_DLLPUBLIC double rtl_math_acosh(double fValue) SAL_THROW_EXTERN_C()
Returns values of the inverse hyperbolic cosine.
SAL_DLLPUBLIC double rtl_math_stringToDouble(sal_Char const *pBegin, sal_Char const *pEnd, sal_Char cDecSeparator, sal_Char cGroupSeparator, enum rtl_math_ConversionStatus *pStatus, sal_Char const **pParsedEnd) SAL_THROW_EXTERN_C()
Conversion analogous to strtod(), convert a string representing a decimal number into a double value...
Floor of absolute value, signed return (commercial).
Definition: math.h:88
SAL_DLLPUBLIC void rtl_math_doubleToString(rtl_String **pResult, sal_Int32 *pResultCapacity, sal_Int32 nResultOffset, double fValue, enum rtl_math_StringFormat eFormat, sal_Int32 nDecPlaces, sal_Char cDecSeparator, sal_Int32 const *pGroups, sal_Char cGroupSeparator, sal_Bool bEraseTrailingDecZeros) SAL_THROW_EXTERN_C()
Conversions analogous to sprintf() using internal rounding.
SAL_DLLPUBLIC double rtl_math_round(double fValue, int nDecPlaces, enum rtl_math_RoundingMode eMode) SAL_THROW_EXTERN_C()
Rounds a double value.
rtl_math_StringFormat
Formatting modes for rtl_math_doubleToString and rtl_math_doubleToUString and rtl_math_doubleToUStrin...
Definition: math.h:36
#define SAL_DLLPUBLIC
Definition: saldllapi.h:30
Value to be used with rtl_math_StringFormat_G.
Definition: math.h:132
rtl_math_ConversionStatus
Status for rtl_math_stringToDouble and rtl_math_uStringToDouble.
Definition: math.h:63
SAL_DLLPUBLIC double rtl_math_uStringToDouble(sal_Unicode const *pBegin, sal_Unicode const *pEnd, sal_Unicode cDecSeparator, sal_Unicode cGroupSeparator, enum rtl_math_ConversionStatus *pStatus, sal_Unicode const **pParsedEnd) SAL_THROW_EXTERN_C()
Conversion analogous to strtod(), convert a string representing a decimal number into a double value...
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:367
SAL_DLLPUBLIC double rtl_math_erfc(double fValue) SAL_THROW_EXTERN_C()
Returns values of the complement Errorfunction erfc.
Value to be used with rtl_math_StringFormat_Automatic.
Definition: math.h:126
rtl_math_RoundingMode
Rounding modes for rtl_math_round.
Definition: math.h:80
sal_uInt16 sal_Unicode
Definition: types.h:150
Automatic, 'F' or 'E' format is used depending on the numeric value to be formatted.
Definition: math.h:54
SAL_DLLPUBLIC double rtl_math_asinh(double fValue) SAL_THROW_EXTERN_C()
Returns values of the inverse hyperbolic sine.
IEEE rounding mode (statistical).
Definition: math.h:112
Like HalfUp, but corrects roundoff errors, preferred.
Definition: math.h:84
Conversion was successful.
Definition: math.h:67