1 |
On Fri, 2006-06-09 at 10:56 -0700, Bob Sanders wrote: |
2 |
> If your file system driver is calculating where to place the beginning of a |
3 |
> file or where to link the tail of one record to the head or the following |
4 |
> record, one digit mis-calculation could have a bad consequence. And way, |
5 |
> way back in the bad old PDP-11 days, file systems did use FP. I'd |
6 |
> guess a few modern ones might be using it today. |
7 |
|
8 |
Blocks, offsets, inodes, and pointers (addresses) are all "integers", so |
9 |
why would one use floating point? Anyway, floating point is not allowed |
10 |
in the Linux kernel, and drivers are part of the kernel. |
11 |
|
12 |
> |
13 |
> |
14 |
> Also, most financial transactions require a minimum of 4 digits to the right |
15 |
> of the decimal place. Again, a single digit error can cause some folks to |
16 |
> get very, very upset. |
17 |
|
18 |
http://en.wikipedia.org/wiki/Floating_point#Accuracy.2C_and_misconceptions_thereof |
19 |
"...financial software tends not to use a binary floating-point number |
20 |
representation. The "decimal" data type of the C# and Java programming |
21 |
languages, and the IEEE 854 standard, are designed to avoid the problems |
22 |
of binary floating point, and make the arithmetic always behave as |
23 |
expected when numbers are printed in decimal." |
24 |
|
25 |
--- Vladimir |
26 |
|
27 |
-- |
28 |
Vladimir G. Ivanovic <vgivanovic@×××××××.net> |
29 |
-- |
30 |
gentoo-amd64@g.o mailing list |