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
General ⇒ Creating logarithm tables automatically
Creating logarithm tables automatically
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:
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}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
-
- Posts: 97
- Joined: Fri Sep 04, 2009 4:56 pm
Re: Creating logarithm tables automatically
Thanks Gmedina for quick help.
It is much useful to me.
Regards,
Muthu
It is much useful to me.
Regards,
Muthu