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   Richard Williams <>
Subject   Re: st: re:locating the natural log of a number
Date   Sat, 31 Mar 2007 19:16:48 -0500

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)

Having said that, your code ran fine for me.  The last few lines of output were

. di `h'

. di 2.718281828^`h'

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu

*   For searches and help try:

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