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

IEEEremainder()

Example

Determine the IEEE 754 remainder for various pairs of numbers.

System.out.println(Math.IEEEremainder(11, 3));
System.out.println(Math.IEEEremainder(16, 4));
System.out.println(Math.IEEEremainder(31, 2.5));

Definition and Usage

The IEEEremainder() method calculates the remainder operation for two numbers according to the IEEE 754 standard.

The outcome of this method for two numbers a and b is equivalent to a – (b * Math.rint(a/b)).

Syntax

public static double IEEEremainder(double dividend, double divisor)

Parameter Values

Parameter

Description

dividend

Necessary: The dividend in the remainder operation

divisor

Necessary: The divisor in the remainder operation.

Technical Details

Returns

A double value that represents the outcome of the remainder operation performed on two numbers.

Java Version

Any