File: sigunits

package info (click to toggle)
wims 2%3A4.29a%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 185,704 kB
  • sloc: xml: 366,687; javascript: 120,570; ansic: 62,341; java: 62,170; sh: 7,744; perl: 3,937; yacc: 3,217; cpp: 1,915; lex: 1,805; makefile: 1,084; lisp: 914; pascal: 601; python: 520; php: 318; asm: 7
file content (16 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

slib_title=Make a representation of a physical quantity with a given number of significative digits
slib_parms=4\
1m, physical quantity\
3, number of significative digits\
 , optional: order of magnitude of the digit before the decimal dot; only valid if the quantity is dimensionless, just a number with no unit.\
 , optional: the desired physical unit to show (possibly a multiple or sub-multiple).
slib_out=the physical quantity with the right number of digits, or a numeric value which would be equal to the result with the right number of digits.
slib_comment=the default means: 1 meter with three significative digits. The last example shows how the numeric value may lack some trailing zeros after the dot.<p><b>Known bug:</b><br/>if the third parameter is used, the output may have a wrong syntax. Ensure that the resulting number has its decimal dot near its significant digits.
slib_example=1.2345A,2\
1.2V,5\
12,3\
12,3,4\
0.50A.h\
1800C,3,,A.h\
1.8,5,,rad