Ask Your Question

Unexpected Answer for an Equation

asked 2016-04-28 13:53:00 -0500

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 07:47:37 -0500 )edit

Thank you Bruno.

usamrf gravatar imageusamrf ( 2016-05-01 16:05:03 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-04-28 15:37:15 -0500

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 16:04:18 -0500 )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 13:52:10 -0500

Seen: 70 times

Last updated: Apr 28 '16