anonymous
  • 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?
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
Owlfred
  • 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!
anonymous
  • 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)
anonymous
  • 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.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • 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...
anonymous
  • 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

Looking for something else?

Not the answer you are looking for? Search for more explanations.