Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: 69.99 != 69.99
Date: Sun, 23 Aug 2015 15:44:11
Message-Id: mrcpnp$4et$1@ger.gmane.org
In Reply to: Re: [gentoo-user] 69.99 != 69.99 by Alan McKinnon
1 On 2015-08-22, Alan McKinnon <alan.mckinnon@×××××.com> wrote:
2
3 [regarding floating point comparison.]
4
5 > A good way to demonstrate just how problematic floats can be is to point
6 > out that floats are banned in the linux kernel for exactly this reason.
7 > Integers only.
8
9 Really? The reason that I was given when I wanted to use FP in a
10 kernel module is that handing context switching for FP hardware is
11 much simpler/faster if you assume no FP operations in the kernel.
12 Nobody ever mentioned the comparison "problem" or other typical FP
13 computation stumbles -- the decision was supposedly based on the
14 complications of handing FP hardware context switches.
15
16 --
17 Grant