This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/5044] printf doesn't take the rounding mode into account
- From: "rsa at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 16 Apr 2008 14:20:25 -0000
- Subject: [Bug libc/5044] printf doesn't take the rounding mode into account
- References: <20070919134419.5044.vincent+libc@vinc17.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rsa at us dot ibm dot com 2008-04-16 14:20 -------
You can skirt the libm dependency by using the internal glibc macros _FPU_GETCW
and _FPU_SETCW. On architectures which have hardware rounding mode, like x86_64
and powerpc64 it'll access the rounding mode directly in the registers (cw
register and FPSCR register respectively).
On architectures without a hardware rounding mode it'll use the rounding mode
that is already stored in the glibc thread-local-storage.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=5044
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.