Modify

Opened 5 years ago

Closed 5 years ago

#7415 closed Bugs (fixed)

Wrong domain error detection of atanh for positive arguments

Reported by: Oleksii <oleksii.taran@…> Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

atanh resolves arguments >1 not as 'out of domain', but as 'positive infinity'

Sample code:

#include <boost/math/special_functions/atanh.hpp>

int main()
{
  ::boost::math::atanh(2); // should throw 'domain_error' exception, but throws 'overflow' exception
  
  return 0;
}

Patch with fix attached

Attachments (1)

boost_atanh_fix.patch (1.1 KB) - added by Oleksii <oleksii.taran@…> 5 years ago.
patch with fix

Download all attachments as: .zip

Change History (2)

Changed 5 years ago by Oleksii <oleksii.taran@…>

Attachment: boost_atanh_fix.patch added

patch with fix

comment:1 Changed 5 years ago by John Maddock

Resolution: fixed
Status: newclosed

(In [80692]) Fix atanh error handling. Add extra tests to catch above bug. Fixes #7415.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.