Accueil › Forums › Programmation WIMS › Programmation d’exercices OEF › Arrondi d'un réel › Reply To: Arrondi d'un réel
There are several options,
I choose ‘scienceprint’
\text{A=wims(exec scienceprint 1234.56789999,3,0)}
\text{B=wims(exec scienceprint 1234.56789999,3,1)}
\text{C=wims(exec scienceprint 1234.56789999,3,2)}
\text{D=wims(exec scienceprint 1234.56789999,3,3)}
\text{E=wims(exec scienceprint 1234.56789999,3,4)}
A=1.23*10^3
B=1.23×10<sup>3</sup>
C=1.23 \times 10^{3}
D=1.23 k
E=<math xmlns= »http://www.w3.org/1998/Math/MathML » display= »inline »><mstyle id= »wims_mathml » mathsize= »110% »><mn>1.23</mn><mo>×</mo><msup><mn>10</mn><mn>3</mn></msup></mstyle></math>
kind regards,
joke
######from scienceprinc.c #########
WIMS usage:
sci_num = !exec scienceprint number,significance,type
number: a number
significance : desired precision
type (optional args): calc = 0 / html = 1 / latex = 2 / prefix = 3 / mathml = 4
default : calc notation : 120000,3 -> 1.20*10^5
type = 0 : calc notation : 120000,3,0 -> 1.20*10^5
type = 1 : html notation : 120000,3,1 -> 1.20×10<sup>5</sup>
type = 2 : latex notation : 120000,3,2 -> 1.20 \times 10^{5}
type = 3 : prefix-notation : 120000,3,3 -> 120.0 k
type = 3 : if -24 > prefix > 24 -> type = 1 (html)
type = 4 : mathml notation
multiple conversion: use space between arguments
scienceprint 120000,4 122900,5 120036,6,3 –> 120.0*10^3,122.90*10^3,120.036 k
24 yotta Y
21 zetta Z
18 exa E
15 peta P
12 tera T
9 giga G
6 mega M
3 kilo k
2 hecto h
1 deca da
-1 deci d
-2 centi c
-3 milli m
-6 micro µ
-9 nano n
-12 pico p
-15 femto f
-18 atto a
-21 zepto z
-24 yocto y