Re: Float numbers in module programming

From: Peter Williams
Date: Fri Mar 31 2006 - 06:02:41 EST


Olivier Galibert wrote:
On Thu, Mar 30, 2006 at 01:46:20PM -0500, linux-os (Dick Johnson) wrote:
Yeah. The correct word was irrational, which is its definition. The
point was that one can do a lot of very accurate work on real numbers
without using the FP unit and the decimal system.

As long as you don't use sin/cos (oops, no 3D, no polar coordinates,
no FFT), sqrt (oops no lenghts), pi (oops no non-polygonal surfaces)
or ln/exp (oops, a lot of things are gone there).

Working with rationals is not that realistic nowadays except in things
like mathematica, maple and friends. Fixed-point though is still very
realistics, it's just a different precision/scale tradeoff than fp,
and one you control.

Fixed point is a special case of rational i.e. with a fixed denominator.

Peter
--
Peter Williams pwil3058@xxxxxxxxxxxxxx

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/