projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altoslib: Correctly save firmware version in AltosState
[fw/altos]
/
src
/
math
/
ef_rem_pio2.c
diff --git
a/src/math/ef_rem_pio2.c
b/src/math/ef_rem_pio2.c
index f1191d09f82850926f15ab39b8bec89549db4ad2..3e58f8091079fc9b9a298f7588f25f418a342ebb 100644
(file)
--- a/
src/math/ef_rem_pio2.c
+++ b/
src/math/ef_rem_pio2.c
@@
-142,7
+142,7
@@
pio2_3t = 6.1232342629e-17; /* 0x248d3132 */
fn = (float)n;
r = t-fn*pio2_1;
w = fn*pio2_1t; /* 1st round good to 40 bit */
fn = (float)n;
r = t-fn*pio2_1;
w = fn*pio2_1t; /* 1st round good to 40 bit */
- if(n<32&&(ix&
0xffffff00)!=npio2_hw[n-1]) {
+ if(n<32&&(ix&
(__int32_t)0xffffff00)!=npio2_hw[n-1]) {
y[0] = r-w; /* quick check no cancellation */
} else {
__uint32_t high;
y[0] = r-w; /* quick check no cancellation */
} else {
__uint32_t high;