I was reading an article from Microsoft regarding Widening Conversions and Option Strict Onan article from Microsoft regarding Widening Conversions and Option Strict On when I got to the part
"The following conversions may lose precision:
Integer to Single
Long to Single or Double
Decimal to Single or Double
However, these conversions do not lose information or magnitude."
The following conversions may lose precision:
- Integer to Single
- Long to Single or Double
- Decimal to Single or Double
However, these conversions do not lose information or magnitude.
.. but according to another article regarding data types,
Integer type can store from -2.147.483.648 a 2.147.483.647 and
Single type can store from
1,401298E-45 to 3,4028235E+38 for positive numbers , and
-3,4028235E + 38 to - 1,401298E-45 for negative numbers
Integer type can store from -2.147.483.648 to 2.147.483.647 and
Single type can store from
- 1,401298E-45 to 3,4028235E+38 for positive numbers,
- and -3,4028235E+38 to - 1,401298E-45 for negative numbers
.. so Single can store much more numbers than Integer. I couldn't understand in what situation such conversion from Integer to Single may lose precision. Could someone explain, please?