[Cfp-interest 3346] Re: The 'cproj' routine - 7.3.9.5
Damian McGuckin
damianm at esi.com.au
Mon Jan 6 15:16:26 PST 2025
The following is proposed. Any comments are welcome.
Thanks - Damian
"7.3.9.5#2 The cproj functions"
The cproj functions map z to itself except where z has an infinite real or
imaginary part (even if the other part is a NaN) in which case cproj(z)
is equivalent to
CMPLX(INFINITY, copysign(0.0, cimag(z))))
"7.3.9.5#3 The cproj functions"
The cproj functions return their argument unless that argument has an
infinite part in which case they return a complex floating value with
infinite real part and zero imaginary part.
"Background Rationale"
The cproj functions capture the spirit of the mathematical mapping onto
the complex plane extended by a single point at infinity. They perform the
simple task of mapping any argument with an infinite part into one of two
canonical values that compare equal, mapping any other argument to itself.
The current statements in 7.3.9.5 #2 and #3 about the Riemann sphere are
incorrect. The Riemann sphere is a mathematically related topic, which may
explain its historical presence in 7.3.9.5, but the Riemann sphere is not
the subject of the cproj functions. This change removes the references to
the Riemann sphere.
This proposal requires no implementation changes.
More information about the Cfp-interest
mailing list