Name

math
- floating-point mathematical library

Library

libm.lib

Synopsis

  #include <math.h>

Detailed description

These functions constitute the C math library.

List of functions

Each of the following double functions has a float counterpart with an f’ appended to the name and a long double counterpart with an l’ appended. As an example, the float and long double counterparts of
  double acos (double x);
are
  float acosf (float x);
and
  long double acosl (long double x);
respectively.

    Algebraic functions

Name   Detailed description cbrt    cube root fma     fused multiply-add hypot   Euclidean distance sqrt    square root

    Classification functions

Name   Detailed description fpclassify      classify a floating-point value isfinite        determine whether a value is finite isinf   determine whether a value is infinite isnan   determine whether a value is NaN isnormal        determine whether a value is normalized

    Exponent manipulation functions

Name   Detailed description frexp   extract exponent and mantissa ilogb   extract exponent ldexp   multiply by power of 2 scalbln adjust exponent scalbn  adjust exponent

    Extremum- and sign-related functions

Name   Detailed description copysign        copy sign bit fabs    absolute value fdim    positive difference fmax    maximum function fmin    minimum function signbit extract sign bit

    Residue and rounding functions

Name   Detailed description ceil    integer no less than floor   integer no greater than fmod    positive remainder llrint  round to integer in fixed-point format llround round to nearest integer in fixed-point format lrint   round to integer in fixed-point format lround  round to nearest integer in fixed-point format modf    extract integer and fractional parts nearbyint       round to integer (silent) nextafter       next representable value nexttoward      next representable value remainder       remainder remquo  remainder with partial quotient rint    round to integer round   round to nearest integer trunc   integer no greater in magnitude than

The ceil, floor, llround, lround, round, and trunc functions round in predetermined directions, whereas llrint, lrint, and rint round according to the current (dynamic) rounding mode. For more information on controlling the dynamic rounding mode, see fenv and fesetround.

    Silent order predicates

Name   Detailed description isgreater       greater than relation isgreaterequal  greater than or equal to relation isless  less than relation islessequal     less than or equal to relation islessgreater   less than or greater than relation isunordered     unordered relation

    Transcendental functions

Name   Detailed description acos    inverse cosine acosh   inverse hyperbolic cosine asin    inverse sine asinh   inverse hyperbolic sine atan    inverse tangent atanh   inverse hyperbolic tangent atan2   atan(y/x); complex argument cos     cosine cosh    hyperbolic cosine erf     error function erfc    complementary error function exp     exponential base e exp2    exponential base 2 expm1   exp(x)-1 j0      Bessel function of the first kind of the order 0 j1      Bessel function of the first kind of the order 1 jn      Bessel function of the first kind of the order n lgamma  log gamma function log     natural logarithm log10   logarithm to base 10 log1p   log(1+x) pow     exponential x**y sin     trigonometric function sinh    hyperbolic function tan     trigonometric function tanh    hyperbolic function tgamma  gamma function y0      Bessel function of the second kind of the order 0 y1      Bessel function of the second kind of the order 1 yn      Bessel function of the second kind of the order n

Unlike the algebraic functions listed earlier, the routines in this section may not produce a result that is correctly rounded, so reproducible results cannot be guaranteed across platforms. For most of these functions, however, incorrect rounding occurs rarely, and then only in very-close-to-halfway cases.


See also

ieee

Bugs

The log2 and nan functions are missing, and many functions are not available in their long double variants.

Many of the routines to compute transcendental functions produce inaccurate results in other than the default rounding mode.

On some architectures, trigonometric argument reduction is not performed accurately, resulting in errors greater than 1 ulp for large arguments to cos, sin, and tan.


Limitations

As there is no long double support in SYMBIAN OS, All long double version apis are just aliased to the double version of the apis. Long double Apis behaves similiar to that of their double counterparts.

In Symbian the Floating-Point operations are carried out with the help of a Floating-point emulator, It doesn’t support any hardware for floating point operations. So, the accuracy of the result is far from that of the accuracy obtained in a OS with a hardware floating-point unit.

Floating point exceptions are not supported, as there is no Hardware FP co-processor support in the current phone. If there is a hardware FP co-processor , it will be supported with ARM inline assembly code.

Complex number Apis are not supported in this library


Feedback

For additional information or queries on this page send feedback

© 2005-2007 Nokia

Top