Many decimal fractions cannot be represented exactly in binary. The fix is to round the number. Try this
int DecimalPart = 10000 * (Value - IntegerPart + 0.00005);
Pete
Many decimal fractions cannot be represented exactly in binary. The fix is to round the number. Try this
int DecimalPart = 10000 * (Value - IntegerPart + 0.00005);
Pete