Functions of __ function in Cmath

Source: Internet
Author: User
Tags cos natural logarithm pow sin square root cmath

The <cmath> header file wants users to provide a collection of functions that can be used for general mathematical calculations.

function Description Sample
ceil (x) up to complete ceil (9.2) =10.0
cos (x) x Chord cos (0.0) =1.0
exp (x) exponential function, X of square exp (1.0) =2.71828
fabs (x) x Absolute value fabs ( -5) =5
Floor (x) rounding down Floor (9.2) =9
fmod (x,y) x/y floating-point number remainder fmod (2.6,1.2) =0.2
log (x) X's natural logarithm (base e) log (2.17282) =1.0
log10 (x) the logarithm of x (base) log10 (=1)
Pow (x,y) x's y power pow (2,7) =128
sin (x) x sine sin (0.0) =0
sqrt (x) x's square root (x nonnegative) sqrt (9.0) =3.0
Tanx (x) x (Tangent tan (0.0) =0

Cmath

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.