Ask Your Question

# Unexpected Answer for an Equation

Hello,

I am trying to calculate the following equation in SAGE.

N = 100.

p = 0.9.

r = (N /(N-1))*(ln(N)-ln(-ln(p))); r

Unfortunately, sage gives this answer 100/99*log(100) + 2.27309831041661 , which is not the expected answer !!

But, when I used google calculator, I got the expected answer, which is 6.92478536697

Please let me know what is going on.? Thank you.

edit retag close merge delete

## Comments

To add to the answer below, note that if you enter N as a floating-point number, you directly get what you want:

sage: N = 100.  # Note the '.' after '100'
sage: p = 0.9
sage: r = (N /(N-1))*(ln(N)-ln(-ln(p))); r
6.92478536697024


## 1 Answer

Sort by » oldest newest most voted

These have the same value. If you do r.n(), you will see that the answer Sage gives is equal to 6.92478536697.

more

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2016-04-28 20:52:10 +0200

Seen: 139 times

Last updated: Apr 28 '16