24#ifndef INCLUDED_RTL_MATH_H
25#define INCLUDED_RTL_MATH_H
33#if defined __cplusplus
98 rtl_math_ConversionStatus_FORCE_EQUAL_SIZE =
SAL_MAX_ENUM
225 sal_Int32 * pResultCapacity,
226 sal_Int32 nResultOffset,
double fValue,
228 sal_Int32 nDecPlaces,
230 sal_Int32
const * pGroups,
231 char cGroupSeparator,
300 sal_Int32 * pResultCapacity,
301 sal_Int32 nResultOffset,
double fValue,
303 sal_Int32 nDecPlaces,
305 sal_Int32
const * pGroups,
346 char const * pBegin,
char const * pEnd,
char cDecSeparator,
503#if defined __cplusplus
#define SAL_DLLPUBLIC
Definition saldllapi.h:34
#define SAL_MAX_ENUM
Definition types.h:205
unsigned char sal_Bool
Definition types.h:38
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition types.h:334
sal_uInt16 sal_Unicode
Definition types.h:123
SAL_DLLPUBLIC double rtl_math_erf(double fValue) SAL_THROW_EXTERN_C()
Returns values of the Errorfunction erf.
rtl_math_RoundingMode
Rounding modes for rtl_math_round.
Definition math.h:105
@ rtl_math_RoundingMode_Ceiling
Ceil of signed value.
Definition math.h:124
@ rtl_math_RoundingMode_Down
Floor of absolute value, signed return (commercial).
Definition math.h:112
@ rtl_math_RoundingMode_Up
Ceil of absolute value, signed return (commercial).
Definition math.h:116
@ rtl_math_RoundingMode_Corrected
Like HalfUp, but corrects roundoff errors, preferred.
Definition math.h:108
@ rtl_math_RoundingMode_HalfDown
Frac <= 0.5 ? floor of abs : ceil of abs, signed return.
Definition math.h:128
@ rtl_math_RoundingMode_HalfUp
Frac < 0.5 ? floor of abs : ceil of abs, signed return (mathematical).
Definition math.h:132
@ rtl_math_RoundingMode_HalfEven
IEEE rounding mode (statistical).
Definition math.h:136
@ rtl_math_RoundingMode_Floor
Floor of signed value.
Definition math.h:120
rtl_math_ConversionStatus
Status for rtl_math_stringToDouble and rtl_math_uStringToDouble.
Definition math.h:88
@ rtl_math_ConversionStatus_Ok
Conversion was successful.
Definition math.h:91
@ rtl_math_ConversionStatus_OutOfRange
Conversion caused overflow or underflow.
Definition math.h:95
SAL_DLLPUBLIC double rtl_math_round(double fValue, int nDecPlaces, enum rtl_math_RoundingMode eMode) SAL_THROW_EXTERN_C()
Rounds a double value.
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.
rtl_math_DecimalPlaces
Special decimal places constants for rtl_math_doubleToString and rtl_math_doubleToUString and rtl_mat...
Definition math.h:147
@ rtl_math_DecimalPlaces_DefaultSignificance
Value to be used with rtl_math_StringFormat_G.
Definition math.h:156
@ rtl_math_DecimalPlaces_Max
Value to be used with rtl_math_StringFormat_Automatic.
Definition math.h:150
rtl_math_StringFormat
Formatting modes for rtl_math_doubleToString and rtl_math_doubleToUString and rtl_math_doubleToUStrin...
Definition math.h:41
@ rtl_math_StringFormat_E
Like sprintf() E.
Definition math.h:44
@ rtl_math_StringFormat_E2
Same 'E', but with only 2 minimum digits in exponent.
Definition math.h:68
@ rtl_math_StringFormat_Automatic
Automatic, 'F' or 'E' format is used depending on the numeric value to be formatted.
Definition math.h:58
@ rtl_math_StringFormat_G1
Same 'G', but with only 1 minimum digits in exponent.
Definition math.h:73
@ rtl_math_StringFormat_E1
Same 'E', but with only 1 minimum digits in exponent.
Definition math.h:63
@ rtl_math_StringFormat_G2
Same 'G', but with only 2 minimum digits in exponent.
Definition math.h:78
@ rtl_math_StringFormat_G
Like sprintf() G, 'F' or 'E' format is used depending on which one is more compact.
Definition math.h:53
@ rtl_math_StringFormat_F
Like sprintf() f.
Definition math.h:48
SAL_DLLPUBLIC double rtl_math_asinh(double fValue) SAL_THROW_EXTERN_C()
Returns values of the inverse hyperbolic sine.
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, char cDecSeparator, sal_Int32 const *pGroups, char cGroupSeparator, sal_Bool bEraseTrailingDecZeros) SAL_THROW_EXTERN_C()
Conversions analogous to sprintf() using internal rounding.
SAL_DLLPUBLIC double rtl_math_erfc(double fValue) SAL_THROW_EXTERN_C()
Returns values of the complement Errorfunction erfc.
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)).
SAL_DLLPUBLIC double rtl_math_approxValue(double fValue) SAL_THROW_EXTERN_C()
Rounds value to 15 significant decimal digits.
SAL_DLLPUBLIC bool rtl_math_approxEqual(double a, double b) SAL_THROW_EXTERN_C()
Test equality of two values with an accuracy of the magnitude of the given values scaled by 2^-48 (4 ...
SAL_DLLPUBLIC double rtl_math_stringToDouble(char const *pBegin, char const *pEnd, char cDecSeparator, char cGroupSeparator, enum rtl_math_ConversionStatus *pStatus, char const **pParsedEnd) SAL_THROW_EXTERN_C()
Conversion analogous to strtod(), convert a string representing a decimal number into a double value.
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,...
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_acosh(double fValue) SAL_THROW_EXTERN_C()
Returns values of the inverse hyperbolic cosine.
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.
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.