Blogger Template by Blogcrowds


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 load pi”) which loads the constant π onto the floating point register stack (this works only on x86 and x86_64 architectures)


grupoed2k@localhost ~]# Source:  http://julialang.org/blog/2017/03/piday

Entrada más reciente Entrada antigua Página principal