That's an urdan myth.
It used be said that 2/2 was .999999 but it rounded it up.
That's not true.
Quoting from the book "Logic and Computer Design Fundamentals - 2nd Edition Updated", by M.Morris Mano & Charles R. Kime,
The floating point number has two parts, one containing the sign of the number and a fraction (some-times called a mantissa) and the other designating the position of the radix point in the number and called the exponent.
For example the decimal number +6132.789 is represented in floating-point notation as :
Code:Fraction Exponent +6.132789 + 04
Only the fraction adn the exponent are physically represented in computer registers; radix 10 and the decimal point of the fracion are assumed and are not shown explicitly. A floating-point binary number is represented in a similar manner, except that it uses radix 2 for the exponent.
For example, the binary number + 1001.11 is represented with an 8-bit fraction and 6-bit exponent as :
Code:Fraction Exponent 01001110 000100
So that which you refer to as a fraction, is actually just the number itself, without the decimal point.
There is no rounding.
I believe this issue with VB not comparing correctly is a different problem completely.




Reply With Quote