Expand description
mathfunc submodule.
Mathematical functions for arithmetic expressions — port of
Src/Modules/mathfunc.c.
C source has THREE anonymous enum {} blocks (lines 35, 90,
104) generating int-typed constants — no named C type, so
the Rust port mirrors them as pub const ... : i32 = ...;
definitions only (rule 1: no Rust-only struct/enum types).
All math-fn dispatch lives in a single math_func() switch,
matching the C structure 1:1.
Constants§
- MF_ABS
MF_ABSconstant.- MF_ACOS
MF_ACOSconstant.- MF_
ACOSH MF_ACOSHconstant.- MF_ASIN
MF_ASINconstant.- MF_
ASINH MF_ASINHconstant.- MF_ATAN
MF_ATANconstant.- MF_
ATANH MF_ATANHconstant.- MF_CBRT
MF_CBRTconstant.- MF_CEIL
MF_CEILconstant.- MF_
COPYSIGN MF_COPYSIGNconstant.- MF_COS
MF_COSconstant.- MF_COSH
MF_COSHconstant.- MF_ERF
MF_ERFconstant.- MF_ERFC
MF_ERFCconstant.- MF_EXP
MF_EXPconstant.- MF_
EXPM1 MF_EXPM1constant.- MF_FABS
MF_FABSconstant.- MF_
FLOAT MF_FLOATconstant.- MF_
FLOOR MF_FLOORconstant.- MF_FMOD
MF_FMODconstant.- MF_
GAMMA MF_GAMMAconstant.- MF_
HYPOT MF_HYPOTconstant.- MF_
ILOGB MF_ILOGBconstant.- MF_INT
MF_INTconstant.- MF_
ISINF MF_ISINFconstant.- MF_
ISNAN MF_ISNANconstant.- MF_J0
MF_J0constant.- MF_J1
MF_J1constant.- MF_JN
MF_JNconstant.- MF_
LDEXP MF_LDEXPconstant.- MF_
LGAMMA MF_LGAMMAconstant.- MF_LOG
MF_LOGconstant.- MF_LOG2
MF_LOG2constant.- MF_
LOG1P MF_LOG1Pconstant.- MF_
LOG10 MF_LOG10constant.- MF_LOGB
MF_LOGBconstant.- MF_
NEXTAFTER MF_NEXTAFTERconstant.- MF_RINT
MF_RINTconstant.- MF_
SCALB MF_SCALBconstant.- MF_
SIGNGAM MF_SIGNGAMconstant.- MF_SIN
MF_SINconstant.- MF_SINH
MF_SINHconstant.- MF_SQRT
MF_SQRTconstant.- MF_TAN
MF_TANconstant.- MF_TANH
MF_TANHconstant.- MF_Y0
MF_Y0constant.- MF_Y1
MF_Y1constant.- MF_YN
MF_YNconstant.- MS_
RAND48 MS_RAND48constant.- TF_INT1
TF_INT1constant.- TF_INT2
TF_INT2constant.- TF_
NOASS TF_NOASSconstant.- TF_
NOCONV TF_NOCONVconstant.
Functions§
- boot_
- Port of
boot_(UNUSED(Module m))fromSrc/Modules/mathfunc.c:570. - cleanup_
- Port of
cleanup_(UNUSED(Module m))fromSrc/Modules/mathfunc.c:577. C body:return setfeatureenables(m, &module_features, NULL); - enables_
- Port of
enables_(UNUSED(Module m), UNUSED(int **enables))fromSrc/Modules/mathfunc.c:563. C body:return handlefeatures(m, &module_features, enables); - features_
- Port of
features_(UNUSED(Module m), UNUSED(char ***features))fromSrc/Modules/mathfunc.c:555. C body:*features = featuresarray(m, &module_features); return 0; - finish_
- Port of
finish_(UNUSED(Module m))fromSrc/Modules/mathfunc.c:584. - math_
func - Port of
math_func(UNUSED(char *name), int argc, mnumber *argv, int id)fromSrc/Modules/mathfunc.c:173. The dispatcher behind every numeric math fn registered viaNUMMATHFUNCinmftab[](mathfunc.c:115-167). - math_
string - Port of
math_string(UNUSED(char *name), char *arg, int id)fromSrc/Modules/mathfunc.c:439. The string-arg math-fn dispatcher behindrand48("seedvar")and future string-takers. C signature:static mnumber math_string(char *name, char *arg, int id) - setup_
- Port of
setup_(UNUSED(Module m))fromSrc/Modules/mathfunc.c:548. - tflag
- Port of the
TFLAG(x)macro frommathfunc.c:113.#define TFLAG(x) ((x) << 8). Shifts the type-flag bits into the high byte of theidarg passed tomath_func()so the MF_* numeric ids can occupy the low byte.