Ticket #4228 (closed bug: fixed)
atanh (-1) returns NaN instead of -Infinity
| Reported by: | sbroadhead | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.0.1 |
| Component: | Prelude | Version: | 6.12.1 |
| Keywords: | Cc: | ghc@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Incorrect result at runtime | Difficulty: | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
According to the man page for libc's atanh:
If x is +1 or -1, a pole error occurs, and the functions return HUGE_VAL, HUGE_VALF, or HUGE_VALL, respectively, with the mathematically correct sign.
atanh 1 correctly returns Infinity, but atanh (-1) returns NaN instead of -Infinity. A C program compiled on the same system gives the correct result.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

