Re: A float point arithmetic in kernel extension
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On 8 Mar 2006, at 02:39, wlq wrote: This all presupposes that you *need* to be using the kernel for this... [*]which is indeed how a NeXT would have done it, only in hardware. -- Graham Lee GPG Key ID: 01D5B9D8 UNIX Systems Manager, Oxford Physics Practical Course http://users.ox.ac.uk/~wadh1342 01865 273450 _______________________________________________ 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 I want to calculate gamma curve in kernel extension. Now that you can do with some lookup tables[*], and using fixed-point (i.e. integers). Given that a "gamma" curve has a single parameter gamma, and maps luminosity to input signal via a power law (L=x^gamma give or take a constant), we can rearrange this stuff: L=exp(gamma*log(x)) where the log is natural (i.e. base e). You can do tables for log and exp; that's all our computers used to do when they were salaried staff. The error on your final answer is proportional to the accuracy of your lookups/interpolations. smime.p7s
participants (1)
-
Graham J Lee