Hello,
my question is related to displaying a certain number of decimal places and the rounding of that digit itself, and the possibility for the student to enter a number with 3 decimal places (e. g. 1,385E10). I've defined my variables as follows (ta5 is the one to be looked at):
cx: rand_with_step(0.01,0.1,0.005); /* koncentrácia NiCl2, elektrolyt */
cz: 0.02;
emnx: rand_with_step(0.5,0.6055,0.001);
emnz: 0.6053;
fox: 101.325; /* kPa */
pox: 101.325; /* kPa */
zx: 2;
tx: 25;
Tdx: 273.15;
Rx: 8.314;
Fx: 96485;
Td: tx+Tx;
vztah_emn: Ek-Ez; /* výpočet EMN */
vztah_emn2: (Eklad)-(Ezap);
vztah_dG_K: -RT*ln(K); /* výpočet ΔG∘ z K */
vztah_dG_dE: -z*F*dE; /* výpočet ΔG∘ z ΔE∘ */
vztah_K: e^(((z*F)/(R*(t+273.15)))*(EMN+((R*(t+273.15))/(2*F))*ln(4*c^3))); /* výsledný vzťah pre výpočet K a vyčíslenie K */
ta1: vztah_emn;
ta2: vztah_dG_K;
ta3: vztah_dG_dE;
ta4: vztah_K;
ta5: decimalplaces(subst([z=zx,F=Fx,t=tx,EMN=emnx,R=Rx, c=cx],vztah_K),3);
The answer for question n. 5 is a number * 10^x. Input n. 5 is set to numeric type.
So, how come I always get a number with several decimal places instead of the defined 3 in ta5? Thank you.