X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/609affae0305784d87f2357488fba35699a04098..HEAD:/math/fgoldi.c diff --git a/math/fgoldi.c b/math/fgoldi.c index 9061a74e..43309dcd 100644 --- a/math/fgoldi.c +++ b/math/fgoldi.c @@ -51,10 +51,8 @@ typedef uint32 upiece; typedef uint64 udblpiece; #define NPIECE 16 #define P p28 -#define B28 0x10000000u #define B27 0x08000000u #define M28 0x0fffffffu -#define M27 0x07ffffffu #define M32 0xffffffffu #elif FGOLDI_IMPL == 12 @@ -70,12 +68,10 @@ typedef uint16 upiece; typedef uint32 udblpiece; #define NPIECE 40 #define P p12 -#define B12 0x1000u #define B11 0x0800u #define B10 0x0400u #define M12 0xfffu #define M11 0x7ffu -#define M10 0x3ffu #define M8 0xffu #endif @@ -966,6 +962,7 @@ int fgoldi_quosqrt(fgoldi *z, const fgoldi *x, const fgoldi *y) #ifdef TEST_RIG +#include #include #include #include @@ -1006,7 +1003,7 @@ static void dump_fgoldi_ref(dstr *d, FILE *fp) } static int eq(const fgoldi *x, dstr *d) - { octet b[56]; fgoldi_store(b, x); return (memcmp(b, d->buf, 56) == 0); } + { octet b[56]; fgoldi_store(b, x); return (MEMCMP(b, ==, d->buf, 56)); } static const test_type type_fgoldi = { cvt_fgoldi, dump_fgoldi },