add qispowerof2() to qfunc.c, improve log2() code

Change zispowerof2() interaface to take a FULL ptr as the 2nd arg:
zispowerof2(ZVALUE z, FULL *log2).

Added qispowerof2(NUMBER *q, NUMBER **qlog2) to qfunc.c.

Change log2() builtin to use the new qispowerof2() internal interface.

Update LIBRARY to reflect the new zispowerof2() internal interface
and the new qispowerof2() internal interface.
This commit is contained in:
Landon Curt Noll
2023-08-27 23:50:44 -07:00
parent 4e5fcc8812
commit 4dbc4dfe9a
6 changed files with 131 additions and 89 deletions

View File

@@ -170,6 +170,7 @@ E_FUNC long qdigits(NUMBER *q, ZVALUE base);
E_FUNC void setepsilon(NUMBER *q);
E_FUNC NUMBER *qbitvalue(long i);
E_FUNC NUMBER *qtenpow(long i);
E_FUNC bool qispowerof2(NUMBER *q, NUMBER **qlog2);
/*