Re: logs and antilogs
- Posted by Juergen Luethje <jluethje at gmx.de> Oct 26, 2002
- 506 views
Kat wrote: > I have been looking all over the net for a formula to calculate logs and > antilogs for any given number, but turned up zip. Can anyone suggest a > formula? I'm not sure if it got you right, maybe this is what you are looking for: type positive_not_1 (object x) if atom(x) and x > 0 then return x != 1 end if return 0 end type global function log_any (positive_not_1 b, object x) -- general log() function -- logarithm for base b and number (or sequence) x -- in : b: real number > 0 and != 1 -- x: real number > 0 (or sequence of such numbers) -- out: real number return log(x)/log(b) end function ? log_any(2, 32) Regards, Juergen