Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

PSet 1.b :Please explain why I get huge log values. For instance, Python is calculating log(3) = 1.09861228867. Did any of you guys have the same problem? How can I fix this?

OpenStudy (owlfred):

Hoot! You just asked your first question! Hang tight while I find people to answer it for you. You can thank people who give you good answers by clicking the 'Good Answer' button on the right!

OpenStudy (anonymous):

Python uses log with a base of e by default (i.e.ln) , so if you were to math.log(3,10) you would get the answer you expect (the second parameter sets the base)

OpenStudy (anonymous):

OooooO! I have to change my answer lol!!!! Great question! I have forgotten so much of my maths, I assumed log(3) should equal that.

OpenStudy (anonymous):

I've been studying up on logs. How do you know that the base should be 10? The question simply asks to find the log of each prime (then sum up to prime n). It does not suggest what the base should be...

OpenStudy (anonymous):

OooooO! Now I'm starting to get it... I'm so bad at maths! So the base should be e, e being 2.72ish

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!