Commit 2adf7ec3 authored by Damien George's avatar Damien George
Browse files

py/mpz: Fix conversion of float to mpz so it works on big endian archs.

parent b1fa907d
......@@ -711,7 +711,11 @@ typedef uint32_t mp_float_int_t;
union {
mp_float_t f;
struct { mp_float_int_t frc:MP_FLOAT_FRAC_BITS, exp:MP_FLOAT_EXP_BITS, sgn:1; } p;
struct { mp_float_int_t sgn:1, exp:MP_FLOAT_EXP_BITS, frc:MP_FLOAT_FRAC_BITS; } p;
} u = {src};
z->neg = u.p.sgn;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment