Some fun with π in Julia

π via inline assembly instructions

Julia provides a very low-level llvmcall interface, which allows the user to directly write LLVM intermediate representation, including the use of inline assembly. The following snippet calls the fldpi instruction (“floating point loadpi”) which loads the constant π onto the floating point register stack (this works only on x86 and x86_64 architectures)