descriptionIn general, the transcendental functions log, sin^-1^ (arcsine), cos^-1^ (arccosine), and tan^-1^ are multiply defined. The value of log z is defined to be the one whose imaginary part lies in the range from -π (inclusive if -0.0 is distinguished, exclusive otherwise) to π (inclusive). log 0 is undefined.
The value of log z for non-real z is defined in terms of log on real numbers as
log z = log |z| + (angle z)i
where angle z is the angle of z = a · e^ib^ specified as:
angle z = b + 2πn
with -π ≤ angle z ≤ π and angle z = b + 2πn for some integer n.
With the one-argument version of log defined this way, the values of the two-argument-version of log, sin^-1^ z, cos^-1^ z, tan^-1^ z, and the two-argument version of tan^-1^ are according to the following formulæ:
log z b = (log z/log b)
sin^-1^ z = - i log (i z + (1 - z^2^)^1/2^)
cos^-1^ z = π / 2 - sin^-1^ z
tan^-1^ z = (log (1 + i z) - log (1 - i z)) / (2 i)
tan^-1^ x y = angle(x + yi)
The range of tan^-1^ x y is as in the following table. The asterisk (*) indicates that the entry applies to implementations that distinguish minus zero.
|| ||y condition||x condition||range of result r||
|| ||y = 0.0||x > 0.0||0.0||
||∗||y = + 0.0||x > 0.0||+0.0||
||∗||y = - 0.0||x > 0.0||-0.0||
|| ||y > 0.0||x > 0.0||0.0 < r < (π/2)||
|| ||y > 0.0||x = 0.0||(π/2)||
|| ||y > 0.0||x < 0.0||(π/2) < r < π||
|| ||y = 0.0||x < 0||π||
||∗||y = + 0.0||x < 0.0||π||
||∗||y = - 0.0||x < 0.0||-π||
|| ||y < 0.0||x < 0.0||-π < r < - (π/2)||
|| ||y < 0.0||x = 0.0||-(π/2)||
|| ||y < 0.0||x > 0.0||-(π/2) < r< 0.0||
|| ||y = 0.0 x = 0.0 undefined
||∗||y = + 0.0||x = +0.0||+0.0||
||∗||y = - 0.0||x = + 0.0||- 0.0||
||∗||y = + 0.0||x = - 0.0||π||
||∗||y = - 0.0||x = - 0.0||-π||
||∗||y = + 0.0||x = 0||(π/2)||
||∗||y = - 0.0||x = 0||-(π/2)||
In general, the transcendental functions log, sin^-1^ (arcsine), cos^-1^ (arccosine), and tan^-1^ are multiply defined. The value of log z is defined to be the one whose imaginary part lies in the range from -π (inclusive if -0.0 is distinguished, exclusive otherwise) to π (inclusive). log 0 is undefined.
The value of log z for non-real z is defined in terms of log on real numbers as
log z = log |z| + (angle z)i
where angle z is the angle of z = a · e^ib^ specified as:
angle z = b + 2πn
with -π ≤ angle z ≤ π and angle z = b + 2πn for some integer n.
With the one-argument version of log defined this way, the values of the two-argument-version of log, sin^-1^ z, cos^-1^ z, tan^-1^ z, and the two-argument version of tan^-1^ are according to the following formulæ:
log z b = (log z/log b) [only relevant if #366 passes]
sin^-1^ z = - i log (i z + (1 - z^2^)^1/2^)
cos^-1^ z = π / 2 - sin^-1^ z
tan^-1^ z = (log (1 + i z) - log (1 - i z)) / (2 i)
tan^-1^ x y = angle(x + yi)
The range of tan^-1^ x y is as in the following table. The asterisk (*) indicates that the entry applies to implementations that distinguish minus zero.
|| ||y condition||x condition||range of result r||
|| ||y = 0.0||x > 0.0||0.0||
||∗||y = + 0.0||x > 0.0||+0.0||
||∗||y = - 0.0||x > 0.0||-0.0||
|| ||y > 0.0||x > 0.0||0.0 < r < (π/2)||
|| ||y > 0.0||x = 0.0||(π/2)||
|| ||y > 0.0||x < 0.0||(π/2) < r < π||
|| ||y = 0.0||x < 0||π||
||∗||y = + 0.0||x < 0.0||π||
||∗||y = - 0.0||x < 0.0||-π||
|| ||y < 0.0||x < 0.0||-π < r < - (π/2)||
|| ||y < 0.0||x = 0.0||-(π/2)||
|| ||y < 0.0||x > 0.0||-(π/2) < r< 0.0||
|| ||y = 0.0||x = 0.0||undefined||
||∗||y = + 0.0||x = +0.0||+0.0||
||∗||y = - 0.0||x = + 0.0||- 0.0||
||∗||y = + 0.0||x = - 0.0||π||
||∗||y = - 0.0||x = - 0.0||-π||
||∗||y = + 0.0||x = 0||(π/2)||
||∗||y = - 0.0||x = 0||-(π/2)||