Rev 804 | Rev 834 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 804 | Rev 828 | ||
---|---|---|---|
Line 87... | Line 87... | ||
87 | 87 | ||
88 | frac1 |= FLOAT32_HIDDEN_BIT_MASK; /* add hidden bit */ |
88 | frac1 |= FLOAT32_HIDDEN_BIT_MASK; /* add hidden bit */ |
89 | 89 | ||
90 | if (exp2 == 0) { |
90 | if (exp2 == 0) { |
91 | /* second operand is denormalized */ |
91 | /* second operand is denormalized */ |
92 | --expdiff; |
92 | --expdiff; |
93 | } else { |
93 | } else { |
94 | /* add hidden bit to second operand */ |
94 | /* add hidden bit to second operand */ |
95 | frac2 |= FLOAT32_HIDDEN_BIT_MASK; |
95 | frac2 |= FLOAT32_HIDDEN_BIT_MASK; |
96 | }; |
96 | }; |
97 | 97 | ||
Line 116... | Line 116... | ||
116 | /* rounding overflow */ |
116 | /* rounding overflow */ |
117 | ++exp1; |
117 | ++exp1; |
118 | frac1 >>= 1; |
118 | frac1 >>= 1; |
119 | }; |
119 | }; |
120 | 120 | ||
- | 121 | ||
121 | if ((a.parts.exp == FLOAT32_MAX_EXPONENT ) || (a.parts.exp < exp1)) { |
122 | if ((exp1 == FLOAT32_MAX_EXPONENT ) || (exp2 > exp1)) { |
122 | /* overflow - set infinity as result */ |
123 | /* overflow - set infinity as result */ |
123 | a.parts.exp = FLOAT32_MAX_EXPONENT; |
124 | a.parts.exp = FLOAT32_MAX_EXPONENT; |
124 | a.parts.fraction = 0; |
125 | a.parts.fraction = 0; |
125 | return a; |
126 | return a; |
126 | } |
127 | } |