Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: I have got both (!) results in the same binary on NetBSD (gcc 4.8.5).
tan(1.57079632679489611) = 1978937966095219.000000 tan(0x1.921fb54442d16p+0) = 0x1.c1f559a01adccp+50 tan(1.57079632679489611) = 1978945885716843.000000 tan(0x1.921fb54442d16p+0) = 0x1.c1f5cfa3105acp+50 Seems the first result is calculated at compile time while the second result is calculated at run time. On OpenBSD (gcc 4.2.1): tan(1.57079632679489611) = 1978945885716843.000000 tan(0x1.921fb54442d16p+0) = 0x1.c1f5cfa3105acp+50 tan(1.57079632679489611) = 1978945885716843.000000 tan(0x1.921fb54442d16p+0) = 0x1.c1f5cfa3105acp+50 On Linux (gcc 7.2.0) and FreeBSD (clang 4.0.0): tan(1.57079632679489611) = 1978937966095219.000000 tan(0x1.921fb54442d16p+0) = 0x1.c1f559a01adccp+50 tan(1.57079632679489611) = 1978937966095219.000000 tan(0x1.921fb54442d16p+0) = 0x1.c1f559a01adccp+50 ---------- Added file: https://bugs.python.org/file47245/tan_pi2.c _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31630> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com