My three latest post all deal with doing math on numbers too large to represent as a standard floating point number.
The first post, The code that didn’t break, starts the series that I wrote naively, then realized it shouldn’t work, then saw that it did work. I learned that Python’s math.log correctly handles large integers for which numpy.log would throw an exception. The post also shows that Python will gladly let you request a floating point number it can’t represent, without giving a warning.
The second post in the series looks at how you would calculate log(1000!) without a software as clever as math.log, and how you could calculate it with no software at all.
The most recent post looks at why calculating cos(200!) is harder than calculating log(200!).
I also wrote a post that doesn’t fall into the math-with-big-numbers theme: Enumerating trees and circles. There is a one-to-one correspondence between rooted trees and ways to arrange non-overlapping circles, and you can see this correspondence as a sort of visual pun.
No posts

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.