Calculation error for floor function floor(1.4/0.025)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
if x = floor(1.4/0.025) is 55 in Matlab, how does y = 1.4/0.025 is 56?
0 Commenti
Risposta accettata
Iain
il 20 Mag 2013
1.4/0.025 actually evaluates to 55.9999999999999928946.
The error is in the FIFTEENTH decimal place, which is an extremely small error, however, it is less than 56, and will "floor" to 55.
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!