diff options
author | bde <bde@FreeBSD.org> | 2005-12-03 07:38:35 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2005-12-03 07:38:35 +0000 |
commit | 7aaf0755d7de77c7044d1b1d0bac2dc4d57a5ead (patch) | |
tree | 1009ca5e1b2fffe19f88b347297c125a58f00e30 /lib/libc/net/ascii2addr.c | |
parent | 2e834acd9c22a16214cd4778d549130f052dee8b (diff) | |
download | FreeBSD-src-7aaf0755d7de77c7044d1b1d0bac2dc4d57a5ead.zip FreeBSD-src-7aaf0755d7de77c7044d1b1d0bac2dc4d57a5ead.tar.gz |
Simplified the fix in rev.1.3. Instead of using long double for
TWO52[sx] to trick gcc into correctly converting TWO52[sx]+x to double
on assignment to "double w", force a correct assignment by assigning
to *(double *)&w. This is cleaner and avoids the double rounding
problem on machines that evaluate double expressions in double
precision. It is not necessary to convert w-TWO52[sx] to double
precision on return as implied in the comment in rev.1.3, since
the difference is exact.
Diffstat (limited to 'lib/libc/net/ascii2addr.c')
0 files changed, 0 insertions, 0 deletions