Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: re:locating the natural log of a number


From   "Victor M. Zammit" <[email protected]>
To   <[email protected]>
Subject   Re: st: re:locating the natural log of a number
Date   Sun, 1 Apr 2007 13:15:51 +0100

I am just trying to understand what goes on in the process of finding the
natural log of a number by rewriting a small proram myself
Victor M.Zammit
----- Original Message ----- 
From: "Richard Williams" <[email protected]>
To: <[email protected]>
Sent: Sunday, April 01, 2007 1:16 AM
Subject: Re: st: re:locating the natural log of a number


> At 05:24 PM 3/31/2007, Victor M. Zammit wrote:
> >Dear Statalist,
> >
> >I am trying to write a program to locate the natural log of any number
> >between 1 and 22026.
> >
> >In this specific case I am trying the number 22000 but I am having
trouble
> >with the error
> >
> >sign "obs. out of range" as I try to get to the exact natural log of the
> >number in question.
> >
> >Can any one give me any suggestions as to how to handle the problem.
>
> I don't understand why you are not just using the ln function, e.g.
>
> . display ln(22000)
> 9.9987977
>
>
> Having said that, your code ran fine for me.  The last few lines of output
were
>
> . di `h'
> 9.9034901
>
> .
> . di 2.718281828^`h'
> 20000.05
>
>
>
> -------------------------------------------
> Richard Williams, Notre Dame Dept of Sociology
> OFFICE: (574)631-6668, (574)631-6463
> HOME:   (574)289-5227
> EMAIL:  [email protected]
> WWW:    http://www.nd.edu/~rwilliam
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index