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: Tue, 07 Mar 2006 12:04:32 +0000
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:
This email sent to email@hidden