🦋 109. 42 via the cubes

In the recent days, you might have seen the calculation that leads to getting an exact value of 42, the answer of Life, the Universe and Everything. Let me copy it here, using the power of Perl 6 and its arbitrary precision arithmetics , not to mention the coolness of using superscripts directly in the code.

$ time perl6 -e'say 80435758145817515³ - 80538738812075974³ + 12602123297335631³'
real 0m0.151s
user 0m0.173s
sys 0m0.035s

One thought on “🦋 109. 42 via the cubes”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s