Messages in this thread | | | Date | Tue, 4 Aug 1998 13:38:43 +0200 (CEST) | From | Geert Uytterhoeven <> | Subject | Re: floating-point abuse in 2.1.113 |
| |
On Tue, 4 Aug 1998, Mikael Pettersson wrote: > - frequency = (frequency / 16.0) * 100; /* massage data a bit */ > + frequency = (frequency * 100) / 16; /* massage data a bit */
Shouldn't these be rounded, i.e.
frequency = (frequency * 100 + 8) / 16;
?
Greetings,
Geert
-- Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/ Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |