lkml.org 
[lkml]   [2004]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How to use floating point in a module?
On Sun, 30 May 2004 ndiamond@despammed.com wrote:

>
> Yes, if we use a real-time Linux and make a daemon cooperate very closely
> with the driver.
>
> >Maybe you could use lookup tables instead of doing floating point
> >arithmetic.
>
> You might be right, if the device can only be controlled to position itself
> in say 1,000 different ways, then we could have lookup tables for 1,000
> different intervals of (emulations of) floating-point numbers, that yield
> 1,000 different values of sin. Another table for cos, another for log10,
> etc. But I'd still have to write my own emulations for binary operators
> such as +, /, etc., since a 1,000*1,000 lookup table would be too big.

Why not scaled longs (or bigger), scalled to number of significant
digits. The Taylor series for the trig functions might be a painfull.

Ian

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.062 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site