Compute the Exponential minus 1 of a Number in R Programming – expm1() Function
Last Updated :
10 Jun, 2020
expm1()
function in R Language is used to compute exponential minus 1 i.e, exp()-1.
Syntax: expm1(x)
Parameters:
a, b: number or number vector
Example 1:
expm1( 4 )
expm1( 10 )
expm1( 15 )
|
Output:
[1] 53.59815
[1] 22025.47
[1] 3269016
Example 2:
expm1(rep( 1 : 5 ))
expm1(rep( 5 : 8 ))
|
Output:
[1] 1.718282 6.389056 19.085537 53.598150 147.413159
[1] 147.4132 402.4288 1095.6332 2979.9580
Share your thoughts in the comments
Please Login to comment...