Re: A float point arithmetic in kernel extension
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Sorry darwin-dev@, I wasn't quite paying attention there... :-( On 7 Mar 2006, at 12:04, Graham J Lee wrote: Cheers, _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com 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. 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/leeg% 40teaching.physics.ox.ac.uk This email sent to leeg@teaching.physics.ox.ac.uk smime.p7s
participants (1)
-
Graham J Lee