Skip to content

RedPointyJackson/PrettyNumber.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PrettyNumber

Build Status

Let Julia decide how to print your numbers. No more boilerplate or ugly dumps!

Before:

julia> val1 = 8595.0
julia> val2 = 1.0e-5
julia> println("ρ = $val1 ± $val2")
ρ = 8595.0 ± 1.0e-5

Awful! Now:

julia> using PrettyNumber
julia> val1 = 8595.0
julia> val2 = 1.0e-5
julia> prettyprint("ρ = $val1 ± $val2")
ρ = 8595 ± 110⁻⁵

Gorgeous! Check the test directory to see more examples.

Provided functions:

  • prettify(str) Return a nicer version of the string str.
  • prettyprint(str) Just println(prettify(str)).

About

Println numbers like a pro

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages