Ask Your Question
0

Unexpected Answer for an Equation

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

usamrf gravatar image

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

Thank you Bruno.

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

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

Thank you.

usamrf gravatar imageusamrf ( 2016-05-01 23:04:18 +0100 )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

Stats

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

Seen: 353 times

Last updated: Apr 28 '16