forked from ibphoenix/tomsfastmath
fix fp_iseven()
... this time for real
as indicated once more by @muks in #21
This commit is contained in:
parent
ae948ee4a9
commit
397d2ca9a3
@ -335,7 +335,7 @@ const char *fp_ident(void);
|
|||||||
|
|
||||||
/* zero/even/odd ? */
|
/* zero/even/odd ? */
|
||||||
#define fp_iszero(a) (((a)->used == 0) ? FP_YES : FP_NO)
|
#define fp_iszero(a) (((a)->used == 0) ? FP_YES : FP_NO)
|
||||||
#define fp_iseven(a) (((a)->used == 0 && (((a)->dp[0] & 1) == 0)) ? FP_YES : FP_NO)
|
#define fp_iseven(a) (((a)->used == 0 || (((a)->dp[0] & 1) == 0)) ? FP_YES : FP_NO)
|
||||||
#define fp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? FP_YES : FP_NO)
|
#define fp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? FP_YES : FP_NO)
|
||||||
|
|
||||||
/* set to a small digit */
|
/* set to a small digit */
|
||||||
|
Loading…
Reference in New Issue
Block a user