Re: A float point arithmetic in kernel extension
Re: A float point arithmetic in kernel extension
- Subject: Re: A float point arithmetic in kernel extension
- From: Graham J Lee <email@hidden>
- Date: Wed, 8 Mar 2006 09:59:30 +0000
Sorry darwin-dev@, I wasn't quite paying attention there... :-(
On 7 Mar 2006, at 12:04, Graham J Lee wrote:
On 7/3/06 05:53, wlq wrote:
I am building one kernel extension for my device and I need do
some float point arithmetic.
The problem is,
In my code, I have added header file
#include <math.h>
And I have called some float point function pow(float, float), acos
(float) etc.
Actually, pow() and acos() take double arguments, though there are
float equivalents.
How precise and over how much of a range do you need your results?
You could get away with fixed-point arithmetic or a lookup table in
some circumstances (though don't wire down a 250MB lookup table;
I'm speaking as a Spectrum[*] programmer :-). You don't need even
'float'-level precision for some tasks.
Cheers,
Graham.
[*]TS 1000, transatlantic brethren (and sistren)
--
Graham Lee
UNIX Systems Manager,
Oxford Physics Practical Course
http://users.ox.ac.uk/~wadh1342
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40teaching.physics.ox.ac.uk
This email sent to email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden