- #1
JakeD
- 15
- 0
Hi,
First of all, if this is wrong forum, I apologize; please direct me to the correct one.
I have 4 * 8-byte integers, representing 2 rational numbers (i.e. 2 pairs of a nominator & a denominator).
The 2 rational numbers have the same mathematical value, but different nominator & denominator components.
E.g. 7/50, 21/150.
I cast the numbers to doubles (8-byte floating number), and then divide the pairs of the casted nominator/denominators.
Is it guaranteed that the result is the same among the 2 division operations, for arbitrary integers?
The following assumptions may be made:
1. The nominator & denominator are whole numbers, representable by less than 50 bits.
2. The denominator is larger or equal to the nominator.
Regards
First of all, if this is wrong forum, I apologize; please direct me to the correct one.
I have 4 * 8-byte integers, representing 2 rational numbers (i.e. 2 pairs of a nominator & a denominator).
The 2 rational numbers have the same mathematical value, but different nominator & denominator components.
E.g. 7/50, 21/150.
I cast the numbers to doubles (8-byte floating number), and then divide the pairs of the casted nominator/denominators.
Is it guaranteed that the result is the same among the 2 division operations, for arbitrary integers?
The following assumptions may be made:
1. The nominator & denominator are whole numbers, representable by less than 50 bits.
2. The denominator is larger or equal to the nominator.
Regards