Accueil › Forums › Programmation WIMS › Programmation d’exercices OEF › Arrondi d'un réel
- Ce sujet contient 4 réponses, 3 participants et a été mis à jour pour la dernière fois par Yves NOEL, le il y a 9 années et 10 mois.
-
AuteurMessages
-
-
16 octobre 2013 à 12:03 #1763ColonnaParticipant::
Bonjour,
existe-t-il un moyen pour n’afficher qu’un certain nombre de chiffres significatifs (à définir par le l’enseignant) sur un réel issu d’un calcul ?
Exemple : dans un exercice de cinétique chimique, je cherche à afficher des concentrations dont les valeurs sont issues d’un calcul. Ces valeurs sont affichées avec 10 chiffres significatifs… J’aimerais me limiter à 3.
Merci d’avance !! -
16 octobre 2013 à 16:20 #1764jm.eversParticipant::
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 = 4default : 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 notationmultiple conversion: use space between arguments
scienceprint 120000,4 122900,5 120036,6,3 –> 120.0*10^3,122.90*10^3,120.036 k24 yotta Y
21 zetta Z
18 exa E
15 peta P
12 tera T
9 giga G
6 mega M
3 kilo k2 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 -
16 octobre 2013 à 16:40 #1765
-
17 octobre 2013 à 17:11 #1766
-
11 mars 2015 à 17:05 #2787
-
-
AuteurMessages
- Vous devez être connecté pour répondre à ce sujet.