Ask Your Question
0

Unexpected Answer for an Equation

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

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

Thank you Bruno.

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

1 answer

Sort by ยป oldest newest most voted
0

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

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

Seen: 71 times

Last updated: Apr 28 '16