Categories: C++

C++ Programming language mathematical function

C++ Programming language mathematical function

In this tutorial, we will disuss the concept of C++ Programming language mathematical function. Cpp language privides bulit-in methomaticla function for methamatical calculation.

C++ maths functions

1. abs(x) – return the absolute value of an integer
Syntex

int abs(int x);

Example for abs() function

abs() nfunction

2. fabs(x) – return the absolute value of a floating point number

Syntex

double fabs(double x);

Example for fabs() function



fabs() function Example

3 ceil(x) – return the value of rounds up to a whole number

Syntex

double ceil(double x);

Example for ceil() function

ceil() function Example

4. floor(x) – return the value of rounds down to a whole number

Syntex

double floor(double x);

Example for floor() function

floor() function Example

5. pow(x,y) – return the value of x to the power of y, if x is negative , y must be an integer, if x is zero, y must be a positive integer.

Syntex

double pow(double x, double y);

Example for pow() function

pow() function Example

6. sqrt(x) – return the value of  the positive square root of x

Syntex

double sqrt(int x);

Example for sqrt() function

sqrt() function example

 

7. sin(x) – return the value of the positive sin value of x

Syntex

double sin(double x);

Example for sin() function

sin() function Example



8. cos(x) – return the value of cosine of x

Syntex

double cos(double x);

Example for cos() function

cos() function Example

 

9. tan(x) – return the value of  tan value of x

Syntex

double tan(double x);

Example for tan() function

tan() function Example

 

10. asin(x) – return the value of  arc sine value of x

Syntex

double asin(double x);

Example for asin() function

asin() function Example

11. acos(x) – return the value of  arc cosine value of x

Syntex

double acos(double x);

Example for acos() function

acos() function Example

12. atan(x) – return the value of  arc tangent value of x

Syntex

double atan(double x);

Example for atan() function

atan() function Example

 

13. sinh(x) – return the value of  hyperbolic sine value of x

Syntex

double sinh (double x);

Example for sinh() function

sinh() function Example

14. cosh(x) – return the value of  hyperbolic cosine value of x

Syntex

double cosh (double x);

Example for cosh() function


cosh() function Example

15. tanh(x) – return the value of  hyperbolic tangent value of x

Syntex

double tanh (double x);

Example for tanh() function

tanh() function Example

16. exp(x) – return the value of  exponential value of x

Syntex

double exp (double x);

Example for exp() function

exp() function Exanmple

17. log(x) – return the value of  log value of x

Syntex

double log (double x);

Example for log() function

log() function Example

18. log10(x) – return the value of  (base ten) log10 value of x

Syntex

double log10  (double x);

Example for log10() function

log10() function Example













Karmehavannan

Recent Posts

Multiply two numbers in Java using scanner| 5 different ways

Multiply two numbers in Java using scanner| 5 different ways In this article, we will…

9 months ago

5 different ways to Divide two numbers in Java using scanner

5 Different ways to Divide two numbers in Java using scanner In this article, we…

10 months ago

Learn 8 Ways to Subtract Two Numbers Using Methods in Java

Learn 8 Ways to Subtract Two Numbers Using Methods in Java In this article, we…

10 months ago

10 ways to subtract two numbers in Java

10 ways to subtract two numbers in Java In this article, we will discuss the…

10 months ago

Java Code Examples – Multiply Two Numbers in 5 Easy Ways

Java Code Examples – Multiply Two Numbers in 5 Easy Ways In this article, we…

10 months ago

How to Divide two numbers in Java| 5 different ways

How to Divide two numbers in Java| 5 different ways In this article, we will…

10 months ago

This website uses cookies.