Gentoo Archives: gentoo-amd64

From: Paul de Vrieze <pauldv@g.o>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] gcc 4.1 + CFLAGS
Date: Wed, 14 Jun 2006 14:34:17
Message-Id: 200606141630.45417.pauldv@gentoo.org
In Reply to: Re: [gentoo-amd64] gcc 4.1 + CFLAGS by "Hemmann
1 On Saturday 10 June 2006 00:28, Hemmann, Volker Armin wrote:
2 > On Friday 09 June 2006 23:42, Vladimir G. Ivanovic wrote:
3 > > On Fri, 2006-06-09 at 16:14 -0500, Barry.SCHWARTZ@×××××××××××××.org
4 > >
5 > > wrote:
6 > > > Enough research has gone into writing code for IEEE floating point
7 > > > that I would not try to bypass it without a good reason. It’s there
8 > > > to be your friend.
9 > >
10 > > Performance is the reason we have hardware FPUs and -ffast-math.
11 >
12 > no, ffast-math is for the case, that you
13 >
14 > a) don't need accurate results
15 >
16 > b) the FPU is not fast enough
17 >
18 >
19 > since you can't say if you need accurate math for an app you did not
20 > wrote or examined, using ffast-math is highly dangerous. And sicne the
21 > hardware gets faster on an almost monthly basis, it is even less
22 > convincing why anybody should use it.
23
24 I completely agree. The gcc info page puts it this way:
25 This option should never be turned on by any `-O' option since it
26 can result in incorrect output for programs which depend on an
27 exact implementation of IEEE or ISO rules/specifications for math
28 functions.
29
30 In short there is a very good reason it is not on by default and may never
31 be turned on by default.
32
33 Paul
34
35 --
36 Paul de Vrieze
37 Gentoo Developer
38 Mail: pauldv@g.o
39 Homepage: http://www.devrieze.net