Some common C + + standard functions

Source: Internet
Author: User
Tags acos square root value of pi cmath

Some common C + + standard functions


Double atof (const char* p);
int atoi (const char* p);
Long Atol (const char* p); Cstdlib converts the string p to the number represented by a Val-like

Double fabs (double); Cmath absolute value function similar to ABS

Double ceil (double); Cmath rounding function, rounding up
Double floor (double); Cmath rounding function, rounding down
Double sqrt (double); Cmath square root function
Double pow (double D, double e); Cmath power function, returns the E-time of D


Double sin (double)                       &N      Bsp;// cmath trigonometric  
Double cos (double);
Double tan (double);  
Double asin (double)                           // cmath Inverse trigonometric function  
Double ACOs (double);
Double Atan (double);  
Double atan2 (double y, double x);      //Cmath enhanced inverse tangent function, which is useful for the spoke angle of the return point (x, y), will root The quadrant in which the stronghold is located adjusts the Radian value
Double sinh (double);                           // cmath hyperbolic function  
Double cosh (double);
Double Tanh (double);  


Double exp (double); Cmath exponential function with E as the base
Double log (double); Cmath logarithm function, with e as the base
Double log10 (double); Cmath logarithm function, base 10


In addition, the standard C + + does not provide a function pi, to obtain the value of pi generally do this:
Const double PI = acos (0.) * 2;

From http://bbs.tianya.cn/post-itinfo-181747-1.shtml

Some common C + + standard functions

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.