py/{objfloat,objcomplex}: Optimise MP_UNARY_OP_ABS by reusing variables.
diff --git a/py/objcomplex.c b/py/objcomplex.c
index e7a3c24..088ad52 100644
--- a/py/objcomplex.c
+++ b/py/objcomplex.c
@@ -124,11 +124,8 @@
         case MP_UNARY_OP_HASH: return MP_OBJ_NEW_SMALL_INT(mp_float_hash(o->real) ^ mp_float_hash(o->imag));
         case MP_UNARY_OP_POSITIVE: return o_in;
         case MP_UNARY_OP_NEGATIVE: return mp_obj_new_complex(-o->real, -o->imag);
-        case MP_UNARY_OP_ABS: {
-            mp_float_t real, imag;
-            mp_obj_complex_get(o_in, &real, &imag);
-            return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(real*real + imag*imag));
-        }
+        case MP_UNARY_OP_ABS:
+            return mp_obj_new_float(MICROPY_FLOAT_C_FUN(sqrt)(o->real*o->real + o->imag*o->imag));
         default: return MP_OBJ_NULL; // op not supported
     }
 }
diff --git a/py/objfloat.c b/py/objfloat.c
index fefd783..55a9379 100644
--- a/py/objfloat.c
+++ b/py/objfloat.c
@@ -163,10 +163,9 @@
         case MP_UNARY_OP_POSITIVE: return o_in;
         case MP_UNARY_OP_NEGATIVE: return mp_obj_new_float(-val);
         case MP_UNARY_OP_ABS: {
-            mp_float_t value = mp_obj_float_get(o_in);
             // TODO check for NaN etc
-            if (value < 0) {
-                return mp_obj_new_float(-value);
+            if (val < 0) {
+                return mp_obj_new_float(-val);
             } else {
                 return o_in;
             }