числа-с-плавающей-точкой

How to correctly check the accuracy to tenths or hundredths?

There is a web form where there are 2 text boxes, in these text boxes the values are entered, double, I check them so that th ... e('.', ',').Trim(), out Thickness1); Double.TryParse(txbZachistkaThickness2.Text.Replace('.', ',').Trim(), out Thickness2);

Normalization of floating-point numbers

In E. Tanenbaum's book "Computer Architecture" there is a section "Appendix B. Floating-point numbers". Quote from there: ... normalization, we shift the mantissa by two hexadecimal digits to the left. After all, the second category (16-2) - nonzero.

Rounding only with a small margin of error

In the console, when dividing 0.051 / 0.017, it turns out 2.9999999999999996 (although regular calculators show "3" correctly ... s turned out as well as on the calculator? Ie so: 0.050/0.017=2.941176470588235 0.051/0.017=3 0.052/0.017=3,058823529411765