Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

ISO,IEC 10967-3 standard.Language independent arithmetic

.pdf
Скачиваний:
24
Добавлен:
23.08.2013
Размер:
453.11 Кб
Скачать

Working draft

ISO/IEC WD 10967-3.1:2001(E)

csc(z) = 1= sin(z)

csc(x) = ~ csch(~ x) = ~ csch( ~ x) csc(~ y) = ~ csch( y) = ~ csch(y)

csc(x +~ y) = ~ csch( y +~ x) = ~ csch(y ~ x)

The csci(F ) operation:

csci(F ) : i(F ) ! i(F ) [ funder ow; over ow; in nitaryg csci(F )(^ y) = negi(F )(^ cschF (y))

The cscc(F ) approximation helper function:

cscc(F ) : C ! C

cscc(F )(z) returns a close approximation to csc(z) in C with maximum error max error tanc(F ).

Further requirements on the cscc(F ) approximation helper function are:

cscc(F )(conj(z)) = conj(cscc(F )(z)) cscc(F )( z) = cscc(F )(z)

The relationship to the cscF and cschF for real-valued operations shall be:

if z 2 C if z 2 C

approximation helper functions in an associated library

csc

(x) = csc

(x)

 

if x

2 R

c(F )

 

 

 

F

 

 

 

 

 

csc

(~

 

y) =

~

 

csch

(y)

if y

2 R

c(F )

 

 

 

 

F

 

 

The cscc(F ) operation:

cscc(F ) : c(F ) ! c(F ) [ funder ow; over ow; in nitary; absolute precision under owg

cscc(F )(x +^ y)

 

 

 

 

 

 

 

 

= result

(csc

(x +~

 

y); nearestF )

c(F )

c(F )

 

 

 

 

 

 

 

 

 

if x +^ y 2 c(F ) and jxj 6 big

 

angle

 

rF and

 

 

 

 

 

 

 

 

 

(x 6= 0 or y 6= 0)

= in nitary((+1) +^ (+1))

 

 

 

if x = 0 and y = 0

= conj c(F )(cscc(F )(x +^ 0))

 

 

 

if y = 0

= negF (cscc(F )(0 +^ negF (y)))

 

 

 

if x = 0 and y 6= 0

= mulF ( 0; sinF (x)) +^ mulF (divF ( 1; y); cosF (x))

= radc(F )(x +^ y)

 

if y 2 f1; +1g

 

otherwise

5.3.2.8 Radian arc sine

NOTE 1 { arcsin( z) = arcsin(z) arcsin(z) = =2 arccos(z)

arcsin(conj(z)) = conj(arcsin(z)) if Im(z) 6= 0 or jRe(z)j 6 1

Arcsin(x +~ y) = ~ Arcsinh( y +~ x) = ~ Arcsinh(y ~ x)

The arcsinF !c(F ) operation: arcsinF !c(F ) : F ! c(F [ f 0g)

5.3.2 Operations for radian trigonometric elementary functions

33

ISO/IEC WD 10967-3.1:2001(E)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Working draft

 

 

arcsinF !c(F )(x)= downF ( =2) +^ negF (arccoshF (x))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (x 2 F and x > 1) or x = +1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= arcsinF (x) +^ mulF ( 0; x)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (x 2 F and jxj < 1) or x = 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= upF ( =2) +^ arccoshF (x)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (x 2 F and x 6 1) or x = 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= no

 

resultF !c(F )(x)

 

 

otherwise

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arcsini(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsini(F ) : i(F ) ! i(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsini(F )(^ y)

= ^ arcsinhF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arcsinc(F ) approximation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsin

:

C ! C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsin

(z) returns a close approximation to arcsin(z) in

C

with maximum error max

 

error

 

sin

 

.

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

Further requirements on the arcsinc(F ) approximation helper function are:

 

 

 

 

 

 

 

 

 

arcsin

(conj(z)) = conj(arcsin

 

(z))

if z

 

2 C

and (Re(z)

6

1 or Im(z) = 0)

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

arcsin

(

 

z) = arcsin

 

 

(z)

 

 

 

 

 

if z

 

2 C

and (Re(z)

6

1 or Im(z) = 0)

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

6

 

 

 

 

 

 

Re(arcsin

 

 

(x)) =

 

=2

 

 

 

 

 

 

 

 

 

if x

2 R

 

and x

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Re(arcsin

 

 

(x)) = =2

 

 

 

 

 

 

 

 

 

 

if x

2 R

 

and x

>

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

Im(arcsin

 

 

 

(z))

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if z

 

2 C

and Im(z)

0

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The relationship to the arcsinF , arcsinhF , and arccoshF

 

approximation helper functions in

 

 

an associated library for real-valued operations shall be:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsin

(x) = arcsin

 

(x)

 

 

 

 

 

 

 

 

if x

2 R

 

and

j

x

j 6

1

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

(~

 

y) = ~

 

 

 

 

F

 

 

 

 

 

(y)

 

 

 

 

 

if y

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsin

 

 

arcsinh

 

 

 

 

 

2 R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Im(arcsin

 

 

 

(x)) = arccosh

( x)

 

 

 

 

 

if x

2 R

 

and x

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Im(arcsin

 

 

 

(x)) = arccosh

(x)

 

 

 

 

 

if x

2 R

 

and x

>

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsin

(x) = =2 +~

 

arccosh (x)

 

 

 

if x

2 R

 

and x

>

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arcsin#

 

 

 

range limitation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsin#

(z) = max

f

upF (

 

=2); min

f

Re(arcsin

 

 

(z)); downF

( =2)

gg

+~

 

Im(arcsin

(z))

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

The arcsinc(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsinc(F ) : c(F ) ! c(F ) [ funder owg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsinc(F )(x +^ y)

 

 

 

 

 

 

 

 

 

(arcsin#

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= result

 

 

 

(x +~

 

y); nearestF )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x +^ y 2 c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= negc(F )(arcsinc(F )(0 +^ negF (y))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x = 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= conj c(F )(arcsinc(F )(x +^ 0))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= arcF (y; x) +^ (+1)

if y = 0 and x 6= 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x 2 f1; +1g and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

((y 2 F and y > 0) or y = +1)

 

 

 

 

 

 

 

= arcF (negF (y); x) +^ (1)

if x 2 f1; +1g and

34

Speci cations for imaginary and complex datatypes and operations

Working draft

 

 

ISO/IEC WD 10967-3.1:2001(E)

 

 

 

((y 2 F and y < 0) or y = 1)

 

= no

 

resultc(F )(x +^ y)

 

 

 

 

 

otherwise

NOTE 2 {

The inverse of sin is multi-valued, the real part may have any integer multiple of

2 added to it, and the result is also in the solution set. The arcsin function (returning the principal value for the inverse) branch cuts at fx j x 2 R and jxj > 1g. Thus arcsinc(F )(x + ^ 0) 6= arcsinc(F )(x +^ ( 0)) when jxj > 1.

5.3.2.9Radian arc cosine

NOTE 1 { arccos( z) = ~ arccos(z)

arccos(conj(z)) = conj(arccos(z)) if Im(z) 6= 0 or jRe(z)j 6 1 arccos(z) = =2 arcsin(z)

Arccos(x +~ y) = ~ Arccosh(x +~ y)

The arccosF !c(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccosF !c(F ) : F ! c(F [ f 0g)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccosF !c(F )(x) = 0 +^ arccoshF (x)

 

if (x 2 F and x > 1) or x = +1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= arccosF (x) +^ mulF (0; x)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (x 2 F and jxj < 1) or x = 0

 

 

 

 

 

 

 

 

= downF ( ) +^ negF (arccoshF (negF (x)))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (x 2 F and x 6 1) or x = 1

 

 

 

 

 

 

 

 

= no

 

resultF !c(F )(x)

 

otherwise

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arccosi(F )!c(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccosi(F )!c(F ) : i(F ) ! c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccosi(F )!c(F )(^ y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= nearestF ( =2) +^ negF (arcsinhF (y))

 

 

 

 

 

 

 

 

 

 

 

The arccosc(F ) approximation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccos

:

C ! C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccos

(z) returns a close approximation to arccos(z) in

C

with maximum error max

 

error

 

sin

.

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

Further requirements on the arccosc(F ) approximation helper function are:

 

arccos

(conj(z)) = conj(arccos

(z))

if z

2 C

and (

Re(z)

j 6

1 or Im(z) = 0)

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

j

 

6

 

 

 

6

 

 

 

 

Re(arccos

 

 

(x)) =

 

 

 

 

 

 

 

 

 

 

if x

2 R

 

and x

 

1

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Re(arccos

 

 

(x)) = 0

 

 

 

 

 

 

 

 

 

 

if x

2 R

 

and x

>

1

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

j 6

 

 

 

 

 

 

Im(arccos

 

 

(

 

z)) =

 

Im(arccos

 

(z)) if z

2 C

and (

Re(z)

1 or Im(z) = 0)

 

 

 

c(F )

 

 

>

 

 

 

 

 

 

 

c(F )

 

 

6

j

 

 

 

 

 

6

 

 

 

 

Im(arccos

 

 

(z))

 

0

 

 

 

 

 

 

 

 

 

 

if im(z)

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The relationship to the arccosF

and arccoshF

approximation helper functions in an associated

 

library for real-valued operations shall be:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccos

(x) = arccos

(x)

 

 

 

 

if x

2 R

 

and

x

 

 

1

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

j

j 6

 

 

 

 

 

 

 

 

 

Im(arccos

 

 

(x)) = arccosh (x)

 

 

if x

2 R

 

and x

6

 

1

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Im(arccos

 

 

(x)) =

 

arccosh (x)

 

 

if x

2 R

 

and x

>

1

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccos

(x) =

 

~

arccosh

(x)

 

 

if x

2 R

 

and x

>

1

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccos

(~

 

x0) = =2

 

~

 

arcsinh

(x0)

if x0

2 R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5.3.2 Operations for radian trigonometric elementary functions

35

ISO/IEC WD 10967-3.1:2001(E)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Working draft

arccos

(x) =

 

~

 

arccosh

(

 

x)

 

if x

2 R

and x

6

 

1

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arccos#

 

range limitation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccos#

(x +~

 

y) = min

f

Re(arccos

 

(x +~

 

y)); downF ( )

g

+~

 

Im(arccos

(x +~

 

y))

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

The arccosc(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccosc(F ) : c(F ) ! c(F [ f 0g)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccosc(F )(x +^ y)

 

 

 

 

 

(arccos#

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= result

 

 

(x +~

 

y); nearestF )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

c(F )

 

 

 

 

 

 

y

 

c(F ) and (x0

= 0 or

 

x

 

> 1)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x +^

 

2

j

j

 

 

 

 

 

= arccosF (x) +^

 

( 0)

if x0

 

 

 

 

x

 

1

 

 

6

 

 

 

 

 

 

 

 

 

 

= 0 and

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x = 0

 

j j 6

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= arccosc(F )(0 +^ y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= conj c(F )(arccosc(F )(x +^ 0))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if y = 0 and x 6= 0

 

 

 

 

 

 

 

 

 

=arcF (x; y) +^ (1) if x 2 f1; +1g and ((y 2 F and y > 0)orx'=+1)

=arcF (x; negF (y)) +^ (+1)

if x 2 f1; +1g and ((y 2 F and y < 0)orx'=1)

= no resultc(F )(x +^ y)

otherwise

NOTE 2 { The inverse of cos is multi-valued, the real part may have any integer multiple of 2 added to it, and the result is also in the solution set. The arccos function (returning the principal value for the inverse) branch cuts at fx j x 2 R and jxj > 1g. Thus arccosc(F )(x + ^ 0) 6= arccosc(F )(x +^ ( 0)) when jxj > 1.

5.3.2.10Radian arc tangent

NOTE 1 { arctan( z) = arctan(z)

arctan(conj(z)) = conj(arctan(z)) if Re(z) 6= 0 or jIm(z)j 6 1 arctan(z) = =2 arccot(z)

Arctan(x +~ y) = ~ Arctanh( y +~ x) = ~ Arctanh(y ~ x)

The arctani(F ) operation:

arctani(F ) : i(F ) ! i(F ) [ fin nitary; invalidg arctani(F )(^ y) = ^ arctanhF (y)

The arctani(F )!c(F ) operation:

arctani(F )!c(F ) : i(F ) ! c(F [ f 0g) [ fin nitaryg

arctani(F )!c(F )(^ y)

= downF ( =2) +^ negF (arccothF (negF (y)))

if (y 2 F and y < 1) or x = 1

= mulF ( 0; y) +^ arctanhF (y)

if (y 2 F and jyj 6 1) or y = 0

= upF ( =2) +^ arccothF (y)

if (y 2 F and y > 1) or x = +1 = no resultF !c(F )(^ y) otherwise

The arctanc(F ) approximation helper function:

36

Speci cations for imaginary and complex datatypes and operations

c(F )
= conj
= negc(F )

Working draft

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ISO/IEC WD 10967-3.1:2001(E)

 

 

arctan

:

C ! C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arctan

(z) returns a close approximation to arctan(z) in

C

with maximum error max

 

error

 

tan

c(F )

.

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Further requirements on the arctanc(F ) approximation helper function are:

 

 

 

 

 

 

 

 

 

 

arctan

(conj(z)) = conj(arctan

 

(z))

if z

 

2 C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arctan

(

 

z) =

 

arctan

 

 

(z)

 

 

 

if z

 

2 C

and (Re(z) < 1 or Im(z) = 0)

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

Re(arctan

 

 

(~

 

y)) =

 

=2

 

 

 

 

 

if y

 

2 R

and y > 1

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Re(arctan

 

 

(z))

0

 

 

 

 

 

 

 

 

 

 

 

if Re(z)

0)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The relationship to the arctanF , arctanhF , and arccothF

 

approximation helper functions in

 

 

an associated library for real-valued operations shall be:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arctan

(x) = arctan

(x)

 

 

 

 

 

 

if x

2 R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

(~

 

y) = ~

 

 

 

F

 

 

 

 

 

 

(y)

 

 

 

if y

 

and

 

 

 

< 1

 

 

 

 

 

 

 

 

 

 

 

arctan

 

 

arctanh

 

 

 

 

2 R

j

y

j

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Im(arctan

 

 

 

(~

 

y)) = ~

 

arccoth (y)

 

if y

 

2 R

and

j

y

j

> 1

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arctan#

 

 

 

range limitation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arctan#

(z) = max

f

upF (

 

=2); min Re(arctan

 

 

(z)); downF ( =2)

gg

+~

 

Im(arctan

 

(z))

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

f

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

The arctanc(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arctanc(F ) : c(F ) ! c(F ) [ funder ow; in nitaryg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arctanc(F )(x +^ y)

 

 

 

 

 

 

 

 

 

(arctan#

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= result

 

 

(x +~

 

y); nearestF )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x +^ y 2 c(F ) and (x 6= 0 or jyj =6 1) = in nitary(nearestF ( =4) +^ (mulF (y; +1)))

if x = 0 and jyj = 1

(arctanc(F )(0 +^ negF (y)) if x = 0

(arctanc(F )(x +^ 0))

if y = 0 and x 6= 0

= signbF (x) downF ( =2) +^ divF c(F )(1; x +^ negF (y)))

if (x 2 f 1; +1g and y 2 F [ f 1; +1g) or

(x 2 F [ f 1; +1g and y 2 f 1; +1g)

= no resultc(F )(x +^ y)

otherwise

NOTE 2 { The inverse of tan is multi-valued, the real part may have any integer multiple of 2 (even any integer multiple of ) added to it, and the result is also in the solution set. The arctan function (returning the principal value for the inverse) branch cuts at f^ y j y 2 F and jyj > 1g. Thus arctanc(F )(0 +^ y) 6= arctanc(F )(( 0) +^ y) when jyj > 1.

5.3.2.11Radian arc cotangent

NOTE 1 { arccot( z) = arccot(z)

arccot(conj(z)) = conj(arccot(z)) if Re(z) 6= 0 or jIm(z)j > 1 arccot(z) = =2 arctan(z)

Arccot(x +~ y) = ~ Arccoth( y +~ x) arccot(z) = arctan(1=z)

The arccoti(F ) operation:

5.3.2 Operations for radian trigonometric elementary functions

37

ISO/IEC WD 10967-3.1:2001(E)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Working draft

 

arccoti(F ) : i(F ) ! i(F ) [ funder ow; in nitary; invalidg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccoti(F )(^ y)

 

= ^ arccothF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arccoti(F )!c(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccoti(F )!c(F ) : i(F ) ! c(F ) [ funder ow; in nitaryg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccoti(F )!c(F )(^ y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= upF ( =2) +^ arctanhF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if (y 2 F and 1 < y and y < 0) or y = 0

 

 

 

 

 

 

 

 

 

 

 

= mulF ( 0; y) +^ arccothF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if y 2 F and jyj > 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= divF ( 1; y) +^ arccothF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if y 2 f1; +1g

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= downF ( =2) +^ arctanhF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if y 2 F and 0 6 y and y < 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= no

 

resultF !c(F )(^ y)

otherwise

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arccotc(F ) approximation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccot

:

C ! C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccot

(z) returns a close approximation to arccot(z) in

C

with maximum error max

 

error

 

tan

c(F )

.

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Further requirements on the arccotc(F ) approximation helper function are:

 

 

 

 

 

 

 

 

 

 

 

arccot

(conj(z)) = conj(arccot

 

(z))

if z

2 C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccot

(

 

z) =

 

arccot

 

 

(z)

 

 

 

 

 

if z

2 C

and (Im(z) = 0 or

j

Re(z)

j

< 1)

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

 

 

 

Re(arccot

 

 

(~

 

y)) = =2

 

 

 

 

 

 

 

 

if y

2 R

 

and 0 < y < 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Re(arccot

 

 

(z))

0

 

 

 

 

 

 

 

 

 

 

 

if Re(z)

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The relationship to the arccotF , arccothF

and arctanhF

approximation helper functions in an

 

associated library for real-valued operations shall be:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccot

(x) = arccot

(x)

 

 

 

 

 

 

 

 

if x

2 R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

(~

 

y) = ~

 

 

 

F

 

 

 

( y)

 

 

 

 

 

if y

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccot

 

 

arccoth

 

 

 

 

 

2 R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arccot#

 

 

 

range limitation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccot#

(z) = max

f

upF ( =2); min

f

Re(arccot

 

 

(z)); downF ( =2)

gg

+~

 

Im(arccot

 

(z))

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

c(F )

 

 

The arccotc(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccotc(F ) : c(F ) ! c(F [ f 0g) [ funder ow; in nitaryg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccotc(F )(x +^ y)

 

 

 

 

 

 

 

(arccot#

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= result

 

 

(x +~

 

y); nearestF )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x +^ y 2 c(F ) and (jyj =6 1 or x 6= 0) and y 6= 0

=arccotF (x) +^ ( 0) if x is not a NaN and y = 0

=negc(F )(arccotc(F )(0 +^ negF (y))

if x = 0

= conj c(F )(arccotc(F )(x +^ 0))

if y = 0 and x 6= 0

= mulF (signbF (x); 0) +^ mulF (signbF (y); 0)

if (x 2 f1; +1g and y 2 F [ f1; +1g) or (x 2 F [ f1; +1g and y 2 f1; +1g)

38

Speci cations for imaginary and complex datatypes and operations

= no resultF !c(F )(x)

Working draft

 

 

ISO/IEC WD 10967-3.1:2001(E)

 

= in nitary(downF ( =4); x) +^ (mulF (y; 1))

 

 

 

if x = 0 and jyj = 1

 

= no

 

resultc(F )(x +^ y)

 

 

 

 

 

otherwise

NOTE 2 { The inverse of cot is multi-valued, the real part may have any integer multiple of 2 (even any integer multiple of ) added to it, and the result is also in the solution set. The arccot function (returning the principal value for the inverse) branch cuts at f^ y j y 2 R and jyj < 1g. Thus arccotc(F )(0 +^ y) 6= arccotc(F )(( 0) +^ y) when jyj < 1 or y = 0.

5.3.2.12Radian arc secant

NOTE 1 { arcsec( z) = arcsec(z)

arcsec(conj(z)) = conj(arcsec(z)) if Im(z) 6= 0 or jRe(z)j > 1 arcsec(z) = =2 arccsc(z)

Arcsec(x +~ y) = ~ Arcsech(x +~ y) arcsec(z) = arccos(1=z)

The arcsecF !c(F ) operation:

arcsecF !c(F ) : F ! c(F [ f 0g) [ funder ow; in nitaryg

arcsecF !c(F )(x) = downF ( ) +^ negF (arcsechF (x))?

if (x 2 F and 0 6 x < 1)

=0 +^ arcsechF (x) if (x 2 F and 1 < x < 0)

=arcsecF (x) +^ 0 if (x 2 F and x > 1) or x = +1

=arcsecF (x) +^ ( 0) if (x 2 F and x 6 1) or x = 1

=in nitary(nearestF ( =4) +^ (+1))

if x = 0 and y = 0 otherwise

The arcseci(F )!c(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcseci(F )!c(F ) : i(F ) ! c(F ) [ funder ow; in nitaryg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcseci(F )!c(F )(^ y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= nearestF ( =2) +^ arccschF (y)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arcsecc(F ) approximation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsec

:

C ! C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsec

(z) returns a close approximation to arcsec(z) in

C

with maximum error max

 

error

 

tan

c(F )

.

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Further requirements on the arcsecc(F ) approximation helper function are:

 

 

 

 

 

 

 

 

 

 

 

arcsec

(conj(z)) = conj(arcsec

(z))

if z

2 C

and (Im(z) = 0 or

j

Re(z)

j >

1

 

 

 

 

 

 

 

c(F )

 

 

 

>

 

 

c(F )

 

 

 

 

>

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

 

Im(arcsec

 

(z))

0

 

 

 

 

if Im(z)

 

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The relationship to the arcsecF and arcsechF

approximation helper functions in an associated

 

 

library for real-valued operations shall be:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsec

(x) = arcsec

(x)

 

 

if x

2 R

 

and

x

 

 

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

j j >

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arcsec#

 

range limitation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arcsec#

(z)

= min

f

Re(arcsec

 

(z)); downF ( =2)

g

+~

 

Im(arcsec

 

(z))

 

if Re(z)

>

1

 

c(F )

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

6

 

 

 

 

 

 

= min

f

Re(arcsec

 

(z)); downF ( )

g

+~

 

Im(arcsec

 

(z))

if Re(z)

 

1

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

= arcsecc(F )(z)

 

 

otherwise

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5.3.2 Operations for radian trigonometric elementary functions

39

= arccosc(F )
= arccosc(F )

ISO/IEC WD 10967-3.1:2001(E) Working draft

The arcsecc(F ) operation:

arcsecc(F ) : c(F ) ! c(F ) [ funder ow; in nitaryg

arcsecc(F )(x +^ y)

= resultc(F )(arcsec#c(F )(x +~ y); nearestF )

if x +^ y 2 c(F ) and (x 6= 0 or y 6= 0)

= arcsecc(F )(0 +^ negF (y))

if x = 0

= conj c(F )(arcsecc(F )(x +^ 0))

if y = 0 and x 6= 0 and x 6= 0

(divF;c(F )(1; x +^ y))

if x 2 f 1; +1g and y 2 F [ f 1; +1g

(divF;c(F )(1; x +^ y))

if y 2 f 1; +1g and x 2 F [ f 1; +1g

= in nitary(nearest( =4) +^ (+1))

if y = 0 and x = 0 = in nitary(nearest(3 =4) +^ (+1))

if y = 0 and x = 0

= no resultc(F )(x +^ y)

otherwise

NOTE 2 { The inverse of sec is multi-valued, the real part may have any integer multiple of 2 added to it, and the result is also in the solution set. The arcsec function (returning the principal value for the inverse) branch cuts at fx j x 2 R and 1 < x < 1g. Thus arcsecc(F )(x +^ 0) 6= arcsecc(F )(x +^ ( 0)) when 1 < x < 1 or x = 0.

5.3.2.13Radian arc cosecant

NOTE 1 { arccsc( z) = arccsc(z)

arccsc(conj(z)) = conj(arccsc(z)) if Im(z) 6= 0 or jRe(z)j > 1 arccsc(z) = =2 arcsec(z)

Arcsec(x +~ y) = ~ Arcsech( y +~ x) arccsc(z) = arcsin(1=z)

The arccscF !c(F ) operation:

arccscF !c(F ) : F ! c(F [ f 0g) [ funder ow; in nitaryg

arccscF !c(F )(x) = arccscF (x) +^ ( 0) if (x 2 F and x > 1) or x = +1 = downF ( =2) +^ negF (arcsechF (x))??

if (x 2 F and 0 6 x 6 1) = upF ( =2) +^ arcsechF (x)??

if (x 2 F and 1 6 x < 0) or x = 0

=arccscF (x) +^ 0 if (x 2 F and x < 1) or x = 1

=in nitary(?upF ( =4) +^ (+1))

if x = 0 and y = 0 = no resultF !c(F )(x) otherwise

The arccsci(F ) operation:

arccsci(F ) : i(F ) ! i(F ) [ funder ow; in nitaryg arccsci(F )(^ y) = ^ arccschF (y)

40

Speci cations for imaginary and complex datatypes and operations

= arcsinc(F )(divF;c(F )
= arcsinc(F )(divF;c(F )

Working draft

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ISO/IEC WD 10967-3.1:2001(E)

 

The arccscc(F ) approximation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccsc

:

C ! C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccsc

(z) returns a close approximation to arccsc(z) in

C

with maximum error max

 

error

 

tan

c(F )

.

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Further requirements on the arccscc(F ) approximation helper function are:

 

 

 

 

 

 

 

 

 

 

 

arccsc

(conj(z)) = conj(arccsc

(z))

if z

2 C

and (Im(z) = 0 or

j

Re(z)

j

>

0)

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

arccsc

(

 

z) = arccsc

 

 

(z)

 

 

 

 

if z

2 C

and (Im(z) = 0 or

j

Re(z)

j

>

0)

 

 

 

 

 

 

c(F )

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

Im(arccsc

 

 

(z))

6

0

 

 

 

 

 

 

 

 

 

 

if Im(z)

 

>

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The relationship to the arccscF and arccschF

approximation helper functions in an associated

 

library for real-valued operations shall be:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccsc

(x) = arccsc (x)

 

 

 

 

 

 

 

 

 

if x

2 R

 

and x

j >

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

(~

 

y) = ~

 

 

F

 

 

 

(

 

y)

 

 

 

 

if y

 

 

 

j

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccsc

 

 

arccsch

 

 

 

 

 

2 R

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

F

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The arccsc#

 

 

 

range limitation helper function:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccsc#

(z) = max

f

upF (

 

=2); min

f

Re(arccsc

 

 

(z)); downF ( =2)

gg

+~

 

Im(arccsc

 

(z))

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

The arccscc(F ) operation:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccscc(F ) : c(F ) ! c(F [ f 0g) [ funder ow; in nitaryg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

arccscc(F )(x +^ y)

 

 

 

 

(arccsc#

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= result

 

 

 

(x +~

 

y); nearestF )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

c(F )

 

 

 

c(F )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= arccscF (x) +^ ( 0)

if x +^ y 2 c(F ) and (y 6= 0 or 0 < jxj < 1)

 

 

 

 

 

 

 

 

 

if y = 0 and jxj > 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= negc(F )(arccscc(F )(0 +^ negF (y))

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

if x = 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

= conj c(F )(arccscc(F )(x +^ 0))

if y = 0 and x 6= 0 (1; x +^ y))

if x 2 f1; +1g and y 2 F [ f1; +1g

(1; x +^ y))

if y 2 f1; +1g and x 2 F [ f1; +1g

= in nitary(?upF ( =4) +^ (1))

if x = 0 and y = 0

= no resultc(F )(x +^ y)

otherwise

NOTE 2 { The inverse of csc is multi-valued, the real part may have any integer multiple of 2 added to it, and the result is also in the solution set. The arccsc function (returning the principal value for the inverse) branch cuts at fx j x 2 R and 1 < x < 1g. Thus arccscc(F )(x +^ 0) 6= arccscc(F )(x +^ ( 0)) when 1 < x < 1 or x = 0.

5.3.3Operations for hyperbolic elementary functions

Note that the correspondences speci ed below to other ISO/IEC 10967 operations are exact, not approximate.

5.3.3 Operations for hyperbolic elementary functions

41

ISO/IEC WD 10967-3.1:2001(E)

Working draft

5.3.3.1Hyperbolic normalisation

radhF : F ! F

 

if x 2 F [ f1; 0; +1; qNaNg

radhF (x)

= x

 

= invalid(qNaN)

if x is a signalling NaN

radhi(F ) : i(F ) ! i(F ) [ funder ow; absolute

 

precision

 

under owg

 

 

radhi(F )(^ y)

= ^ radF (y)

 

 

 

 

 

radhc(F ) : c(F ) ! c(F ) [ funder ow; absolute precision under owg radhc(F )(x +^ y)

=itimesc(F )(radc(F )(y +^ negF (x)))

5.3.3.2Hyperbolic sine

NOTE { sinh( z) = sinh(z) sinh(conj(z)) = conj(sinh(z))

sinh(z +~ k 2 ) = sinh(z) if k 2 Z sinh(z) = cosh(~ =2 z)

sinh(x) = ~ sin(~ x) = ~ sin( ~ x) sinh(~ y) = ~ sin( y) = ~ sin(y)

sinh(x +~ y) = ~ sin( y +~ x) = ~ sin(y ~ x)

sinh(x +~ y) = sinh(x) cos(y) +~ cosh(x) sin(y)

The sinhi(F ) operation:

sinhi(F ) : i(F ) ! i(F ) [ funder ow; absolute precision under owg sinhi(F )(^ y) = ^ (sinF (y))

The sinhc(F ) operation:

sinhc(F ) : c(F ) ! c(F ) [ funder ow; over ow; absolute precision under owg sinhc(F )(x +^ y)

=itimesc(F )(sinc(F )(y +^ negF (x)))

5.3.3.3Hyperbolic cosine

NOTE { cosh( z) = cosh(z) cosh(conj(z)) = conj(cosh(z))

cosh(z +~ k 2 ) = cosh(z) if k 2 Z cosh(z) = sinh(~ =2 z)

cosh(x) = cos(~ x) = cos( ~ x) cosh(~ y) = cos(y)

cosh(x +~ y) = cos( y +~ x) = cos(y ~ x)

cosh(x +~ y) = cosh(x) cos(y) +~ sinh(x) sin(y)

42

Speci cations for imaginary and complex datatypes and operations