NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/52269: ctan(1+1000i) is incorrect
>Number: 52269
>Category: lib
>Synopsis: ctan(1+1000i) is incorrect
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 02 19:30:00 +0000 2017
>Originator: coypu
>Release: NetBSD 7.99.75
>Organization:
>Environment:
NetBSD loggy 7.99.75 NetBSD 7.99.75 (GENERIC) #61: Fri Jun 2 10:34:58 IDT 2017 fly@loggy:/home/fly/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
#include <complex.h>
#include <math.h>
#include <stdio.h>
int main() {
printf("%f\n", ctan(1 + 1000*I));
}
$ gcc test2.c -lm
$ ./a.out
nan
expected: a number.
>How-To-Repeat:
Run R testsuite.
>Fix:
problem lies in using trigonometric functions which overflow in arg>=710.5 (some correctly)
maybe private taylor expansion is needed.
Home |
Main Index |
Thread Index |
Old Index