General ⇒ Creating logarithm tables automatically
-
- Posts: 97
- Joined: Fri Sep 04, 2009 4:56 pm
Creating logarithm tables automatically
I need to create logirthm and antilogrithm tables. And is there any code to generate the logirthm and antilogrithm table automatically.
Expecting your suggestions and solutions.
Regards,
Muthu
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Creating logarithm tables automatically
you could use the fp package (for floating point operations) and a loop (using the ifthen or multido packages, for example). A little example that calculates the natural logarithm of integer values 1<=t<=1000:
Code: Select all
\documentclass{article}\usepackage{fp}\usepackage{ifthen}\setlength\parindent{0pt}% the counter for the loop\newcounter{mycount}% the command that stores logarithms\newcommand\natlogoft\begin{document}\whiledo{\value{mycount}<1000}{\stepcounter{mycount}\makebox[4em]{\themycount}% steps the counter and typesets the value of t\FPln{\natlogoft}{\themycount}\natlogoft\\}% calculates Ln(t) and typsets it\end{document}
-
- Posts: 97
- Joined: Fri Sep 04, 2009 4:56 pm
Re: Creating logarithm tables automatically
It is much useful to me.
Regards,
Muthu