~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release 2.6.1.
[catacomb]
/
math
/
fgoldi.c
diff --git
a/math/fgoldi.c
b/math/fgoldi.c
index
9061a74
..
43309dc
100644
(file)
--- 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 NPIECE 16
#define P p28
-#define B28 0x10000000u
#define B27 0x08000000u
#define M28 0x0fffffffu
#define B27 0x08000000u
#define M28 0x0fffffffu
-#define M27 0x07ffffffu
#define M32 0xffffffffu
#elif FGOLDI_IMPL == 12
#define M32 0xffffffffu
#elif FGOLDI_IMPL == 12
@@
-70,12
+68,10
@@
typedef uint16 upiece; typedef uint32 udblpiece;
#define NPIECE 40
#define P p12
#define NPIECE 40
#define P p12
-#define B12 0x1000u
#define B11 0x0800u
#define B10 0x0400u
#define M12 0xfffu
#define M11 0x7ffu
#define B11 0x0800u
#define B10 0x0400u
#define M12 0xfffu
#define M11 0x7ffu
-#define M10 0x3ffu
#define M8 0xffu
#endif
#define M8 0xffu
#endif
@@
-966,6
+962,7
@@
int fgoldi_quosqrt(fgoldi *z, const fgoldi *x, const fgoldi *y)
#ifdef TEST_RIG
#ifdef TEST_RIG
+#include <mLib/macros.h>
#include <mLib/report.h>
#include <mLib/str.h>
#include <mLib/testrig.h>
#include <mLib/report.h>
#include <mLib/str.h>
#include <mLib/testrig.h>
@@
-1006,7
+1003,7
@@
static void dump_fgoldi_ref(dstr *d, FILE *fp)
}
static int eq(const fgoldi *x, dstr *d)
}
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 },
static const test_type
type_fgoldi = { cvt_fgoldi, dump_fgoldi },