summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/mlib-mat.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/mlib-mat.lmt')
-rw-r--r--tex/context/base/mkxl/mlib-mat.lmt130
1 files changed, 67 insertions, 63 deletions
diff --git a/tex/context/base/mkxl/mlib-mat.lmt b/tex/context/base/mkxl/mlib-mat.lmt
index 3a63b32c7..68e3c98d1 100644
--- a/tex/context/base/mkxl/mlib-mat.lmt
+++ b/tex/context/base/mkxl/mlib-mat.lmt
@@ -16,78 +16,82 @@ local scancolor = scanners.color
local mppair = injectors.pair or mp.pair
local registerscript = metapost.registerscript
+local registerdirect = metapost.registerdirect
local m = xmath
local c = xcomplex
-local m_acos = m.acos registerscript("m_acos", function() return m_acos (scannumeric()) end)
-local m_acosh = m.acosh registerscript("m_acosh", function() return m_acosh (scannumeric()) end)
-local m_asin = m.asin registerscript("m_asin", function() return m_asin (scannumeric()) end)
-local m_asinh = m.asinh registerscript("m_asinh", function() return m_asinh (scannumeric()) end)
-local m_atan = m.atan registerscript("m_atan", function() return m_atan (scannumeric()) end)
-local m_atan2 = m.atan2 registerscript("m_atan2", function() return m_atan2 (scanpair ()) end)
-local m_atanh = m.atanh registerscript("m_atanh", function() return m_atanh (scannumeric()) end)
-local m_cbrt = m.cbrt registerscript("m_cbrt", function() return m_cbrt (scannumeric()) end)
-local m_ceil = m.ceil registerscript("m_ceil", function() return m_ceil (scannumeric()) end)
-local m_copysign = m.copysign registerscript("m_copysign", function() return m_copysign (scanpair ()) end)
-local m_cos = m.cos registerscript("m_cos", function() return m_cos (scannumeric()) end)
-local m_cosh = m.cosh registerscript("m_cosh", function() return m_cosh (scannumeric()) end)
-local m_deg = m.deg registerscript("m_deg", function() return m_deg (scannumeric()) end)
-local m_erf = m.erf registerscript("m_erf", function() return m_erf (scannumeric()) end)
-local m_erfc = m.erfc registerscript("m_erfc", function() return m_erfc (scannumeric()) end)
-local m_exp = m.exp registerscript("m_exp", function() return m_exp (scannumeric()) end)
-local m_exp2 = m.exp2 registerscript("m_exp2", function() return m_exp2 (scannumeric()) end)
-local m_expm1 = m.expm1 registerscript("m_expm1", function() return m_expm1 (scannumeric()) end)
-local m_fabs = m.fabs registerscript("m_fabs", function() return m_fabs (scannumeric()) end)
-local m_fdim = m.fdim registerscript("m_fdim", function() return m_fdim (scanpair ()) end)
-local m_floor = m.floor registerscript("m_floor", function() return m_floor (scannumeric()) end)
-local m_fma = m.fma registerscript("m_fma", function() return m_fma (scancolor ()) end)
-local m_fmax = m.fmax registerscript("m_fmax", function() return m_fmax (scannumeric()) end)
-local m_fmin = m.fmin registerscript("m_fmin", function() return m_fmin (scannumeric()) end)
-local m_fmod = m.fmod registerscript("m_fmod", function() return m_fmod (scanpair ()) end)
-local m_frexp = m.frexp registerscript("m_frexp", function() return m_frexp (scannumeric()) end)
-local m_gamma = m.gamma registerscript("m_gamma", function() return m_gamma (scannumeric()) end)
-local m_hypot = m.hypot registerscript("m_hypot", function() return m_hypot (scanpair ()) end)
-local m_isfinite = m.isfinite registerscript("m_isfinite", function() return m_isfinite (scannumeric()) end)
-local m_isinf = m.isinf registerscript("m_isinf", function() return m_isinf (scannumeric()) end)
-local m_isnan = m.isnan registerscript("m_isnan", function() return m_isnan (scannumeric()) end)
-local m_isnormal = m.isnormal registerscript("m_isnormal", function() return m_isnormal (scannumeric()) end)
-local m_j0 = m.j0 registerscript("m_j0", function() return m_j0 (scannumeric()) end)
-local m_j1 = m.j1 registerscript("m_j1", function() return m_j1 (scannumeric()) end)
-local m_jn = m.jn registerscript("m_jn", function() return m_jn (scanpair ()) end)
-local m_ldexp = m.ldexp registerscript("m_ldexp", function() return m_ldexp (scanpair ()) end)
-local m_lgamma = m.lgamma registerscript("m_lgamma", function() return m_lgamma (scannumeric()) end)
-local m_log = m.log registerscript("m_log", function() return m_log (scannumeric()) end)
-local m_log10 = m.log10 registerscript("m_log10", function() return m_log10 (scannumeric()) end)
-local m_log1p = m.log1p registerscript("m_log1p", function() return m_log1p (scannumeric()) end)
-local m_log2 = m.log2 registerscript("m_log2", function() return m_log2 (scannumeric()) end)
-local m_logb = m.logb registerscript("m_logb", function() return m_logb (scannumeric()) end)
-local m_modf = m.modf registerscript("m_modf", function() return m_modf (scannumeric()) end)
-local m_nearbyint = m.nearbyint registerscript("m_nearbyint", function() return m_nearbyint(scannumeric()) end)
-local m_nextafter = m.nextafter registerscript("m_nextafter", function() return m_nextafter(scanpair ()) end)
-local m_pow = m.pow registerscript("m_pow", function() return m_pow (scanpair ()) end)
-local m_rad = m.rad registerscript("m_rad", function() return m_rad (scannumeric()) end)
-local m_remainder = m.remainder registerscript("m_remainder", function() return m_remainder(scanpair ()) end)
-local m_remquo = m.remquo registerscript("m_remquo", function() return m_remquo (scannumeric()) end)
-local m_round = m.round registerscript("m_round", function() return m_round (scannumeric()) end)
-local m_scalbn = m.scalbn registerscript("m_scalbn", function() return m_scalbn (scanpair ()) end)
-local m_sin = m.sin registerscript("m_sin", function() return m_sin (scannumeric()) end)
-local m_sinh = m.sinh registerscript("m_sinh", function() return m_sinh (scannumeric()) end)
-local m_sqrt = m.sqrt registerscript("m_sqrt", function() return m_sqrt (scannumeric()) end)
-local m_tan = m.tan registerscript("m_tan", function() return m_tan (scannumeric()) end)
-local m_tanh = m.tanh registerscript("m_tanh", function() return m_tanh (scannumeric()) end)
-local m_tgamma = m.tgamma registerscript("m_tgamma", function() return m_tgamma (scannumeric()) end)
-local m_trunc = m.trunc registerscript("m_trunc", function() return m_trunc (scannumeric()) end)
-local m_y0 = m.y0 registerscript("m_y0", function() return m_y0 (scannumeric()) end)
-local m_y1 = m.y1 registerscript("m_y1", function() return m_y1 (scannumeric()) end)
-local m_yn = m.yn registerscript("m_yn", function() return m_yn (scanpair ()) end)
+local m_acos = m.acos registerdirect("m_acos", function() return m_acos (scannumeric()) end)
+local m_acosh = m.acosh registerdirect("m_acosh", function() return m_acosh (scannumeric()) end)
+local m_asin = m.asin registerdirect("m_asin", function() return m_asin (scannumeric()) end)
+local m_asinh = m.asinh registerdirect("m_asinh", function() return m_asinh (scannumeric()) end)
+local m_atan = m.atan registerdirect("m_atan", function() return m_atan (scannumeric()) end)
+local m_atan2 = m.atan2 registerdirect("m_atan2", function() return m_atan2 (scanpair ()) end)
+local m_atanh = m.atanh registerdirect("m_atanh", function() return m_atanh (scannumeric()) end)
+local m_cbrt = m.cbrt registerdirect("m_cbrt", function() return m_cbrt (scannumeric()) end)
+local m_ceil = m.ceil registerdirect("m_ceil", function() return m_ceil (scannumeric()) end)
+local m_copysign = m.copysign registerdirect("m_copysign", function() return m_copysign (scanpair ()) end)
+local m_cos = m.cos registerdirect("m_cos", function() return m_cos (scannumeric()) end)
+local m_cosh = m.cosh registerdirect("m_cosh", function() return m_cosh (scannumeric()) end)
+local m_deg = m.deg registerdirect("m_deg", function() return m_deg (scannumeric()) end)
+local m_erf = m.erf registerdirect("m_erf", function() return m_erf (scannumeric()) end)
+local m_erfc = m.erfc registerdirect("m_erfc", function() return m_erfc (scannumeric()) end)
+local m_exp = m.exp registerdirect("m_exp", function() return m_exp (scannumeric()) end)
+local m_exp2 = m.exp2 registerdirect("m_exp2", function() return m_exp2 (scannumeric()) end)
+local m_expm1 = m.expm1 registerdirect("m_expm1", function() return m_expm1 (scannumeric()) end)
+local m_fabs = m.fabs registerdirect("m_fabs", function() return m_fabs (scannumeric()) end)
+local m_fdim = m.fdim registerdirect("m_fdim", function() return m_fdim (scanpair ()) end)
+local m_floor = m.floor registerdirect("m_floor", function() return m_floor (scannumeric()) end)
+local m_fma = m.fma registerdirect("m_fma", function() return m_fma (scancolor ()) end)
+local m_fmax = m.fmax registerdirect("m_fmax", function() return m_fmax (scannumeric()) end)
+local m_fmin = m.fmin registerdirect("m_fmin", function() return m_fmin (scannumeric()) end)
+local m_fmod = m.fmod registerdirect("m_fmod", function() return m_fmod (scanpair ()) end)
+local m_frexp = m.frexp registerdirect("m_frexp", function() return m_frexp (scannumeric()) end)
+local m_gamma = m.gamma registerdirect("m_gamma", function() return m_gamma (scannumeric()) end)
+local m_hypot = m.hypot registerdirect("m_hypot", function() return m_hypot (scanpair ()) end)
+local m_isfinite = m.isfinite registerdirect("m_isfinite", function() return m_isfinite (scannumeric()) end)
+local m_isinf = m.isinf registerdirect("m_isinf", function() return m_isinf (scannumeric()) end)
+local m_isnan = m.isnan registerdirect("m_isnan", function() return m_isnan (scannumeric()) end)
+local m_isnormal = m.isnormal registerdirect("m_isnormal", function() return m_isnormal (scannumeric()) end)
+local m_j0 = m.j0 registerdirect("m_j0", function() return m_j0 (scannumeric()) end)
+local m_j1 = m.j1 registerdirect("m_j1", function() return m_j1 (scannumeric()) end)
+local m_jn = m.jn registerdirect("m_jn", function() return m_jn (scanpair ()) end)
+local m_ldexp = m.ldexp registerdirect("m_ldexp", function() return m_ldexp (scanpair ()) end)
+local m_lgamma = m.lgamma registerdirect("m_lgamma", function() return m_lgamma (scannumeric()) end)
+local m_log = m.log registerdirect("m_log", function() return m_log (scannumeric()) end)
+local m_log10 = m.log10 registerdirect("m_log10", function() return m_log10 (scannumeric()) end)
+local m_log1p = m.log1p registerdirect("m_log1p", function() return m_log1p (scannumeric()) end)
+local m_log2 = m.log2 registerdirect("m_log2", function() return m_log2 (scannumeric()) end)
+local m_logb = m.logb registerdirect("m_logb", function() return m_logb (scannumeric()) end)
+local m_modf = m.modf registerdirect("m_modf", function() return m_modf (scannumeric()) end)
+local m_nearbyint = m.nearbyint registerdirect("m_nearbyint", function() return m_nearbyint(scannumeric()) end)
+local m_nextafter = m.nextafter registerdirect("m_nextafter", function() return m_nextafter(scanpair ()) end)
+local m_pow = m.pow registerdirect("m_pow", function() return m_pow (scanpair ()) end)
+local m_rad = m.rad registerdirect("m_rad", function() return m_rad (scannumeric()) end)
+local m_remainder = m.remainder registerdirect("m_remainder", function() return m_remainder(scanpair ()) end)
+local m_remquo = m.remquo registerdirect("m_remquo", function() return m_remquo (scannumeric()) end)
+local m_round = m.round registerdirect("m_round", function() return m_round (scannumeric()) end)
+local m_scalbn = m.scalbn registerdirect("m_scalbn", function() return m_scalbn (scanpair ()) end)
+local m_sin = m.sin registerdirect("m_sin", function() return m_sin (scannumeric()) end)
+local m_sinh = m.sinh registerdirect("m_sinh", function() return m_sinh (scannumeric()) end)
+local m_sqrt = m.sqrt registerdirect("m_sqrt", function() return m_sqrt (scannumeric()) end)
+local m_tan = m.tan registerdirect("m_tan", function() return m_tan (scannumeric()) end)
+local m_tanh = m.tanh registerdirect("m_tanh", function() return m_tanh (scannumeric()) end)
+local m_tgamma = m.tgamma registerdirect("m_tgamma", function() return m_tgamma (scannumeric()) end)
+local m_trunc = m.trunc registerdirect("m_trunc", function() return m_trunc (scannumeric()) end)
+local m_y0 = m.y0 registerdirect("m_y0", function() return m_y0 (scannumeric()) end)
+local m_y1 = m.y1 registerdirect("m_y1", function() return m_y1 (scannumeric()) end)
+local m_yn = m.yn registerdirect("m_yn", function() return m_yn (scanpair ()) end)
if not (c and c.sin) then
return
end
-local c_topair = c.topair
-local c_new = c.new
+local c_topair = c.topair
+local c_totable = c.totable
+local c_new = c.new
+
+----- c_sin = c.sin registerdirect("c_sin", function() return c_totable(c_sin (c_new(scanpair()))) end)
local c_sin = c.sin registerscript("c_sin", function() return mppair(c_topair(c_sin (c_new(scanpair())))) end)
local c_cos = c.cos registerscript("c_cos", function() return mppair(c_topair(c_cos (c_new(scanpair())))) end)