Why does this algorithm yield an 'incorrect' result?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
The following code yields cumul_total = 2.000000000026658e+05 . What is the '26658' on the end? Why does this occur?
Thank you
A = (0.2);
cumul_total = (0.0);
for iii = 1:1e6
cumul_total = cumul_total + A;
end
cumul_total
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!