Package park :: Package util :: Module formatnum

Module formatnum

source code

Format numbers nicely for printing.

format_uncertainty_pm uses value +/- uncertainty

format_uncertainty_compact uses value(uncertainty)

format_uncertainty uses the default style, which is format_uncertainty_compact.

Functions
 
format_uncertainty_pm(value, uncertainty)
Given a value and an uncertainty, return a string representation.
source code
 
format_uncertainty_compact(value, uncertainty)
Given a value and an uncertainty, return a concise string representation.
source code
 
format_uncertainty(value, uncertainty)
Given a value and an uncertainty, return a concise string representation.
source code
Function Details

format_uncertainty_pm(value, uncertainty)

source code 

Given a value and an uncertainty, return a string representation.

The returned string uses only the number of digits warranted by the uncertainty in the measurement.

format_uncertainty_compact(value, uncertainty)

source code 

Given a value and an uncertainty, return a concise string representation.

The returned string uses only the number of digits warranted by the uncertainty in the measurement.

format_uncertainty(value, uncertainty)

source code 

Given a value and an uncertainty, return a concise string representation.

The returned string uses only the number of digits warranted by the uncertainty in the measurement.