Summary: | fmod() inconsistently sets errno on domain error | ||
---|---|---|---|
Product: | glibc | Reporter: | Michael Kerrisk <mtk.manpages> |
Component: | math | Assignee: | Andreas Jaeger <aj> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | glibc-bugs |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Attachments: | test program |
Description
Michael Kerrisk
2008-07-30 12:29:26 UTC
Created attachment 2849 [details] test program See also http://sourceware.org/bugzilla/show_bug.cgi?id=6783 sample runs showing problem. Note that EDOM is set in one case, but not the other. $ /tmp/mt_fmod -- inf 1 errno == 0 fetestexcept() says: FE_INVALID fmod(inf,1.00000000000000000e+00)=nan 0 FE_INVALID nan $ /tmp/mt_fmod -- 1 0 errno == EDOM fetestexcept() says: FE_INVALID fmod(1.00000000000000000e+00,0.00000000000000000e+00)=nan EDOM FE_INVALID nan This bug was fixed in glibc 2.10. The man page is updated for man-pages-2.37. |