Skip to content
Menu
Code for Java c
  • Home
  • Java
    • Java Examples
    • Java tutorials
  • C
    • C tutorials
    • C Examples
  • C++
    • C++ Tutorials
    • C++ Examples
  • Python
    • Python Tutorials
    • Python Examples
  • About
    • About me
    • contact us
    • disclaimer
    • Privacy Policy
Code for Java c

C++ Programming language mathematical function

Posted on April 7, 2017September 15, 2019

Table of Contents

  • C++ Programming language mathematical function
      • C++ maths functions

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

C++ Programming language mathematical function
abs() nfunction

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

Syntex

double fabs(double x);

Example for fabs() function



C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical function
sin() function Example



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

Syntex

double cos(double x);

Example for cos() function

C++ Programming language mathematical function
cos() function Example

 

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

Syntex

double tan(double x);

Example for tan() function

C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical 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

C++ Programming language mathematical 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


C++ Programming language mathematical 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

C++ Programming language mathematical function
tanh() function Example

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

Syntex

double exp (double x);

Example for exp() function

C++ Programming language mathematical function
exp() function Exanmple

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

Syntex

double log (double x);

Example for log() function

C++ Programming language mathematical 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

C++ Programming language mathematical function
log10() function Example
 













Related

Recent Posts

  • Subtract two numbers using method overriding
  • PHP Star triangle Pattern program
  • Using function or method to Write temperature conversion : Fahrenheit into Celsius
  • Function or method:temperature conversion from Fahrenheit into Celsius – Entered by user
  • Write temperature conversion program: Fahrenheit into Celsius
  • How to write a program to convert Fahrenheit into Celsius

tag

Addition (6) Array (38) C++ language (91) C language (98) c sharp (23) Division (6) Function (29) if else (32) Java language (102) JavaScript (5) loops (137) Multiply (7) Oop (2) patterns (65) PHP (13) Python Language (38) Subtraction (7) temperature (20)

Archives

Categories

Address

Global information technology

Puloly south, PointPedro

Jaffna

Srilanka

©2025 Code for Java c | Powered by SuperbThemes