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'.

  1. Annex G.6.1.1, cacos
    1. cacos(-z) = pi - cacos(z)
    2. cacos(+1.0 + I*0.0) is +0.0 - I*0.0
    3. cacos(-1.0 + I*0.0) is +pi - I*0.0
    4. cacos(z) = +/-I * cacosh(z)
    5. cacos(x+I*0.0) = 0.0 - I*acosh(x) when 1 < x
    6. cacos(x+I*0.0) = acos(x) - I*0.0 when |x| <= 1
    7. cacos(x+I*0.0) = pi - I*acosh(x) when x < -1
    8. cacos(0.0+I*y) = pi/2 - I*asinh(y)
  2. Annex G.6.2.1, cacosh
    1. 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.

    2. cacosh(+1.0 + I*0.0) is +0.0 + I*0
    3. cacosh(-1.0 + I*0.0) is +0.0 + I*pi
    4. cacosh(+INF + I*0.0) is INF + I*0
    5. cacosh(-INF + I*0.0) is INF + I*pi
    6. cacosh(z) = +/-I * cacos(z)
    7. cacosh(x+I*0.0) = acosh(x) + I*0.0 when 1 < x
    8. cacosh(x+I*0.0) = 0.0 + I*acos(x) when |x| < 1
    9. cacosh(x+I*0.0) = acosh(x) + I*pi when x < -1
    10. cacosh(0.0+I*y) = asinh(y) + I*pi/2
  3. Annex G.6.2.2, casinh
    1. casinh( 0.0 + I*1.0) is 0.0 + I*pi/2
    2. casinh(z) = -I * casin( I*z )
    3. casinh(x+I*0.0) = asinh(x) + I*0.0
    4. casinh(0.0+I*y) = +0.0 + I*asin(y) when |y| <= 1
    5. casinh(0.0+I*y) = acosh(y) + I*pi/2 when 1 < y
  4. Annex G.6.2.3, catanh
    1. catanh(0.0+I*1.0) = +0.0 + I*pi/4
    2. catanh(z) = -I * catan(I*z)
    3. catanh(x+I*0.0) = atanh(x) + I*0.0 when |x| < 1
    4. catanh(x+I*0.0) = (ln((x+1)/(x-1)))/2 + I*pi/2 when 1 < x
    5. catanh(0.0+I*y) = +0.0 + I*atan(y) [implied by G.7#2]
  5. Annex G.6.2.4, ccosh
    1. ccosh(z) = ccos( I*z )
    2. ccosh(x+I*0.0) = cosh(x) + I*0.0
    3. ccosh(0.0+I*y) = cos(y) + I*0.0
  6. Annex G.6.2.5, csinh
    1. csinh(z) = -I * csin( I*z )
    2. csinh(x+I*0.0) = sinh(x) + I*0.0
    3. csinh(0.0+I*y) = 0.0 + I*sin(y)
  7. Annex G.6.2.6, ctanh
    1. ctanh(+0.0+I*NaN) is 0.0 + I*NaN (not NaN+I*NaN)
    2. 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

    3. ctanh(z) = -I * ctan( I*z )
    4. ctanh(x+I*0.0) = tanh(x) + I*0.0
    5. ctanh(0.0+I*y) = 0.0 + I*tan(y)
  8. Annex G.6.3.1, cexp
    1. cexp(x+I*0.0) = exp(x) + I*0.0
    2. cexp(0.0+I*y) = cos(y) + I*sin(y)
  9. Annex G.6.3.2, clog
    1. clog(+1.0 + I*0.0) is +0.0 + I*0.0
    2. clog(-1.0 + I*0.0) is +0.0 + I*pi
    3. clog(+/-0.0 + I*1.0) is +0.0 + I*pi/2
    4. clog(x+I*0.0) = ln(x) + I*0.0
    5. clog(0.0+I*y) = ln(y) + I*pi/2
  10. Annex G.6.4.2, csqrt
    1. csqrt(+1.0 + I*0.0) is +1.0 + I*0.0
    2. csqrt(-1.0 + I*0.0) is +0.0 + I*1.0
    3. csqrt(x+I*0.0) = sqrt(x) + I*0.0 when 0 <= x
    4. csqrt(x+I*0.0) = 0.0 + I*sqrt(-x) when x < 0
    5. csqrt(0.0+I*y) = sqrt(y)*cis(pi/4) when 0 <= y