From: Peter Williams <peterw@aurema.com>
To: VINOD GOPAL <vinod_gopal74@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: arithmetic functions for linux driver
Date: Thu, 18 Mar 2004 10:21:05 +1100 [thread overview]
Message-ID: <4058DD61.3070308@aurema.com> (raw)
In-Reply-To: <20040317175939.75460.qmail@web60705.mail.yahoo.com>
VINOD GOPAL wrote:
> Hi,
> I am new to linux world and this mailing list.
>
> I need to use the arithmetic functions like sin, cos,
> exp, log, etc in linux device driver.
>
> On search read , not to use libm from kernel driver
> as it will harm the fpu registers.
>
> Do you have any insight how to support these
> functions in linux driver or any code that is
> available which I can make use of?
I'd recommend using fixed denominator rational numbers to represent real
numbers and polynomial approximations for the transcendental functions.
We do this in our EBS scheduler patches and it seems to be successful.
The main downside to this approach is the limited range (and
precision) of values that can be represented so you need to have a clear
idea of the likely values at various stages of your calculations.
The "Handbook of Mathematical Functions" by Abramowitz and Stegun, Dover
Publications, New York ISBN 486-61272-4 (LCN 65-12253) is a good source
of methods for approximating functions.
If you'd like more detailed assistance don't hesitate to ask.
Peter
--
Dr Peter Williams, Chief Scientist peterw@aurema.com
Aurema Pty Limited Tel:+61 2 9698 2322
PO Box 305, Strawberry Hills NSW 2012, Australia Fax:+61 2 9699 9174
79 Myrtle Street, Chippendale NSW 2008, Australia http://www.aurema.com
next prev parent reply other threads:[~2004-03-17 23:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-17 10:44 Linux 2.4.25, nfs client hangs when talking to a MacOS nfs server Charles-Edouard Ruault
2004-03-17 16:58 ` Trond Myklebust
2004-03-17 17:41 ` Charles-Edouard Ruault
2004-03-17 17:41 ` Charles-Edouard Ruault
2004-03-17 17:41 ` Charles-Edouard Ruault
2004-03-17 17:59 ` arithmetic functions for linux driver VINOD GOPAL
2004-03-17 18:11 ` John Bradford
2004-03-17 18:15 ` VINOD GOPAL
2004-03-17 18:50 ` Richard B. Johnson
2004-03-17 20:27 ` John Bradford
2004-03-17 18:17 ` Chris Friesen
2004-03-17 18:36 ` Richard B. Johnson
2004-03-17 23:21 ` Peter Williams [this message]
2004-03-17 18:01 ` Re: Linux 2.4.25, nfs client hangs when talking to a MacOS nfs server Chris Croswhite
2004-03-17 18:16 ` Trond Myklebust
2004-03-17 19:28 ` Charles-Edouard Ruault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4058DD61.3070308@aurema.com \
--to=peterw@aurema.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod_gopal74@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.