C++ Math exp()The function computes the exponential e raised to the power given number. Suppose a number is x:
exp() = ex
SyntaxConsider a number 'x'. Syntax would be: Parameterx: The value whose exponential value is to be calculated. Return valueIt returns the exponential value of type float, double or long double. If value is too large, the function returns HUGE_VAL Example 1Let's see a simple example when the value of x is positive. Output: Value of x is : 0.2 Exponential value of x is : 1.2214 In this example, exp() function calculates the exponential value of x when the value of x is positive. Example 2Let's see a simple example when the value of x is negative Output: Value of x is : -5.3 Exponential value of x is : 0.00499159 In this example, exp() function calculates the exponential value of x when the value of x is negative.
Next TopicC++ Math Functions
|
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week