Ticket #6171 (closed Bugs: fixed)
nonconforming behavior of inverse functions on branch cuts
|Reported by:||Richard B. Kreckel <kreckel@…>||Owned by:||johnmaddock|
|Milestone:||To Be Determined||Component:||math|
The inverse trigonometric and hyperbolic functions in boost/math treat signed zero incorrectly. The positions of the branch cuts are right, but C99 specifies to "map a cut so the function is continuous as the cut is approached coming around the finite endpoint of the cut in a counter clockwise direction" and so does C++11.
Here are some examples of failures:
- asin(-1.75-0.0*I) returns -1.5708+1.1588*I (should be -1.5708-1.1588*I)
- acos(-1.25+0.0*I) returns +3.1416+0.6932*I (should be +3.1416-0.6932*I)
- atan(-0.0-1.75*I) returns +1.5708-0.6496*I (should be -1.5708-0.6496*I)
- asinh(+0.0+1.5*I) returns -0.9624+1.5708*I (should be +0.9624+1.5708*I)
- acosh(-2.5+0.0*I) returns +1.5668-3.1416*I (should be +1.5668+3.1416*I)
- atanh(-2.0-0.0*I) returns -0.5493+1.5708*I (should be -0.5493-1.5708*I)
I'm attaching a patch.
- Status changed from new to closed
- Resolution set to fixed