🦋 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³'
42
real 0m0.151s
user 0m0.173s
sys 0m0.035s

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

Leave a Reply

Your email address will not be published. Required fields are marked *

Retype the CAPTCHA code from the image
Change the CAPTCHA codeSpeak the CAPTCHA code