Link | lp_math_log |
Author | Bil Corry |
Category | Math |
Version | 8.x |
License | Public Domain |
Posted | 03 Dec 2005 |
Updated | 23 Dec 2005 |
More by this author... |
Returns the natural log of a number. Optionally can choose any base.
Requires [lp_math_e]
loop: 20; loop_count ' '; lp_math_log: loop_count, 2; '
'; /loop; Returns: 1 0.00000000000000000000000000000000 2 1.00000000000000000000000000000000 3 1.58496250072115630000000000000000 4 2.00000000000000000000000000000000 5 2.32192809488736220000000000000000 6 2.58496250072115610000000000000000 7 2.80735492205760420000000000000000 8 3.00000000000000000000000000000000 9 3.16992500144231260000000000000000 10 3.32192809488736260000000000000000 11 3.45943161863729780000000000000000 12 3.58496250072115650000000000000000 13 3.70043971814109220000000000000000 14 3.80735492205760370000000000000000 15 3.90689059560851870000000000000000 16 4.00000000000000000000000000000000 17 4.08746284125034000000000000000000 18 4.16992500144231220000000000000000 19 4.24792751344358520000000000000000 20 4.32192809488736260000000000000000
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
[ define_tag:'lp_math_log', -description='Returns the natural log of a number. Optionally can choose any base.', -priority='replace', -required='decimal', -optional='base'; // http://mathforum.org/library/drmath/view/55568.html if: !(local_defined:'base'); local:'base' = lp_math_e; /if; return: lp_decimal_precisionset:(decimal:(decimal:(math_log: (decimal: #decimal))) / (decimal:(math_log: (decimal: #base)))); /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft