# Why do my results show small deviations from expected values?

Table[StringForm["p=1", i], {i, 0.05, 0.5, 0.05}]
(*
{p=0.05, p=0.1, p=0.15000000000000002, p=0.2, p=0.25, p=0. 30000000000000004,
p=0.35000000000000003, p=0.4, p=0.45, p=0.5}
*)


Why do the results show small deviations from the expected numbers {..., 0.15, ..., 0.30, ...}?

-
I (kind of) translated your question this time. But the site's language is English. – Dr. belisarius Jun 29 '13 at 3:13
Thanks for translated it – Matematicoaficionado Jun 29 '13 at 3:17
I believe the fundamental reason is that with fixed precision, floating point arithmetic -- on a machine that has to translate into binary and then back into decimal -- you get machine representational error of 1/10 and then: 0.05 + 0.05 + 0.05 // FullForm gives 0.15000000000000002. – murray Jun 29 '13 at 3:21
Table[StringForm["p=1", N@i], {i, 5/100, 5/10, 5/100}]? – Dr. belisarius Jun 29 '13 at 3:35
This tutorial, which is part of overview of numbers and their forms, might be helpful explaining the  and the representation of numbers. This tutorial explains further output formats. – Michael E2 Jun 29 '13 at 15:36

Table["p=" <> ToString @ NumberForm[i, 2], {i, 0.05, 0.5, 0.05}]