Functions in math. h

Source: Internet
Author: User
Tags base 10 logarithm
Mathematical function library, the specific implementation of some mathematical formulas is put in math. h, specifically: 1. trigonometric function double sin (double); sine double cos (double); cosine double Tan (double); tangent, inverse trigonometric function Double asin (double ); result range: [-PI/2, PI/2] Double ACOs (double); Result range: [0, Pi] Double atan (double); arc tangent (main value ), the result is between [-PI/2, PI/2] Double atan2 (double, double), and returns an arc tangent (an integer value). The result is between [-Pi, pi], hyperbolic trigonometric function Double sinh (double); double cosh (double); double Tanh (double);, exponent and logarithm double frexp (double value), Int * exp); this is an integer that splits the value into the fractional part F and (base on 2), returns the fractional part F, that is, f * 2 ^ exp. The value of F is between 0.5 and ~ The value range is 1.0 or 0. Double ldexp (Double X, int exp); this function is just opposite to the frexp function above. Its return value is x * 2 ^ exp double MODF (double value, double * iptr); split the value and return its fractional part. iptr points to the integer part. Double Log (double); Base E logarithm double log10 (double); base 10 logarithm double POW (Double X, Double Y ); calculate the Y Power float powf (float X, float y) based on X. The function is consistent with that of POW, except that the input and output values are both floating point double exp (double ); calculate the power double SQRT (double) of the natural number E; open the square, take the integer double Ceil (double); take the upper integer, return the smallest integer double floor (double) greater than X; remove the integer, returns the largest integer smaller than X, I .e., Gaussian function [X] and absolute value int ABS (int I); returns the absolute value of an integer, double FABS (double ); realistic absolute value double cabs (struct complex znum); returns the absolute value of the plural number, and standardizes the floating point number double frexp (double F, int * P); standardizes floating point numbers, F = x * 2 ^ P. It is known that F is used to calculate X, p (x between [0.5, 1]) Double ldexp (Double X, int P); opposite to frexp, known X, P evaluate F, integer, and remainder double MODF (double, double *); return the integer part of the parameter through the pointer, return the decimal part double fmod (double, double ); returns the remainder of the two parameters, and other int rand (void). This is a random function that generates a random value from-90 to 32767, double hypot (Double X, Double Y ); the length of two straight angle edges of a right triangle is known, and the length of the oblique side is double ldexp (Double X, int exponent). The X * (exponent power of 2) double poly (Double X, int degree, double coeffs []); Calculation polynomial int matherr (struct exception * E); mathematical error calculation Handler

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.