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:
3
zmath.h
3
zmath.h
@@ -594,7 +594,8 @@ E_FUNC void zredcpower(REDC *rp, ZVALUE z1, ZVALUE z2, ZVALUE *res);
|
||||
#define MODE_OCTAL 6
|
||||
#define MODE_BINARY 7
|
||||
#define MODE_REAL_AUTO 8
|
||||
#define MODE_MAX 8
|
||||
#define MODE_ENG 9
|
||||
#define MODE_MAX 9
|
||||
#define MODE2_OFF (MODE_MAX+1)
|
||||
|
||||
/* XXX - perhaps we need the MODE_REAL_AUTO vs MODE_REAL as a config mode? */
|
||||
|
Reference in New Issue
Block a user