J3/05-115r1
Date: 31 Jan 2005
To: J3
From: John Reid
Subject: REM(inf,y), REM(x,0.0)
Here is a draft response for F03/0036, with thanks to Malcolm Cohen
for his help.
NUMBER: F03/0036
TITLE: IEEE_REM()
KEYWORDS: IEEE-754, remainder()
DEFECT TYPE: Interpretation
STATUS: For consideration
QUESTION:
What is REM(infinity,Y)? REM(X,0.0)?
What is REM(X,Y) if X and/or Y is NaN?
IEEE-754 requires (in 7.1) both REM(infinity,Y) and REM(X,0.0)
shall be a NaN and raise invalid.
REM(X,Y) when both X and Y are NaN shall be a NaN, and should be
one of NaN arguments.
REM(X,Y) when one of X and Y is a NaN shall be a NaN, and should
the NaN argument.
ANSWER:
The first paragraph of 14.8 states "Complete conformance with the
is not required, but ... the IEEE operation rem shall be provided by
the function IEEE_REM."
The behaviour of IEEE_REM for the cases cited here is as defined
for REM by the IEEE International Standard.
EDITS: None.
SUBMITTED BY: Fred Tydeman
HISTORY: J3/05-115 m171 Submitted