GeneralCreating logarithm tables automatically

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Creating logarithm tables automatically

Post by dmuthu_cse »

Hello friends,

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Creating logarithm tables automatically

Post by gmedina »

Hi, Muthu

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

Code, edit and compile here:
\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}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1,1,2,3,5,8,13,21,34,55,89,144,233,...
dmuthu_cse
Posts: 97
Joined: Fri Sep 04, 2009 4:56 pm

Re: Creating logarithm tables automatically

Post by dmuthu_cse »

Thanks Gmedina for quick help.

It is much useful to me.

Regards,
Muthu
Post Reply