The Fn copysign function returns Fa x with its sign changed to Fa y Ns 's.
The Fn drem function returns the remainder Fa r := Fa x - Fa n*y where Fa n is the integer nearest the exact value of -words Fa x Ns / Ns Fa y ; moreover if \*(Ba Fa n - Fa x No / Fa y No \*(Ba = 1/2 then Fa n is even. Consequently the remainder is computed exactly and \*(Ba Fa r \*(Ba \*(Ba Fa y \*(Ba/2. But Fn drem x 0 is exceptional. (See below under Sx DIAGNOSTICS . )
The Fn finite function returns the value 1 just when - Fa x +; otherwise a zero is returned (when \*(Ba Fa x \*(Ba = or Fa x is or is the VAX 's reserved operand).
The Fn logb function returns Fa x Ns 's exponent Fa n , a signed integer converted to double-precision floating-point and so chosen that 1 (<= \*(Ba Fa x \*(Ba2** Fa n < 2 unless Fa x = 0 or (only on machines that conform to IEEE 754) \*(Ba Fa x \*(Ba = or Fa x lies between 0 and the Underflow Threshold. (See below under Sx BUGS . )
The Fn calb returns Fa x Ns *(2** Ns Fa n ) computed, for integer n, without first computing 2* Fa n
IEEE 754 defines Fn logb ±\*(If = and Fn logb 0 = -, and requires the latter to signal Division-by-Zero. But on a VAX , Fn logb 0 = 1.0 - 2.0**31 = -2,147,483,647.0. And if the correct value of Fn scalb would overflow on a VAX , it generates a reserved operand fault and sets the global variable errno to ERANGE .
IEEE 754 currently specifies that Fn logb denormalized no. = Fn logb tiniest normalized no. > 0 but the consensus has changed to the specification in the new proposed IEEE standard p854, namely that Fn logb x satisfy
1 < Fn scalb \*(Bax\*(Ba -logb(x) < Radix ... = 2 for IEEE 754
for every x except 0, and . Almost every program that assumes 754's specification will work correctly if Fn logb follows 854's specification instead.
IEEE 754 requires Fn copysign x \*(Na) = ± Fa x but says nothing else about the sign of a . A N ot a N umber is similar in spirit to the VAX 's reserved operand, but very different in important details. Since the sign bit of a reserved operand makes it look negative,
Fn copysign x reserved operand = - Fa x
should this return the reserved operand instead?