Statalist The Stata Listserver


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

st: Re: locating the natural log of a number


From   "Wallace, John" <[email protected]>
To   <[email protected]>
Subject   st: Re: locating the natural log of a number
Date   Mon, 2 Apr 2007 14:33:17 -0700

Remember that you are limited by binary math to a certain degree of
imprecision in your comparisons.  See the following FAQ:
http://www.stata.com/support/faqs/data/float.html


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

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.


> > I don't understand why you are not just using the ln function, e.g.
> >Having said that, your code ran fine for me.  The last few lines ... 

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

I was trying to pin down the exact power to which e must be raised to
get
the number in question.The bottom line seems to be  boiling down to the
exact figure and it is a matter of a number of reiterations that does
not
necessarily give me an exact figure.But this was just an experiment I
was
having fun with .

*
*   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