RE: Doing floating point calculations in kernel space

2 messages, 2 authors, 2003-10-17 · open the first message on its own page

RE: Doing floating point calculations in kernel space

From: ARIBAUD Albert <hidden>
Date: 2003-10-17 12:16:58

-----Message d'origine-----
De : owner-linuxppc-embedded@lists.linuxppc.org
[mailto:owner-linuxppc-embedded@lists.linuxppc.org]De la part de Toni
Van Remortel
Envoyé : vendredi 17 octobre 2003 09:16
À : Linuxppc-Embedded
Objet : Doing floating point calculations in kernel space



Hi all,

When I thought it was a /proc problem, it was a float problem.
The CPU (405GP) has no FPU, but I need to calculate sin and cos in a
kernel module.
Hmm... Bit off-topic, but why not use tables tailored to the
precision you need (if you want to compute any sin or cas any time)
or the equivalent of the Bresenham algorithm (if you only want to
draw arcs or ellipes) ?

HTH,

Albert.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

RE: Doing floating point calculations in kernel space

From: Toni Van Remortel <hidden>
Date: 2003-10-17 12:37:32

quoted
The CPU (405GP) has no FPU, but I need to calculate sin and cos in a
kernel module.
Hmm... Bit off-topic, but why not use tables tailored to the
precision you need (if you want to compute any sin or cas any time)
or the equivalent of the Bresenham algorithm (if you only want to
draw arcs or ellipes) ?
Currently, the floating point problem is solved. I'm not going to use
default sin and cos, because they are darn too slow.
Lookuptables are way to inaccurate for the application (the formula used
can be viewed at http://www.geniaal.be/), but I'll use other faster
formula's (found a PDF from a Playstation programmer :)

Tnx for the comment.
--
                           Toni Van Remortel
              Wetenschappelijk Medewerker - D-science lab
  Real time Linux for embedded systems: http://linemb.d-sciencelab.com
              Tel: +32 3 205 61 72 - Fax: +32 3 205 61 95
                      E-mail: t.vanremortel@ha.be


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help