Expand description
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_ACOS
- MF_
ACOSH - MF_ASIN
- MF_
ASINH - MF_ATAN
- MF_
ATANH - MF_CBRT
- MF_CEIL
- MF_
COPYSIGN - MF_COS
- MF_COSH
- MF_ERF
- MF_ERFC
- MF_EXP
- MF_
EXPM1 - MF_FABS
- MF_
FLOAT - MF_
FLOOR - MF_FMOD
- MF_
GAMMA - MF_
HYPOT - MF_
ILOGB - MF_INT
- MF_
ISINF - MF_
ISNAN - MF_J0
- MF_J1
- MF_JN
- MF_
LDEXP - MF_
LGAMMA - MF_LOG
- MF_LOG2
- MF_
LOG1P - MF_
LOG10 - MF_LOGB
- MF_
NEXTAFTER - MF_RINT
- MF_
SCALB - MF_
SIGNGAM - MF_SIN
- MF_SINH
- MF_SQRT
- MF_TAN
- MF_TANH
- MF_Y0
- MF_Y1
- MF_YN
- MS_
RAND48 - TF_INT1
- TF_INT2
- TF_
NOASS - TF_
NOCONV
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.