C Standard Library Reference Guide (7) math.h

Source: Internet
Author: User
Tags header mathematical functions

7. math.h

The math header file defines a number of mathematical functions.

Macro:

Huge_val

Function:

ACOs ();

ASIN ();

Atan ();

Atan2 ();

Ceil ();

cos ();

Cosh ();

exp ();

Fabs ();

Floor ();

Fmod ();

Frexp ();

Ldexp ();

Log ();

LOG10 ();

MODF ();

Pow ();

Sin ();

Sinh ();

sqrt ();

Tan ();

Tanh ();

7.1. Error conditions

All MATH.H functions that produce errors are similar.

The variable errno is set to Edom when the argument passed to the function exceeds the parameter definition field required by the function. The return value of a function depends on the implementation.

When the return value is too large to exceed the value range of double, the function returns the macro value Huge_val and sets the variable errno to Erange to represent the overflow. If the value is too small to be represented as a double, the function returns 0. In this case, whether the errno is set to erange depends on the implementation.

Errno,edom, and erange are defined in the header file errno.h.

Note In all cases where no domain restrictions are defined (that is, by default), the values of the parameters are limited by the maximum and minimum values of the double type.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.