C Function Daquan-remove less frequently used.

Source: Internet
Author: User

I. <Math. h>

1. abs () Absolute Value Function

2. Note that when gcc compiles a program with the math. h header file in unix/linux, we need gcc abc. c-lm => link-lm to indicate the math library.

3. floor () ceil () is an integer after (top) the current value. For example, 15.5 floor () => 15 ceil () => 16

4. div () is used to calculate the quotient and remainder of two integers; div_t div (int number, int denom); ====), not in math. h, but in stdlib. h ....

Typedef struct

{

Long int quot; // Operator

Long int rem; // Remainder

} Div_t;

5. fabs () calculates the absolute value of the floating point number;-123.5 = "123.5

6. srand () rand () radom () randomize () Random Number

7. sqrt () Square Root

8. pow pow10 power

9. modf modfl: split into integer and decimal parts

1. max min

2. fmod calculates the modulus of x/y: remainder.

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.