--- mp.w.orig	Fri Jun 27 06:57:43 2014
+++ mp.w	Tue Sep 02 22:54:17 2014
@@ -704,7 +704,7 @@
 @d decr(A)   (A)=(A)-1 /* decrease a variable by unity */
 @d negate(A) (A)=-(A) /* change the sign of a variable */
 @d double(A) (A)=(A)+(A)
-@d odd(A)   ((A)%2==1)
+@d odd(A)   (abs(A)%2==1)
 
 @* The character set.
 In order to make \MP\ readily portable to a wide variety of
--- mpmath.w.orig	Tue Mar 11 20:33:25 2014
+++ mpmath.w	Tue Sep 02 22:48:36 2014
@@ -1681,7 +1681,7 @@
 @d one_eighty_deg 01320000000 /* $180\cdot2^{20}$, represents $180^\circ$ */
 @d three_sixty_deg 02640000000 /* $360\cdot2^{20}$, represents $360^\circ$ */
 
-@d odd(A)   ((A)%2==1)
+@d odd(A)   (abs(A)%2==1)
 
 @ Compute a multiple of the sine and cosine
 
--- mpmathbinary.w.orig	Tue Apr 08 22:57:26 2014
+++ mpmathbinary.w	Tue Sep 02 22:54:39 2014
@@ -589,7 +589,7 @@
 
 @ 
 
-@d odd(A)   ((A)%2==1)
+@d odd(A)   (abs(A)%2==1)
 
 @c
 int mp_number_to_int(mp_number A) {
--- mpmathdecimal.w.orig	Wed Apr 09 13:47:38 2014
+++ mpmathdecimal.w	Tue Sep 02 22:54:58 2014
@@ -759,7 +759,7 @@
 
 @ 
 
-@d odd(A)   ((A)%2==1)
+@d odd(A)   (abs(A)%2==1)
 
 @c
 int mp_number_to_int(mp_number A) {
--- mpmathdouble.w.orig	Tue Mar 11 20:33:25 2014
+++ mpmathdouble.w	Tue Sep 02 22:55:18 2014
@@ -1196,7 +1196,7 @@
 @d one_eighty_deg (180.0*angle_multiplier)
 @d three_sixty_deg (360.0*angle_multiplier)
 
-@d odd(A)   ((A)%2==1)
+@d odd(A)   (abs(A)%2==1)
 
 @ Compute a multiple of the sine and cosine
 
