Overview | Namespace | Class | Index | Help

## Global Functions in Namespace math
in Sourcefile math.hxx

approxAdd
  double approxAdd(

    double | a,
    double | b );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Add two values.
  Description
    If signs differ and the absolute values are equal according to approxEqual() the method returns 0.0 instead of calculating the sum. If you wanted to sum up multiple values it would be convenient not to call approxAdd() for each value but instead remember the first value not equal to 0.0, add all other values using normal + operator, and with the result and the remembered value call approxAdd().

approxCeil
  double approxCeil(

    double | a );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    ceil()method taking approxEqual() into account.
  Description
    Use for expected integer values being calculated by double functions.
  ATTENTION!
    The threshhold value is 3.55271e-015

approxEqual
  bool approxEqual(

    double | a,
    double | b );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Test equality of two values with an accuracy of the magnitude of the given values scaled by 2^-48 (4 bits roundoff stripped).
  ATTENTION!
    approxEqual( value!=0.0, 0.0 ) _never_ yields true.

approxFloor
  double approxFloor(

    double | a );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    floor()method taking approxEqual() into account.
  Description
    Use for expected integer values being calculated by double functions.
  ATTENTION!
    The threshhold value is 3.55271e-015

approxSub
  double approxSub(

    double | a,
    double | b );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Substract two values (a-b).
  Description
    If signs are identical and the values are equal according to approxEqual() the method returns 0.0 instead of calculating the substraction.

cos
  double cos(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Safe cos(), returns NAN if not valid.

doubleToString
  rtl::OString doubleToString(

    double | fValue,
    rtl_math_StringFormat | eFormat,
    sal_Int32 | nDecPlaces,
    sal_Char | cDecSeparator,
    const sal_Int32 * | pGroups,
    sal_Char | cGroupSeparator,
    bool | bEraseTrailingDecZeros = false );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_doubleToString.

doubleToString
  rtl::OString doubleToString(

    double | fValue,
    rtl_math_StringFormat | eFormat,
    sal_Int32 | nDecPlaces,
    sal_Char | cDecSeparator,
    bool | bEraseTrailingDecZeros = false );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_doubleToString, with no grouping.

doubleToUString
  rtl::OUString doubleToUString(

    double | fValue,
    rtl_math_StringFormat | eFormat,
    sal_Int32 | nDecPlaces,
    sal_Unicode | cDecSeparator,
    const sal_Int32 * | pGroups,
    sal_Unicode | cGroupSeparator,
    bool | bEraseTrailingDecZeros = false );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_doubleToUString.

doubleToUString
  rtl::OUString doubleToUString(

    double | fValue,
    rtl_math_StringFormat | eFormat,
    sal_Int32 | nDecPlaces,
    sal_Unicode | cDecSeparator,
    bool | bEraseTrailingDecZeros = false );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_doubleToUString, with no grouping.

doubleToUStringBuffer
  void doubleToUStringBuffer(

    rtl::OUStringBuffer & | rBuffer,
    double | fValue,
    rtl_math_StringFormat | eFormat,
    sal_Int32 | nDecPlaces,
    sal_Unicode | cDecSeparator,
    const sal_Int32 * | pGroups,
    sal_Unicode | cGroupSeparator,
    bool | bEraseTrailingDecZeros = false );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_doubleToUString that appends to an rtl::OUStringBuffer.

doubleToUStringBuffer
  void doubleToUStringBuffer(

    rtl::OUStringBuffer & | rBuffer,
    double | fValue,
    rtl_math_StringFormat | eFormat,
    sal_Int32 | nDecPlaces,
    sal_Unicode | cDecSeparator,
    bool | bEraseTrailingDecZeros = false );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_doubleToUString that appends to an rtl::OUStringBuffer, with no grouping.

isFinite
  bool isFinite(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Tests whether a value is neither INF nor NAN.

isInf
  bool isInf(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    If a value represents +INF or -INF.
  Description
    The sign bit may be queried with isSignBitSet(). If isFinite(d)==false and isInf(d)==false then NAN.

isNan
  bool isNan(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Test on any QNAN or SNAN.

isSignBitSet
  bool isSignBitSet(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    If the sign bit is set.

isValidArcArg
  bool isValidArcArg(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    If a value is a valid argument for sin(), cos(), tan().
  Description
    IEEE 754 specifies that absolute values up to 2^64 (=1.844e19) for the radian must be supported by trigonometric functions. Unfortunately, at least on x86 architectures, the FPU doesn't generate an error pattern for values >2^64 but produces erroneous results instead and sets only the "invalid operation" (IM) flag in the status word :-( Thus the application has to handle it itself.

pow10Exp
  double pow10Exp(

    double | fValue,
    int | nExp );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_pow10Exp.

round
  double round(

    double | fValue,
    int | nDecPlaces = 0,
    rtl_math_RoundingMode | eMode = rtl_math_RoundingMode_Corrected );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_round.

setInf
  void setInf(

    double * | pd,
    bool | bNegative );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Set to +INF if bNegative==false or -INF if bNegative==true.

setNan
  void setNan(

    double * | pd );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Set a QNAN.

sin
  double sin(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Safe sin(), returns NAN if not valid.

stringToDouble
  double stringToDouble(

    const rtl::OString & | rString,
    sal_Char | cDecSeparator,
    sal_Char | cGroupSeparator,
    rtl_math_ConversionStatus * | pStatus,
    sal_Int32 * | pParsedEnd );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_stringToDouble.

stringToDouble
  double stringToDouble(

    const rtl::OUString & | rString,
    sal_Unicode | cDecSeparator,
    sal_Unicode | cGroupSeparator,
    rtl_math_ConversionStatus * | pStatus,
    sal_Int32 * | pParsedEnd );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    A wrapper around rtl_math_uStringToDouble.

tan
  double tan(

    double | d );

  virtual | abstract | const | volatile | template | static | inline | C-linkage
  NO | NO | NO | NO | NO | NO | YES | NO

  Summary
    Safe tan(), returns NAN if not valid.

Top of Page

Copyright © 2003 Sun Microsystems, Inc.