fogbound.net




Fri, 24 May 2013

Javascript approximation for Pi

— SjG @ 11:01 am

Based on this tweet, I now have the ultimate JavaScript approximation for Pi (Π), which I think we can all agree is preferable in every way to the outmoded Math.PI:

var pi=((++[+[]][+[]]+[]+ ++[+[]][+[]]+[])* ++[+[]][+[]])*(++[+[]][+[]]+ ++[+[]][+[]])/((+[+[]]+'x'+(![]+[])[[+!+[]+!+[]]*[+!+[]+!+[]]])/(++[+[]][+[]]+ ++[+[]][+[]]));