Numerical precision¶
Converts a value to the specified notation and precision.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
Any
|
any type that can be converted to a float |
required |
precision
|
int
|
integer that is greater than zero |
required |
notation
|
Notation
|
string that specifies the notation to use |
'auto'
|
filler
|
str
|
string that is placed between the decimal value and 10s exponent |
'e'
|
The possible notations are:
'auto'
- selects standard notation when-1000 < value < 1000
else returns scientific notation'sci'
or'scientific'
- returns scientific notation'eng'
or'engineering'
- returns engineering notation'std'
or'standard'
- returns standard notation
Returns:
Type | Description |
---|---|
str
|
string of value with the proper precision and notation |