Why (float) 1.11111111 = 1.11111116 in C #?

Why (float) 1.11111111 = 1.11111116 in C #

+3
source share
2 answers

Since float is NOT the exact meaning: Wikipedia explains this to a large extent. Also make sure you watch Jon Skeet videos from around 6:00 AM to 10:00 AM. In short: use floats / doubles for continuous decimals / integers , etc. for discrete values.

+2
source

7- ; , , .

:

Epsilon , float, . , .

, double 15-16 . , , 10 (, ), decimal.

+10

All Articles