Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Internal floating point formats used by 80387, IEEE 754 and C . . . . . (was Re: What does 80387 have to do with IEEE 754 issues? It's moot.)
- Date: Wed, 26 Jul 2006 23:47:26 +0200
- From: Botond Botyanszki <tlug@example.com>
- Subject: Re: [tlug] Internal floating point formats used by 80387, IEEE 754 and C . . . . . (was Re: What does 80387 have to do with IEEE 754 issues? It's moot.)
- References: <20060726125907.GH5111@example.com> <20060726103316.5fd3a597.jep200404@example.com> <20060726183402.20fcd99a@example.com> <20060726130746.0649e5d5.jep200404@example.com> <20060726193827.6d287ebb@example.com> <20060726151621.5fc61f34.jep200404@example.com>
On Wed, 26 Jul 2006 15:16:21 -0400 Jim <jep200404@example.com> wrote: > If a program can use a FPU, the program will _likely_ use the > same floating point format as the FPU, so as to not have to support > two formats, to simplify the code and maintainance. > So, that a FPU supports IEEE 754, is an indication (not a guarantee) > that the C program probably also uses IEEE 754 to handle floating > point numbers outside the FPU (i.e., when stored in memory). Theoretically I agree with you. In practice it would be unlikely as wikipedia and even the glibc manual[1] says: "Modern computers implement the IEEE 754 standard for numerical computations" > > printf is a libc call and is not doing any floating point operations > > either. > > That depends on how the library is implemented. > > It is very possible for printf to use floating point operations > in the conversion of a binary floating point number to > decimal floating point number for output. Format string conversions mostly use shifts and other simple operations[2]. Even if the conversion used a floating point operation during the process, it wouldn't have any effect on the output in case the underlying floating point representation would differ. [1] http://www.gnu.org/software/libc/manual/html_node/Floating-Point-Numbers.html#Floating-Point-Numbers [2] http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/libc/stdio-common/printf_fp.c?rev=1.56.2.2&content-type=text/plain&cvsroot=glibcAttachment: signature.asc
Description: PGP signature
- Follow-Ups:
- Re: [tlug] Internal floating point formats used by 80387, IEEE 754 and C . . . . .
- From: Stephen J. Turnbull
- References:
- [tlug] issues with format of double (or IEEE754)
- From: Michal Hajek
- Re: [tlug] issues with format of double (or IEEE754)
- From: Jim
- Re: [tlug] issues with format of double (or IEEE754)
- From: Botond Botyanszki
- [tlug] What does 80387 have to do with IEEE 754 issues? It's moot. (was Re: issues with format of double (or IEEE754))
- From: Jim
- Re: [tlug] What does 80387 have to do with IEEE 754 issues? It's moot. (was Re: issues with format of double (or IEEE754))
- From: Botond Botyanszki
- [tlug] Internal floating point formats used by 80387, IEEE 754 and C . . . . . (was Re: What does 80387 have to do with IEEE 754 issues? It's moot.)
- From: Jim
Home | Main Index | Thread Index
- Prev by Date: [tlug] Portability of Misaligned Data Access . . . . . . . (was Re: issues with format of double (or IEEE754))
- Next by Date: Re: [tlug] open source software for project management?
- Previous by thread: [tlug] Internal floating point formats used by 80387, IEEE 754 and C . . . . . (was Re: What does 80387 have to do with IEEE 754 issues? It's moot.)
- Next by thread: Re: [tlug] Internal floating point formats used by 80387, IEEE 754 and C . . . . .
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links