Ask Your Question

Unexpected Answer for an Equation

asked 2016-04-28 20:53:00 +0200

usamrf gravatar image


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 flag offensive close merge delete


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 
B r u n o gravatar imageB r u n o ( 2016-04-29 14:47:37 +0200 )edit

Thank you Bruno.

usamrf gravatar imageusamrf ( 2016-05-01 23:05:03 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-28 22:37:15 +0200

calc314 gravatar image

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

edit flag offensive delete link more


Thank you.

usamrf gravatar imageusamrf ( 2016-05-01 23:04:18 +0200 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


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

Seen: 315 times

Last updated: Apr 28 '16