Reduce global status constants

The constants:

	9, 9/10, 10/9, 24, 360, 400

are used by func.c only, so there were moved
from {q,z}math.{c,h} to func.c.

The constants:

	3, 4

are used by zrandom.c only, so there were moved
from {q,z}math.{c,h} to zrandom.c.
This commit is contained in:
Landon Curt Noll
2021-12-01 22:50:52 -08:00
parent bd990cef1f
commit f794b8d859
6 changed files with 27 additions and 59 deletions

24
zmath.c
View File

@@ -44,15 +44,6 @@ ZVALUE _neg_one_ = { _oneval_, 1, 1 };
HALF _twoval_[] = { 2 };
ZVALUE _two_ = { _twoval_, 1, 0 };
HALF _threeval_[] = { 3 };
ZVALUE _three_ = { _threeval_, 1, 0 };
HALF _fourval_[] = { 4 };
ZVALUE _four_ = { _fourval_, 1, 0 };
HALF _nineval_[] = { 9 };
ZVALUE _nine_ = { _nineval_, 1, 0 };
HALF _tenval_[] = { 10 };
ZVALUE _ten_ = { _tenval_, 1, 0 };
@@ -65,15 +56,6 @@ ZVALUE _pow4base_ = { _pow4baseval_, 4, 0 };
HALF _pow8baseval_[] = { 0, 0, 0, 0, 1 };
ZVALUE _pow8base_ = { _pow8baseval_, 4, 0 };
HALF _threesixtyval_[] = { 360 };
ZVALUE _threesixty_ = { _threesixtyval_, 4, 0 };
HALF _fourhundredval_[] = { 400 };
ZVALUE _fourhundred_ = { _fourhundredval_, 4, 0 };
HALF _twentyfourval_[] = { 24 };
ZVALUE _twentyfour_ = { _twentyfourval_, 4, 0 };
/*
* 2^64 as a ZVALUE
*/
@@ -94,16 +76,10 @@ HALF *half_tbl[] = {
_zeroval_,
_oneval_,
_twoval_,
_threeval_,
_fourval_,
_nineval_,
_tenval_,
_sqbaseval_,
_pow4baseval_,
_pow8baseval_,
_threesixtyval_,
_fourhundredval_,
_twentyfourval_,
NULL /* must be last */
};