When the arguments to an irrational mathematical function
[Reviewer Note by Barmar: There should be a table of these functions.] are all rational and the true mathematical result is also (mathematically) rational, then unless otherwise noted an implementation is free to return either an accurate rational result or a single float approximation. If the arguments are all rational but the result cannot be expressed as a rational number, then a single float approximation is always returned.
If the arguments to a mathematical function are all of type
(or rational (complex rational))
and the true mathematical result is
(mathematically) a complex number with rational real and imaginary
parts, then unless otherwise noted an implementation is free to return
either an accurate result of type (or rational (complex rational))
or
a single float
(permissible only if the imaginary part of the true mathematical
result is zero) or (complex single-float). If the arguments are
all of type (or rational (complex rational))
but the result cannot be
expressed as a rational or complex rational,
then the returned
value will be of type single-float
(permissible only if the imaginary
part of the true mathematical result is zero) or (complex single-float).
Function Sample Results abs(abs #c(3 4)) ⇒ 5 or 5.0acos(acos 1) ⇒ 0 or 0.0acosh(acosh 1) ⇒ 0 or 0.0asin(asin 0) ⇒ 0 or 0.0asinh(asinh 0) ⇒ 0 or 0.0atan(atan 0) ⇒ 0 or 0.0atanh(atanh 0) ⇒ 0 or 0.0cis(cis 0) ⇒ #c(1 0) or #c(1.0 0.0)cos(cos 0) ⇒ 1 or 1.0cosh(cosh 0) ⇒ 1 or 1.0exp(exp 0) ⇒ 1 or 1.0expt(expt 8 1/3) ⇒ 2 or 2.0log(log 1) ⇒ 0 or 0.0(log 8 2) ⇒ 3 or 3.0phase(phase 7) ⇒ 0 or 0.0signum(signum #c(3 4)) ⇒ #c(3/5 4/5) or #c(0.6 0.8)sin(sin 0) ⇒ 0 or 0.0sinh(sinh 0) ⇒ 0 or 0.0sqrt(sqrt 4) ⇒ 2 or 2.0(sqrt 9/16) ⇒ 3/4 or 0.75tan(tan 0) ⇒ 0 or 0.0tanh(tanh 0) ⇒ 0 or 0.0Figure 12–8: Functions Affected by Rule of Float Substitutability