Rev 804 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 804 | Rev 1031 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | /** Subtract two float32 numbers with same signs |
33 | /** Subtract two float32 numbers with same signs |
34 | */ |
34 | */ |
35 | float32 subFloat32(float32 a, float32 b) |
35 | float32 subFloat32(float32 a, float32 b) |
36 | { |
36 | { |
37 | int expdiff; |
37 | int expdiff; |
38 | __u32 exp1, exp2, frac1, frac2; |
38 | uint32_t exp1, exp2, frac1, frac2; |
39 | float32 result; |
39 | float32 result; |
40 | 40 | ||
41 | result.f = 0; |
41 | result.f = 0; |
42 | 42 | ||
43 | expdiff = a.parts.exp - b.parts.exp; |
43 | expdiff = a.parts.exp - b.parts.exp; |
Line 144... | Line 144... | ||
144 | /** Subtract two float64 numbers with same signs |
144 | /** Subtract two float64 numbers with same signs |
145 | */ |
145 | */ |
146 | float64 subFloat64(float64 a, float64 b) |
146 | float64 subFloat64(float64 a, float64 b) |
147 | { |
147 | { |
148 | int expdiff; |
148 | int expdiff; |
149 | __u32 exp1, exp2; |
149 | uint32_t exp1, exp2; |
150 | __u64 frac1, frac2; |
150 | uint64_t frac1, frac2; |
151 | float64 result; |
151 | float64 result; |
152 | 152 | ||
153 | result.d = 0; |
153 | result.d = 0; |
154 | 154 | ||
155 | expdiff = a.parts.exp - b.parts.exp; |
155 | expdiff = a.parts.exp - b.parts.exp; |