Annex G: Corrections and feature requests
Submitter: Fred J. Tydeman (USA)
Submission Date: 2014-09-23
Document number: WG14 N1867
Subject: Annex G: Corrections and feature requests
In the following, 'INF' should be the infinity symbol, 'pi'
should be the Greek letter pi, 'I' should be italic lower case
'i'.
- Annex G.6.1.1, cacos
- cacos(-z) = pi - cacos(z)
- cacos(+1.0 + I*0.0) is +0.0 - I*0.0
- cacos(-1.0 + I*0.0) is +pi - I*0.0
- cacos(z) = +/-I * cacosh(z)
- cacos(x+I*0.0) = 0.0 - I*acosh(x) when 1 < x
- cacos(x+I*0.0) = acos(x) - I*0.0 when |x| <= 1
- cacos(x+I*0.0) = pi - I*acosh(x) when x < -1
- cacos(0.0+I*y) = pi/2 - I*asinh(y)
- Annex G.6.2.1, cacosh
- cacosh( 0.0 + I*NaN) is NaN + I*pi/2 (not NaN + I*NaN)
Reasons: Mathematically, cacosh(0.0+I*y) = asinh(y) +
I*pi/2. Also, C requires cacos(0+I*NaN) to be pi/2+I*NAN,
which along with the mathematically identity cacosh(z) =
+/-I * cacos(z), means cacosh( 0.0 + I*NaN) is NaN +
I*pi/2.
- cacosh(+1.0 + I*0.0) is +0.0 + I*0
- cacosh(-1.0 + I*0.0) is +0.0 + I*pi
- cacosh(+INF + I*0.0) is INF + I*0
- cacosh(-INF + I*0.0) is INF + I*pi
- cacosh(z) = +/-I * cacos(z)
- cacosh(x+I*0.0) = acosh(x) + I*0.0 when 1 < x
- cacosh(x+I*0.0) = 0.0 + I*acos(x) when |x| < 1
- cacosh(x+I*0.0) = acosh(x) + I*pi when x < -1
- cacosh(0.0+I*y) = asinh(y) + I*pi/2
- Annex G.6.2.2, casinh
- casinh( 0.0 + I*1.0) is 0.0 + I*pi/2
- casinh(z) = -I * casin( I*z )
- casinh(x+I*0.0) = asinh(x) + I*0.0
- casinh(0.0+I*y) = +0.0 + I*asin(y) when |y| <=
1
- casinh(0.0+I*y) = acosh(y) + I*pi/2 when 1 < y
- Annex G.6.2.3, catanh
- catanh(0.0+I*1.0) = +0.0 + I*pi/4
- catanh(z) = -I * catan(I*z)
- catanh(x+I*0.0) = atanh(x) + I*0.0 when |x| < 1
- catanh(x+I*0.0) = (ln((x+1)/(x-1)))/2 + I*pi/2 when 1
< x
- catanh(0.0+I*y) = +0.0 + I*atan(y) [implied by
G.7#2]
- Annex G.6.2.4, ccosh
- ccosh(z) = ccos( I*z )
- ccosh(x+I*0.0) = cosh(x) + I*0.0
- ccosh(0.0+I*y) = cos(y) + I*0.0
- Annex G.6.2.5, csinh
- csinh(z) = -I * csin( I*z )
- csinh(x+I*0.0) = sinh(x) + I*0.0
- csinh(0.0+I*y) = 0.0 + I*sin(y)
- Annex G.6.2.6, ctanh
- ctanh(+0.0+I*NaN) is 0.0 + I*NaN (not NaN+I*NaN)
- ctanh(+0.0+I*INF) is 0.0 + I*NaN w/ invalid (not
NaN+I*NaN w/ invalid)
Reason for above two: Since ctanh(x+I*y) = (sinh(2x) +
I*sin(2y)) / (cosh(2x) + cos(2y)), for any rational
number y, cos(2y) cannot be exactly -1, so no 0/0, so no
NaN for the real component of the result
- ctanh(z) = -I * ctan( I*z )
- ctanh(x+I*0.0) = tanh(x) + I*0.0
- ctanh(0.0+I*y) = 0.0 + I*tan(y)
- Annex G.6.3.1, cexp
- cexp(x+I*0.0) = exp(x) + I*0.0
- cexp(0.0+I*y) = cos(y) + I*sin(y)
- Annex G.6.3.2, clog
- clog(+1.0 + I*0.0) is +0.0 + I*0.0
- clog(-1.0 + I*0.0) is +0.0 + I*pi
- clog(+/-0.0 + I*1.0) is +0.0 + I*pi/2
- clog(x+I*0.0) = ln(x) + I*0.0
- clog(0.0+I*y) = ln(y) + I*pi/2
- Annex G.6.4.2, csqrt
- csqrt(+1.0 + I*0.0) is +1.0 + I*0.0
- csqrt(-1.0 + I*0.0) is +0.0 + I*1.0
- csqrt(x+I*0.0) = sqrt(x) + I*0.0 when 0 <= x
- csqrt(x+I*0.0) = 0.0 + I*sqrt(-x) when x < 0
- csqrt(0.0+I*y) = sqrt(y)*cis(pi/4) when 0 <= y