mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Add engineering output mode
Similar to scientific mode, engineering mode also displays numbers in base 10 exponential notation, with the difference that exponents are always multiples of 3, to facilitate the interpretation in terms of SI prefixes. The mode is activated in config thru "engineering" or "eng. For base and base2, it uses the special value 1000.
This commit is contained in:
@@ -44,6 +44,9 @@ DESCRIPTION
|
||||
"sci"
|
||||
"exp"
|
||||
|
||||
1000 "engineering" base 10 notation with exponent
|
||||
"eng" multiple of 3
|
||||
|
||||
For convenience, any non-integer value is assumed to mean base 10
|
||||
fractions and any integer >= 2^64 is assumed to mean base 10
|
||||
scientific notation.
|
||||
@@ -76,7 +79,7 @@ LINK LIBRARY
|
||||
int math_setmode(int newmode)
|
||||
|
||||
NOTE: newmode must be one of MODE_DEFAULT, MODE_FRAC, MODE_INT,
|
||||
MODE_REAL, MODE_EXP, MODE_HEX, MODE_OCTAL, MODE_BINARY
|
||||
MODE_REAL, MODE_EXP, MODE_ENG, MODE_HEX, MODE_OCTAL, MODE_BINARY
|
||||
|
||||
SEE ALSO
|
||||
base2, config, str
|
||||
|
Reference in New Issue
Block a user