Curriculum
Course: Java Basic
Login

Curriculum

Java Basic

Java Home

0/1

Java Introduction

0/1

Java Get Started

0/1

Java Syntax

0/1

Java Comments

0/1

Java Type Casting

0/1

Java Operators

0/1

Java Booleans

0/1

Java Switch

0/1

Java Break / Continue

0/1

Java Errors and Exception

0/1
Text lesson

expm1()

Example

Provide the result of subtracting 1 from ex for various values of x.

System.out.println(Math.expm1(0));
System.out.println(Math.expm1(1));
System.out.println(Math.expm1(10));
System.out.println(Math.expm1(4.8));
System.out.println(Math.expm1(Math.E));

Definition and Usage

The expm1() method yields the result of ex – 1 for any given number .

Here, represents the base of the natural logarithm system, approximately 2.718282. In Java, the constant Math.E holds the value of .

Syntax

public static double expm1(double number)

Parameter Values

Parameter

Description

number

Needed: The value of x in the expression ex – 1.

Technical Details

Returns

double value representing the result of ex – 1. for ex – 1. a given number 

Java Version

1.5