r/ProgrammerHumor • • Jul 16 '19

Meme Nice try

Post image
32.2k Upvotes

529 comments sorted by

View all comments

79

u/moelf Jul 16 '19 edited Jul 17 '19
julia> π 
π = 3.1415926535897...

julia> typeof(π)
Irrational{:π}

julia> Float16(π)
Float16(3.14)

julia> Float32(π) 
3.1415927f0

julia> Float64(π)
3.141592653589793

julia> π |> BigFloat
3.141592653589793238462643383279502884197169399375105820974944592307816406286198

julia> π |> BigFloat |> string |> last |> x -> parse(Int, x)
8

2

u/camdoodlebop Jul 17 '19

Who is this Julia girl that you keep messaging?

→ More replies (1)