mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +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:
@@ -165,8 +165,8 @@ DESCRIPTION
|
||||
config("display", int)
|
||||
|
||||
The "display" parameter specifies the maximum number of digits after
|
||||
the decimal point to be printed in real or exponential mode in
|
||||
normal unformatted printing (print, strprint, fprint) or in
|
||||
the decimal point to be printed in real, exponential or engineering
|
||||
mode in normal unformatted printing (print, strprint, fprint) or in
|
||||
formatted printing (printf, strprintf, fprintf) when precision is not
|
||||
specified. The initial value for oldstd is 20, for newstd 10.
|
||||
The parameter may be changed to the value d by either
|
||||
@@ -234,6 +234,9 @@ DESCRIPTION
|
||||
"sci"
|
||||
"exp"
|
||||
|
||||
"engineering" base 10 notation with exponent base(10e6)
|
||||
"eng" multiple of 3
|
||||
|
||||
Where multiple strings are given, the first string listed is what
|
||||
config("mode") will return.
|
||||
|
||||
|
Reference in New Issue
Block a user