! File TLHYPERBOLIC.TEXT provides test vectors for
! NCEG functions cosh, sinh, tanh, acosh, asinh, atanh.
! <scp> 01/08/02 reworked cases depending on Extended80 format.
!
!
! Tests of sinh(x) = x + x^3/3! + x^5/5! + ...
!
! NANs
3y	=d	Q	0	OK	Q
3y	=d	-Q	0	OK	-Q
! Infinities
3y	=d	H	0	OK	H
3y	=d	-H	0	OK	-H
! sinh of 0 is 0 with the same sign
3y	=d	0	0	OK	0
3y	=d	-0	0	OK	-0
!
! sinh(tiny) is tiny + noise.
! <scp> Disabled <0e and >0e variants, since function is computed round-nearest always.
3y	=d	E	0	x	E
3y	=d	Ei1	0	x	Ei1
3y	=d	Ep1	0	x	Ep1
3y	=d	Ep1i3	0	x	Ep1i3
3y	=d	Ed2	0	ux	Ed2
3y	=d	Ep1d5	0	x	Ep1d5
3y	=d	0i1	0	ux	0i1
3y	=d	0i9	0	ux	0i9
!
! sinh(-tiny) is -tiny - noise.
3y	=d	-E	0	x	-E
3y	=d	-Ei1	0	x	-Ei1
3y	=d	-Ep1	0	x	-Ep1
3y	=d	-Ep1i3	0	x	-Ep1i3
3y	=d	-Ed2	0	ux	-Ed2
3y	=d	-Ep1d5	0	x	-Ep1d5
3y	=d	-0i1	0	ux	-0i1
3y	=d	-0i9	0	ux	-0i9
!
! sinh(+large) overflows (positive)
3y	=d	1p14	0	ox	H
3y	=d	Hm1	0	ox	H
!
! sinh(-large) overflows (negative)
3y	=d	-1p14	0	ox	-H
3y	=d	-Hm1	0	ox	-H
!
!
!
! Tests of cosh(x) = 1 + x^2/2! + x^4/4! + ...
!
! NANs
3x	=d	Q	0	OK	Q

! <scp> 3x	e	-Q	0	OK	-Q
3x	=d	-Q	0	OK	Q

! Infinities
3x	=d	H	0	OK	H
3x	=d	-H	0	OK	H
! cosh(0) = 1
3x	=d	0	0	OK	1
3x	=d	-0	0	OK	1
! cosh(tiny) is 1 + noise
3x	=d	E	0	x	1
3x	=d	Ei1	0	x	1
3x	=d	Ep1	0	x	1
3x	=d	Ep1i3	0	x	1
3x	=d	Ed2	0	x	1
3x	=d	Ep1d5	0	x	1
3x	=d	0i1	0	x	1
3x	=d	0i9	0	x	1

! cosh(-tiny) is 1 + noise
3x	=d	-E	0	x	1
3x	=d	-Ei1	0	x	1
3x	=d	-Ep1	0	x	1
3x	=d	-Ep1i3	0	x	1
3x	=d	-Ed2	0	x	1
3x	=d	-Ep1d5	0	x	1
3x	=d	-0i1	0	x	1
3x	=d	-0i9	0	x	1

!
! cosh of small values crossing the threshold of + or -2^(-26)
3x	=d	1m26	0	x	1
3x	=d	-1m26	0	x	1
3x	=d	1m25	0	x	1i2
3x	=d	-1m25	0	x	1i2
3x	=d	1m24	0	x	1i8
3x	=d	-1m24	0	x	1i8

!
! cosh(huge) overflows (positive)
3x	=d	1p14	0	ox	H
3x	=d	Hm1	0	ox	H
!
! cosh(-huge) overflows (positive)
3x	=d	-1p14	0	ox	H
3x	=d	-Hm1	0	ox	H
!
!
! Tests of tanh(x) = x - x^3/3 + 2*x^5/15 - ...
!
! NANs
3z	=d	Q	0	OK	Q
3z	=d	-Q	0	OK	-Q
! Infinities yield + or -1
3z	=d	H	0	OK	1
3z	=d	-H	0	OK	-1
! tanh of 0 is 0 with the same sign!
3z	=d	0	0	OK	0
3z	=d	-0	0	OK	-0
!
! tanh(tiny) is tiny - noise.
3z	=d	E	0	x	E
3z	=d	Ei1	0	x	Ei1
3z	=d	Ep1	0	x	Ep1
3z	=d	Ep1i3	0	x	Ep1i3
3z	=d	Ed2	0	ux	Ed2
3z	=d	Ep1d5	0	x	Ep1d5
3z	=d	0i1	0	ux	0i1
3z	=d	0i9	0	ux	0i9
!
! tanh(-tiny) is -tiny + noise.
3z	=d	-E	0	x	-E
3z	=d	-Ei1	0	x	-Ei1
3z	=d	-Ep1	0	x	-Ep1
3z	=d	-Ep1i3	0	x	-Ep1i3
3z	=d	-Ed2	0	ux	-Ed2
3z	=d	-Ep1d5	0	x	-Ep1d5
3z	=d	-0i1	0	ux	-0i1
3z	=d	-0i9	0	ux	-0i9
!
! tanh(huge) yields +1
3z	=d	1p14	0	x	1
3z	=d	Hm1	0	x	1
!
! tanh(-huge) yields -1
3z	=d	-1p14	0	x	-1
3z	=d	-Hm1	0	x	-1
!
!
!
! Tests of acosh(x)
!
! NANs
3u	=d	Q	0	OK	Q
3u	=d	-Q	0	OK	-Q
! acosh(+INFINITY) returns +INFINITY
3u	=d	H	0	OK	H
! acosh(1) returns 0
3u	=d	1	0	OK	0
! acosh(x) returns a NaN and signals invalid for x < 1
3u	=d	1d1	0	i	Q
3u	=d	1m1	0	i	Q
3u	=d	E	0	i	Q
3u	=d	Ed1	0	i	Q
3u	=d	0i7	0	i	Q
3u	=d	0i1	0	i	Q
3u	=d	0	0	i	Q
3u	=d	-0	0	i	Q
3u	=d	-0i1	0	i	Q
3u	=d	-0i7	0	i	Q
3u	=d	-Ed1	0	i	Q
3u	=d	-E	0	i	Q
3u	=d	-1m1	0	i	Q
3u	=d	-1i1	0	i	Q
3u	=d	-Hd1	0	i	Q
3u	=d	-H	0	i	Q
! some midrange cases (to nearest only)
3u	=d	1p16	0	x	$4002BC8939774AEC7147-1
3u	=d	1p32	0	x	$4003B6FDA8B7905DF579
!
!
!
! Tests of asinh(x)
!
! NANs
3v	=d	Q	0	OK	Q
3v	=d	-Q	0	OK	-Q
! asinh(x) returns x when x is infinite
3v	=d	H	0	OK	H
3v	=d	-H	0	OK	-H
! asinh(x) returns x when x is zero
3v	=d	0	0	OK	0
3v	=d	-0	0	OK	-0
! asinh(x) returns x - noise when x is positive and tiny (< 2^(-32))
3v	=d	Ei1	0	x	Ei1
3v	=d	Ep1	0	x	Ep1
3v	=d	Ep1i3	0	x	Ep1i3
3v	=d	Ed2	0	ux	Ed2
3v	=d	0i1	0	ux	0i1
3v	=d	0i9	0	ux	0i9

! asinh(x) returns x + noise when x is negative and tiny in magnitude (< 2^(-32))
3v	=d	-Ei1	0	x	-Ei1
3v	=d	-Ep1	0	x	-Ep1
3v	=d	-Ep1i3	0	x	-Ep1i3
3v	=d	-Ed2	0	ux	-Ed2
3v	=d	-Ep1d5	0	x	-Ep1d5+2
3v	=d	-0i1	0	ux	-0i1
3v	=d	-0i9	0	ux	-0i9

! some midrange cases for asinh(to nearest only)
! <scp> 3v	=e	1m16	0	x	$3FEEFFFFFFFFD5555555+1
4v	=d	0x3ef00000	0x00000000	0x0	0x0	x	0x3eefffff	0xfffaaaab
! <scp> 3v	=e	-1m16	0	x	$BFEEFFFFFFFFD5555555+1
4v	=d	0xbef00000	0x00000000	0x0	0x0	x	0xbeefffff	0xfffaaaab
3v	=d	1p16	0	x	$4002BC89397752EC7147
3v	=d	-1p16	0	x	$C002BC89397752EC7147
3v	=d	1p32	0	x	$4003B6FDA8B7905DF579
3v	=d	-1p32	0	x	$C003B6FDA8B7905DF579
!
!
!
! Tests of atanh(x) = x + x^3/3 + x^5/5 + ... for abs(x) <= 1
!
! NANs
3w	=d	Q	0	OK	Q
3w	=d	-Q	0	OK	-Q
! Infinities are invalid
3w	=d	H	0	i	Q
3w	=d	-H	0	i	Q
! atanh of 0 is 0 with the same sign!
3w	=d	0	0	OK	0
3w	=d	-0	0	OK	-0
! atanh(x) is invalid if abs(x) > 1
3w	=d	1i1	0	i	Q
3w	=d	-1i1	0	i	Q
3w	=d	1i3	0	i	Q
3w	=d	-1i3	0	i	Q
3w	=d	2d1	0	i	Q
3w	=d	-2d1	0	i	Q
3w	=d	Hm1	0	i	Q
3w	=d	-Hm1	0	i	Q
3w	=d	Hd1	0	i	Q
3w	=d	-Hd1	0	i	Q
!
! atanh(tiny) is tiny + noise.
3w	=d	E	0	x	E
3w	=d	Ei1	0	x	Ei1
3w	=d	Ep1	0	x	Ep1
3w	=d	Ep1i3	0	x	Ep1i3
3w	=d	Ed2	0	ux	Ed2
3w	=d	Ep1d5	0	x	Ep1d5
3w	=d	0i1	0	ux	0i1
3w	=d	0i9	0	ux	0i9
!
! atanh(-tiny) is -tiny - noise.
3w	=d	-E	0	x	-E
3w	=d	-Ei1	0	x	-Ei1
3w	=d	-Ep1	0	x	-Ep1
3w	=d	-Ep1i3	0	x	-Ep1i3
3w	=d	-Ed2	0	ux	-Ed2
3w	=d	-Ep1d5	0	x	-Ep1d5
3w	=d	-0i1	0	ux	-0i1
3w	=d	-0i9	0	ux	-0i9
!
! atanh(1) yields +inf with divide-by-zero
3w	=d	1	0	z	H
!
! atanh(-1) yields -inf with divide-by-zero
3w	=d	-1	0	z	-H
