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?
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
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.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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!
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)
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.
Not the answer you are looking for? Search for more explanations.
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...
OooooO! Now I'm starting to get it... I'm so bad at maths! So the base should be e, e being 2.72ish