Obfuscated factorial
Vito De Tullio
vito.detullio at gmail.com
Sun Oct 27 03:28:21 EDT 2013
Joshua Landau wrote:
> Python already supports the factorial operator, -ⵘ.
why use ⵘ (TIFINAGH LETTER AYER YAGH) when you can have the BANG? 방 (HANGUL
SYLLABLE BANG)
> You just have to
> import it.
>
> # Import statement
> ⵘ = type("",(),{"__rsub__":lambda s,n:(lambda f,n:f(f,n))(lambda
> f,z:round((2.5066282746310002*(z+0j+7.5)**(z+0.5)*2.718281828459045**(-
z-7.5)*(0.99999999999980993+676.5203681218851/(z+1)-1259.1392167224028/(z+2)+771.32342877765313/(z+3)-176.61502916214059/(z+4)+12.507343278686905/(z+5)-0.13857109526572012/(z+6)+9.9843695780195716e-6/(z+7)+1.5056327351493116e-7/(z+8))).real)if
> z>=0.5 else
> 3.141592653589793/(__import__("math").sin(3.141592653589793*z)*f(f,1-
z)),n)})()
I'm really, really impressed!
--
By ZeD
More information about the Python-list
mailing list