summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-07-15 14:26:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-07-15 14:26:01 -0700
commit2f9ed3990a67fcdd9473b862bbb83ab257560610 (patch)
treeebb51fc32524ec3300cb15678363ded04e6ba532
parentfcf291f31d01e0ce6e821db18d0ea0b9502f679d (diff)
downloadtxr-2f9ed3990a67fcdd9473b862bbb83ab257560610.tar.gz
txr-2f9ed3990a67fcdd9473b862bbb83ab257560610.tar.bz2
txr-2f9ed3990a67fcdd9473b862bbb83ab257560610.zip
Math library: add numerous C99 functions.
* configure: Detect all the new functions, with separate tests for the unary and binary ones. * arith.c (cbrt_s, erf_s, erfc_s, exp10_s, exp2_s, expm1_s, gamma_s, j0_s, j1_s, lgamma_s, log1p_s, logb_s, nearbyint_s, rint_s, significand_s, tgamma_s, y0_s, y1_s, copysign_s, drem_s, fdim_s, fmax_s, fmin_s, hypot_s, jn_s, ldexp_s, nextafter_s, remainder_s, scalb_s, scalbln_s, yn_s, r_copysign_s, r_drem_s, r_fdim_s, r_fmax_s, r_fmin_s, hypot_s, r_jn_s, r_ldexp_s, r_nextafter_s, r_remainder_s, r_scalb_s, scalbln_s, r_yn_s): New symbol variables. (not_available): New static function. (cbrt_wrap, erf_wrap, erfc_wrap, exp10_wrap, exp2_wrap, expm1_wrap, gamma_wrap, j0_wrap, j1_wrap, lgamma_wrap, log1p_wrap, logb_wrap, nearbyint_wrap, rint_wrap, significand_wrap, tgamma_wrap, y0_wrap, y1_wrap, copysign_wrap, drem_wrap, fdim_wrap, fmax_wrap, fmin_wrap, hypot_wrap, jn_wrap, ldexp_wrap, nextafter_wrap, remainder_wrap, scalb_wrap, scalbln_wrap, yn_wrap): New static functions. (arith_set_entries, arith_instantiate): New static functions. (arith_init): Initialize symbols and instantiate functions via autoload mechanism. In a program that doesn't use the functions, we suffer only the overhead of interning the symbols. * lib.h (UNUSED): New macro for GCC unused attribute. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
-rw-r--r--arith.c533
-rwxr-xr-xconfigure44
-rw-r--r--lib.h2
-rw-r--r--stdlib/doc-syms.tl274
-rw-r--r--txr.184
5 files changed, 822 insertions, 115 deletions
diff --git a/arith.c b/arith.c
index 2ec83fc0..e058560a 100644
--- a/arith.c
+++ b/arith.c
@@ -51,6 +51,7 @@
#include "struct.h"
#include "txr.h"
#include "psquare.h"
+#include "autoload.h"
#include "arith.h"
#define max(a, b) ((a) > (b) ? (a) : (b))
@@ -73,6 +74,16 @@ val logand_s, logior_s, logxor_s;
val lognot1_s, lognot_s, r_lognot_s, logtrunc_s, r_logtrunc_s;
val sign_extend_s, ash_s, bit_s, width_s, bitset_s, logcount_s;
+val cbrt_s, erf_s, erfc_s, exp10_s, exp2_s, expm1_s;
+val gamma_s, j0_s, j1_s, lgamma_s, log1p_s, logb_s;
+val nearbyint_s, rint_s, significand_s, tgamma_s, y0_s, y1_s;
+val copysign_s, drem_s, fdim_s, fmax_s, fmin_s, hypot_s;
+val jn_s, ldexp_s, nextafter_s, remainder_s, scalb_s;
+val scalbln_s, yn_s;
+val r_copysign_s, r_drem_s, r_fdim_s, r_fmax_s, r_fmin_s, r_hypot_s;
+val r_jn_s, r_ldexp_s, r_nextafter_s, r_remainder_s, r_scalb_s;
+val r_scalbln_s, r_yn_s;
+
val make_bignum(void)
{
val n = make_obj();
@@ -482,6 +493,12 @@ static int highest_significant_bit(int_ptr_t n)
return highest_bit(-n - 1);
}
+static UNUSED NORETURN void not_available(val name)
+{
+ uw_throwf(file_error_s, lit("~a is not available on this platform"),
+ name, nao);
+}
+
void do_mp_error(val self, mp_err code)
{
val errstr = string_utf8(mp_strerror(code));
@@ -3021,6 +3038,418 @@ val sqroot(val num)
return flo(sqrt(c_flo(to_float(self, num), self)));
}
+static val cbrt_wrap(val num)
+{
+ val self = cbrt_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_CBRT
+ return flo(cbrt(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val erf_wrap(val num)
+{
+ val self = erf_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_ERF
+ return flo(erf(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val erfc_wrap(val num)
+{
+ val self = erfc_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_ERFC
+ return flo(erfc(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val exp10_wrap(val num)
+{
+ val self = exp10_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_EXP10
+ return flo(exp10(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val exp2_wrap(val num)
+{
+ val self = exp2_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_EXP2
+ return flo(exp2(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val expm1_wrap(val num)
+{
+ val self = expm1_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_EXPM1
+ return flo(expm1(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val gamma_wrap(val num)
+{
+ val self = gamma_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_GAMMA
+ return flo(gamma(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val j0_wrap(val num)
+{
+ val self = j0_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_J0
+ return flo(j0(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val j1_wrap(val num)
+{
+ val self = j1_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_J1
+ return flo(j1(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val lgamma_wrap(val num)
+{
+ val self = lgamma_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_LGAMMA
+ return flo(lgamma(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val log1p_wrap(val num)
+{
+ val self = log1p_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_LOG1P
+ return flo(log1p(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val logb_wrap(val num)
+{
+ val self = logb_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_LOGB
+ return flo(logb(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val nearbyint_wrap(val num)
+{
+ val self = nearbyint_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_NEARBYINT
+ return flo(nearbyint(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val rint_wrap(val num)
+{
+ val self = rint_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_RINT
+ return flo(rint(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val significand_wrap(val num)
+{
+ val self = significand_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_SIGNIFICAND
+ return flo(significand(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val tgamma_wrap(val num)
+{
+ val self = tgamma_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_TGAMMA
+ return flo(tgamma(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val y0_wrap(val num)
+{
+ val self = y0_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_Y0
+ return flo(y0(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val y1_wrap(val num)
+{
+ val self = y1_s;
+ if (cobjp(num))
+ return do_unary_method(self, self, num);
+#if HAVE_Y1
+ return flo(y1(c_flo(to_float(self, num), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val copysign_wrap(val anum, val bnum)
+{
+ val self = copysign_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_copysign_s, bnum, anum);
+#if HAVE_COPYSIGN
+ return flo(copysign(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val drem_wrap(val anum, val bnum)
+{
+ val self = drem_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_drem_s, bnum, anum);
+#if HAVE_DREM
+ return flo(drem(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val fdim_wrap(val anum, val bnum)
+{
+ val self = fdim_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_fdim_s, bnum, anum);
+#if HAVE_FDIM
+ return flo(fdim(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val fmax_wrap(val anum, val bnum)
+{
+ val self = fmax_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_fmax_s, bnum, anum);
+#if HAVE_FMAX
+ return flo(fmax(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val fmin_wrap(val anum, val bnum)
+{
+ val self = fmin_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_fmin_s, bnum, anum);
+#if HAVE_FMIN
+ return flo(fmin(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val hypot_wrap(val anum, val bnum)
+{
+ val self = hypot_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_hypot_s, bnum, anum);
+#if HAVE_HYPOT
+ return flo(hypot(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val jn_wrap(val anum, val bnum)
+{
+ val self = jn_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_jn_s, bnum, anum);
+#if HAVE_JN
+ return flo(jn(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val ldexp_wrap(val anum, val bnum)
+{
+ val self = ldexp_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_ldexp_s, bnum, anum);
+#if HAVE_LDEXP
+ return flo(ldexp(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val nextafter_wrap(val anum, val bnum)
+{
+ val self = nextafter_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_nextafter_s, bnum, anum);
+#if HAVE_NEXTAFTER
+ return flo(nextafter(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val remainder_wrap(val anum, val bnum)
+{
+ val self = remainder_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_remainder_s, bnum, anum);
+#if HAVE_REMAINDER
+ return flo(remainder(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val scalb_wrap(val anum, val bnum)
+{
+ val self = scalb_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_scalb_s, bnum, anum);
+#if HAVE_SCALB
+ return flo(scalb(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val scalbln_wrap(val anum, val bnum)
+{
+ val self = scalbln_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_scalbln_s, bnum, anum);
+#if HAVE_SCALBLN
+ return flo(scalbln(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+static val yn_wrap(val anum, val bnum)
+{
+ val self = yn_s;
+ if (cobjp(anum))
+ return do_binary_method(self, self, anum, bnum);
+ if (cobjp(bnum))
+ return do_binary_method(self, r_yn_s, bnum, anum);
+#if HAVE_YN
+ return flo(yn(c_flo(to_float(self, anum), self),
+ c_flo(to_float(self, bnum), self)));
+#else
+ not_available(self);
+#endif
+}
+
+
/*
* TODO: replace this text-based hack!
*/
@@ -4759,6 +5188,108 @@ val quantile(val pv, val grsize_in, val rate_in)
return func_f0v(psqo, quant_fun);
}
+static val arith_set_entries(val fun)
+{
+ val name[] = {
+ lit("cbrt"),lit("erf"), lit("erfc"), lit("exp10"),
+ lit("exp2"),lit("expm1"), lit("gamma"), lit("j0"),
+ lit("j1"),lit("lgamma"), lit("log1p"), lit("logb"),
+ lit("nearbyint"),lit("rint"), lit("significand"), lit("tgamma"),
+ lit("y0"),lit("y1"), lit("copysign"), lit("drem"),
+ lit("fdim"),lit("fmax"), lit("fmin"), lit("hypot"),
+ lit("jn"),lit("ldexp"), lit("nextafter"),
+ lit("remainder"),lit("scalb"), lit("scalbln"), lit("yn"),
+ lit("r-copysign"), lit("r-drem"),
+ lit("r-fdim"),lit("r-fmax"), lit("r-fmin"), lit("r-hypot"),
+ lit("r-jn"),lit("r-ldexp"), lit("r-nextafter"),
+ lit("r-remainder"),lit("r-scalb"), lit("r-scalbln"), lit("r-yn"),
+ nil
+ };
+ autoload_set(al_fun, name, fun);
+ return nil;
+}
+
+static val arith_instantiate(void)
+{
+ cbrt_s = intern(lit("cbrt"), user_package);
+ erf_s = intern(lit("erf"), user_package);
+ erfc_s = intern(lit("erfc"), user_package);
+ exp10_s = intern(lit("exp10"), user_package);
+ exp2_s = intern(lit("exp2"), user_package);
+ expm1_s = intern(lit("expm1"), user_package);
+ gamma_s = intern(lit("gamma"), user_package);
+ j0_s = intern(lit("j0"), user_package);
+ j1_s = intern(lit("j1"), user_package);
+ lgamma_s = intern(lit("lgamma"), user_package);
+ log1p_s = intern(lit("log1p"), user_package);
+ logb_s = intern(lit("logb"), user_package);
+ nearbyint_s = intern(lit("nearbyint"), user_package);
+ rint_s = intern(lit("rint"), user_package);
+ significand_s = intern(lit("significand"), user_package);
+ tgamma_s = intern(lit("tgamma"), user_package);
+ y0_s = intern(lit("y0"), user_package);
+ y1_s = intern(lit("y1"), user_package);
+ copysign_s = intern(lit("copysign"), user_package);
+ drem_s = intern(lit("drem"), user_package);
+ fdim_s = intern(lit("fdim"), user_package);
+ fmax_s = intern(lit("fmax"), user_package);
+ fmin_s = intern(lit("fmin"), user_package);
+ hypot_s = intern(lit("hypot"), user_package);
+ jn_s = intern(lit("jn"), user_package);
+ ldexp_s = intern(lit("ldexp"), user_package);
+ nextafter_s = intern(lit("nextafter"), user_package);
+ remainder_s = intern(lit("remainder"), user_package);
+ scalb_s = intern(lit("scalb"), user_package);
+ scalbln_s = intern(lit("scalbln"), user_package);
+ yn_s = intern(lit("yn"), user_package);
+ r_copysign_s = intern(lit("r-copysign"), user_package);
+ r_drem_s = intern(lit("r-drem"), user_package);
+ r_fdim_s = intern(lit("r-fdim"), user_package);
+ r_fmax_s = intern(lit("r-fmax"), user_package);
+ r_fmin_s = intern(lit("r-fmin"), user_package);
+ r_hypot_s = intern(lit("r-hypot"), user_package);
+ r_jn_s = intern(lit("r-jn"), user_package);
+ r_ldexp_s = intern(lit("r-ldexp"), user_package);
+ r_nextafter_s = intern(lit("r-nextafter"), user_package);
+ r_remainder_s = intern(lit("r-remainder"), user_package);
+ r_scalb_s = intern(lit("r-scalb"), user_package);
+ r_scalbln_s = intern(lit("r-scalbln"), user_package);
+ r_yn_s = intern(lit("r-yn"), user_package);
+
+ reg_fun(cbrt_s, func_n1(cbrt_wrap));
+ reg_fun(erf_s, func_n1(erf_wrap));
+ reg_fun(erfc_s, func_n1(erfc_wrap));
+ reg_fun(exp10_s, func_n1(exp10_wrap));
+ reg_fun(exp2_s, func_n1(exp2_wrap));
+ reg_fun(expm1_s, func_n1(expm1_wrap));
+ reg_fun(gamma_s, func_n1(gamma_wrap));
+ reg_fun(j0_s, func_n1(j0_wrap));
+ reg_fun(j1_s, func_n1(j1_wrap));
+ reg_fun(lgamma_s, func_n1(lgamma_wrap));
+ reg_fun(log1p_s, func_n1(log1p_wrap));
+ reg_fun(logb_s, func_n1(logb_wrap));
+ reg_fun(nearbyint_s, func_n1(nearbyint_wrap));
+ reg_fun(rint_s, func_n1(rint_wrap));
+ reg_fun(significand_s, func_n1(significand_wrap));
+ reg_fun(tgamma_s, func_n1(tgamma_wrap));
+ reg_fun(y0_s, func_n1(y0_wrap));
+ reg_fun(y1_s, func_n1(y1_wrap));
+ reg_fun(copysign_s, func_n2(copysign_wrap));
+ reg_fun(drem_s, func_n2(drem_wrap));
+ reg_fun(fdim_s, func_n2(fdim_wrap));
+ reg_fun(fmax_s, func_n2(fmax_wrap));
+ reg_fun(fmin_s, func_n2(fmin_wrap));
+ reg_fun(hypot_s, func_n2(hypot_wrap));
+ reg_fun(jn_s, func_n2(jn_wrap));
+ reg_fun(ldexp_s, func_n2(ldexp_wrap));
+ reg_fun(nextafter_s, func_n2(nextafter_wrap));
+ reg_fun(remainder_s, func_n2(remainder_wrap));
+ reg_fun(scalb_s, func_n2(scalb_wrap));
+ reg_fun(scalbln_s, func_n2(scalbln_wrap));
+ reg_fun(yn_s, func_n2(yn_wrap));
+ return nil;
+}
+
void arith_init(void)
{
log2_init();
@@ -4969,6 +5500,8 @@ void arith_init(void)
reg_fun(intern(lit("flo-set-round-mode"), user_package),
func_n1(flo_set_round_mode));
#endif
+
+ autoload_reg(arith_instantiate, arith_set_entries);
}
void arith_compat_fixup(int compat_ver)
diff --git a/configure b/configure
index 02468f73..8c39cd4d 100755
--- a/configure
+++ b/configure
@@ -2918,6 +2918,50 @@ else
printf "no\n"
fi
+for fun in cbrt erf erfc exp10 exp2 expm1 \
+ gamma j0 j1 lgamma log1p logb \
+ nearbyint pow10 rint significand tgamma y0 y1
+do
+ printf "Checking for %s function ... " $fun
+ cat > conftest.c <<!
+#include <math.h>
+
+int main(void)
+{
+ double a = $fun(0.5);
+ return 0;
+}
+!
+ if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_%s 1\n" $(echo $fun | tr '[a-z]' '[A-Z]') >> config.h
+ else
+ printf "no\n"
+ fi
+done
+
+for fun in copysign drem fdim fmax fmin \
+ frexp hypot jn ldexp modf \
+ nextafter nexttoward remainder scalb scalbln yn
+do
+ printf "Checking for %s function ... " $fun
+ cat > conftest.c <<!
+#include <math.h>
+
+int main(void)
+{
+ double a = $fun(0.5, 0.5);
+ return 0;
+}
+!
+ if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_%s 1\n" $(echo $fun | tr '[a-z]' '[A-Z]') >> config.h
+ else
+ printf "no\n"
+ fi
+done
+
printf "Checking for glob ... "
cat > conftest.c <<!
diff --git a/lib.h b/lib.h
index b61ebac9..646af602 100644
--- a/lib.h
+++ b/lib.h
@@ -95,9 +95,11 @@ typedef double_uintptr_t dbl_ucnum;
#ifdef __GNUC__
#define NORETURN __attribute__((noreturn))
#define NOINLINE __attribute__((noinline))
+#define UNUSED __attribute__((unused))
#else
#define NORETURN
#define NOINLINE
+#define UNUSED
#endif
typedef enum type {
diff --git a/stdlib/doc-syms.tl b/stdlib/doc-syms.tl
index 106d8526..497b27a1 100644
--- a/stdlib/doc-syms.tl
+++ b/stdlib/doc-syms.tl
@@ -4,7 +4,7 @@
("%e%" "N-03F0FA9E")
("%fun%" "N-00719365")
("%pi%" "N-03F0FA9E")
- ("*" "D-0076")
+ ("*" "D-0087")
("*args*" "N-03DEE18A")
("*args-eff*" "N-03DEE18A")
("*args-full*" "N-03DEE18A")
@@ -53,8 +53,8 @@
("*trace-output*" "N-0067A6AC")
("*tree-fun-whitelist*" "N-025AB9C9")
("*unhandled-hook*" "N-02B4A4FB")
- ("+" "D-004F")
- ("-" "D-0079")
+ ("+" "D-0059")
+ ("-" "D-008A")
("--" "N-0234C408")
("--rng" "N-01A056E4")
("--rng+" "N-01A056E4")
@@ -64,29 +64,29 @@
("-rng" "N-01A056E4")
("-rng+" "N-01A056E4")
("-rng-" "N-01A056E4")
- ("/" "D-0052")
+ ("/" "D-005C")
("//" "N-0054C409")
("/=" "N-003BE40C")
(":delegate" "N-037F664C")
(":key" "N-01697547")
(":mass-delegate" "N-000BBDEA")
(":match" "N-03B92C0D")
- ("<" "D-007D")
+ ("<" "D-008E")
("<!" "N-02B10DF9")
("<-" "N-02B10DF9")
("<=" "D-0008")
- ("=" "D-0064")
- (">" "D-002F")
- (">=" "D-007C")
+ ("=" "D-0070")
+ (">" "D-0034")
+ (">=" "D-008D")
("abort" "N-02F934F6")
- ("abs" "D-001F")
+ ("abs" "D-0022")
("abs-path-p" "N-00477B23")
("accept" "D-0011")
("acons" "N-02E9343D")
("acons-new" "N-0371BAFA")
("aconsql-new" "N-01E315BD")
- ("acos" "D-0022")
- ("acosh" "D-0029")
+ ("acos" "D-0026")
+ ("acosh" "D-002D")
("add" "N-03244398")
("add*" "N-03244398")
("add-suffix" "N-00AE9981")
@@ -107,10 +107,10 @@
("alignof" "N-000F730E")
("alist-nremove" "N-000CD07F")
("alist-remove" "N-001A53C4")
- ("all" "D-002D")
+ ("all" "D-0031")
("all*" "N-00F6E2A2")
("allocate-struct" "N-03168BF2")
- ("and" "D-0081")
+ ("and" "D-0092")
("andf" "N-01E7D2AD")
("ap" "N-011CFC0C")
("apf" "N-012A7E6A")
@@ -129,20 +129,20 @@
("array" "N-0117BE95")
("arraysize" "N-002129D6")
("as" "N-028B26DD")
- ("ash" "D-005A")
- ("asin" "D-004D")
- ("asinh" "D-001C")
- ("assert" "D-0080")
+ ("ash" "D-0065")
+ ("asin" "D-0057")
+ ("asinh" "D-001E")
+ ("assert" "D-0091")
("assoc" "N-00E9306D")
("assq" "N-00123702")
("assql" "N-00123702")
("at-exit-call" "N-003EEEF5")
("at-exit-do-not-call" "N-003EEEF5")
- ("atan" "D-007B")
- ("atan2" "D-001D")
+ ("atan" "D-008C")
+ ("atan2" "D-0020")
("atanh" "D-000B")
("atom" "N-0076C7BE")
- ("awk" "D-0013")
+ ("awk" "D-0014")
("base-name" "N-02C01721")
("base64-decode" "N-01B05083")
("base64-decode-buf" "N-01B05083")
@@ -157,13 +157,13 @@
("bchar" "N-0008D7DC")
("bignum-len" "N-020294AB")
("bignump" "N-03E9D6E1")
- ("bind" "D-0018")
+ ("bind" "D-0019")
("bindable" "N-0222F2E3")
- ("bit" "D-002B")
- ("bitset" "D-0025")
+ ("bit" "D-002F")
+ ("bitset" "D-0029")
("blkcnt-t" "N-01153D9E")
("blksize-t" "N-01153D9E")
- ("block" "D-0033")
+ ("block" "D-0039")
("block*" "N-02F60DCE")
("bool" "D-000C")
("boundp" "N-01FBF828")
@@ -176,11 +176,11 @@
("bstr" "N-0225F1EF")
("bstr-d" "N-0225F1EF")
("bstr-s" "N-0225F1EF")
- ("buf" "D-0015")
+ ("buf" "D-0016")
("buf-alloc-size" "N-013A3727")
("buf-carray" "N-0022F54E")
("buf-compress" "N-02DB9DFB")
- ("buf-d" "D-0040")
+ ("buf-d" "D-0048")
("buf-decompress" "N-02DB9DFB")
("buf-get-char" "N-03E9074A")
("buf-get-cptr" "N-00E90766")
@@ -244,7 +244,7 @@
("call-super-method" "N-016185D1")
("call-update-expander" "N-03B6BCE9")
("callf" "N-00192C21")
- ("car" "D-0021")
+ ("car" "D-0025")
("carray" "N-0139F9ED")
("carray-blank" "N-00DD8DF1")
("carray-buf" "N-00D75AD6")
@@ -281,7 +281,7 @@
("cat-str" "N-00B6ACE3")
("cat-streams" "N-020BF082")
("cat-vec" "N-01AEB28B")
- ("catch" "D-006C")
+ ("catch" "D-0078")
("catch*" "N-0211F3D3")
("catch**" "N-0211F3D3")
("catch-frame" "N-0233BAE3")
@@ -289,11 +289,12 @@
("catenated-stream-push" "N-0050A46A")
("cbaud" "N-01B1B5DF")
("cbaudex" "N-01B1B5DF")
+ ("cbrt" "D-0012")
("cdar" "N-001FA3CB")
("cdddddr" "N-001FA3CB")
("cddr" "N-001FA3CB")
- ("cdr" "D-001A")
- ("ceil" "D-0037")
+ ("cdr" "D-001C")
+ ("ceil" "D-003E")
("ceil-rem" "N-02DE978F")
("ceil1" "N-02C8FF28")
("chain" "N-00C53CF7")
@@ -332,7 +333,7 @@
("clean-file" "N-001939D4")
("clear-cflags" "N-02061924")
("clear-dirty" "N-03AB857D")
- ("clear-error" "D-003D")
+ ("clear-error" "D-0045")
("clear-iflags" "N-02061924")
("clear-lflags" "N-02061924")
("clear-mask" "N-0269D998")
@@ -342,7 +343,7 @@
("clocal" "N-01B1B5DF")
("clock-t" "N-01B6F219")
("clockid-t" "N-01153D9E")
- ("close" "D-006F")
+ ("close" "D-007C")
("close-lazy-streams" "N-00B8ACD5")
("close-stream" "N-00596930")
("closedir" "N-01FEE88A")
@@ -352,7 +353,7 @@
("cmspar" "N-01B1B5DF")
("cnsort" "N-02102493")
("coded-length" "N-0167F423")
- ("coll" "D-0058")
+ ("coll" "D-0062")
("collect" "D-000E")
("collect-each" "N-0105F01D")
("collect-each*" "N-0105F01D")
@@ -411,15 +412,16 @@
("copy-tree" "N-015EB85E")
("copy-tree-iter" "N-025C3140")
("copy-vec" "N-010E7635")
+ ("copysign" "N-035C06D4")
("cos" "D-000A")
- ("cosh" "D-0084")
+ ("cosh" "D-0096")
("count" "N-00AE0CB6")
("count-if" "N-00AE0CB6")
("count-until-match" "N-00EFD668")
("countq" "N-01DF131F")
("countql" "N-01DF131F")
("countqual" "N-01DF131F")
- ("cptr" "D-006D")
+ ("cptr" "D-0079")
("cptr-buf" "N-037139E3")
("cptr-carray" "N-02257F04")
("cptr-cast" "N-01A212ED")
@@ -459,7 +461,7 @@
("data" "N-03B6EA7D")
("dec" "N-03A0AABD")
("defer-warning" "N-001106AB")
- ("defex" "D-0014")
+ ("defex" "D-0015")
("deffi" "N-00DCE51D")
("deffi-cb" "N-00C54FC8")
("deffi-cb-unsafe" "N-00C54FC8")
@@ -489,7 +491,7 @@
("defun-match" "N-02BF0F8C")
("defvar" "N-039DD0E7")
("defvarl" "N-03F36A75")
- ("del" "D-0042")
+ ("del" "D-004B")
("del*" "N-0166445C")
("delay" "N-00DCE524")
("delcons" "N-03A1ABA8")
@@ -511,7 +513,7 @@
("dlsym-checked" "N-029063A0")
("dlvsym" "N-01B1E865")
("dlvsym-checked" "N-029063A0")
- ("do" "D-0062")
+ ("do" "D-006D")
("doc" "N-0097F54C")
("dohash" "N-039105E8")
("doloop" "N-01FF4DDB")
@@ -519,6 +521,7 @@
("dotimes" "N-02D31F8C")
("double" "N-03237030")
("downcase-str" "N-03DA541E")
+ ("drem" "N-035C06D4")
("drop" "N-01C6C906")
("drop-until" "N-011E5936")
("drop-while" "N-011E5936")
@@ -534,7 +537,7 @@
("dump-deferred-warnings" "N-0335651E")
("dup" "N-0387F549")
("dupfd" "N-01F91AEF")
- ("dwim" "D-0071")
+ ("dwim" "D-007F")
("e2big" "N-036B1BDB")
("eacces" "N-036B1BDB")
("each" "N-0105F01D")
@@ -589,7 +592,7 @@
("eisconn" "N-036B1BDB")
("eisdir" "N-036B1BDB")
("elemsize" "N-01D55CC4")
- ("elemtype" "D-003C")
+ ("elemtype" "D-0044")
("eloop" "N-036B1BDB")
("emfile" "N-036B1BDB")
("emlink" "N-036B1BDB")
@@ -649,11 +652,13 @@
("eprototype" "N-036B1BDB")
("eq" "N-02550B35")
("eql" "N-02550B35")
- ("equal" "D-0036")
+ ("equal" "D-003D")
("equot" "N-02ACCDDF")
("erange" "N-036B1BDB")
+ ("erf" "D-0043")
+ ("erfc" "D-007E")
("erofs" "N-036B1BDB")
- ("errno" "D-0035")
+ ("errno" "D-003C")
("error" "N-015466AD")
("espipe" "N-036B1BDB")
("esrch" "N-036B1BDB")
@@ -672,14 +677,17 @@
("exec" "N-02D6C913")
("exit" "N-0006C92F")
("exit*" "N-03592671")
- ("exp" "D-0075")
+ ("exp" "D-0084")
+ ("exp10" "D-0049")
+ ("exp2" "D-003A")
("expand" "N-00EBC996")
("expand*" "N-00EBC996")
("expand-left" "N-00E168FE")
("expand-right" "N-023B6B64")
("expand-with-free-refs" "N-0334827B")
("expander-let" "N-00DBD46D")
- ("expt" "D-0082")
+ ("expm1" "D-0033")
+ ("expt" "D-0093")
("exptmod" "D-000F")
("extproc" "N-0072FF5E")
("f" "N-003BDFA9")
@@ -703,6 +711,7 @@
("fcntl" "N-03793032")
("fconv" "N-018CCE37")
("fd-cloexec" "N-021805C2")
+ ("fdim" "N-035C06D4")
("ff" "N-006B6E54")
("ff0" "N-03BD477F")
("ff1" "N-03BD477F")
@@ -739,12 +748,12 @@
("file-get-string" "N-02238370")
("file-put" "N-0041C2E5")
("file-put-buf" "N-02AE3A31")
- ("file-put-json" "D-0023")
- ("file-put-jsons" "D-0067")
+ ("file-put-json" "D-0027")
+ ("file-put-jsons" "D-0073")
("file-put-lines" "N-0041C2E5")
("file-put-string" "N-0041C2E5")
("fileno" "N-008ACF75")
- ("fill-buf" "D-0044")
+ ("fill-buf" "D-004D")
("fill-buf-adjust" "N-00D142E1")
("fill-carray" "N-00737951")
("fill-obj" "N-0039A1D1")
@@ -753,7 +762,7 @@
("filter-equal" "N-03136087")
("filter-string-tree" "N-00C9EEB0")
("finalize" "N-01230613")
- ("finally" "D-0065")
+ ("finally" "D-0071")
("find" "N-00C9DFF6")
("find-frame" "N-02B97226")
("find-frames" "N-02B97226")
@@ -794,7 +803,7 @@
("float" "N-03237030")
("floatp" "N-03E9D6E1")
("flock" "N-004E5B3E")
- ("floor" "D-0073")
+ ("floor" "D-0082")
("floor-rem" "N-02DE978F")
("floor1" "N-01ED20D1")
("flow" "N-02B2153E")
@@ -802,6 +811,8 @@
("flush-stream" "N-03999913")
("flusho" "N-0072FF5E")
("fmakunbound" "N-02964FC0")
+ ("fmax" "N-035C06D4")
+ ("fmin" "N-035C06D4")
("fmt" "N-0347F537")
("fname" "N-039E5F67")
("fnm-casefold" "N-0330E15A")
@@ -860,7 +871,8 @@
("functionp" "N-00F6F5F8")
("fuzz" "N-03CAE17D")
("fw" "N-0357AE6F")
- ("gather" "D-0045")
+ ("gamma" "D-001A")
+ ("gather" "D-004F")
("gcd" "N-03D44645")
("gen" "N-0323BEBD")
("gen-hash-seed" "N-002CFA72")
@@ -869,10 +881,10 @@
("gequal" "N-00A3E42D")
("get" "N-03D9F55D")
("get-buf-from-stream" "N-02954B48")
- ("get-byte" "D-0031")
- ("get-char" "D-005C")
- ("get-error" "D-0024")
- ("get-error-str" "D-006B")
+ ("get-byte" "D-0037")
+ ("get-char" "D-0067")
+ ("get-error" "D-0028")
+ ("get-error-str" "D-0077")
("get-fd" "N-011D42AB")
("get-frames" "N-010405DA")
("get-hash-userdata" "N-030B41A7")
@@ -941,7 +953,7 @@
("handle*" "N-03F7D8B5")
("handle-frame" "N-0233BAE3")
("handler-bind" "N-00A4ECC9")
- ("hash" "D-003A")
+ ("hash" "D-0041")
("hash-alist" "N-00C9B125")
("hash-begin" "N-0225209D")
("hash-construct" "N-017E6F4C")
@@ -980,6 +992,7 @@
("html-encode" "N-01263EAE")
("html-encode*" "N-01263EAE")
("hupcl" "N-01B1B5DF")
+ ("hypot" "N-035C06D4")
("iapply" "N-026C3723")
("icanon" "N-0072FF5E")
("icrnl" "N-02391683")
@@ -988,7 +1001,7 @@
("identity*" "N-004834CC")
("ido" "N-011CFC0C")
("iexten" "N-0072FF5E")
- ("if" "D-0020")
+ ("if" "D-0024")
("if-match" "N-01BE5C4A")
("ifa" "N-018F39B0")
("iff" "N-000E3A74")
@@ -1003,7 +1016,7 @@
("imaxbel" "N-02391683")
("improper-plist-to-alist" "N-006E31B5")
("in" "N-016BE41C")
- ("in-package" "D-0019")
+ ("in-package" "D-001B")
("in-range" "N-02C56FB6")
("in-range*" "N-02C56FB6")
("in6addr-any" "N-026A2C3B")
@@ -1064,11 +1077,11 @@
("isig" "N-0072FF5E")
("isqrt" "D-0010")
("istrip" "N-02391683")
- ("iter-begin" "D-0046")
+ ("iter-begin" "D-0050")
("iter-item" "D-0001")
- ("iter-more" "D-0026")
+ ("iter-more" "D-002A")
("iter-reset" "D-0009")
- ("iter-step" "D-0061")
+ ("iter-step" "D-006C")
("iterable" "N-01156AE3")
("itimer-prof" "N-02B7882A")
("itimer-real" "N-02B7882A")
@@ -1078,6 +1091,9 @@
("ixany" "N-02391683")
("ixoff" "N-02391683")
("ixon" "N-02391683")
+ ("j0" "D-0094")
+ ("j1" "D-0064")
+ ("jn" "N-035C06D4")
("join" "N-00B6ACE3")
("join-with" "N-00B6ACE3")
("json" "N-0222106A")
@@ -1098,10 +1114,10 @@
("kill" "N-0386CCD5")
("krs" "N-02D33A4D")
("labels" "N-0209307D")
- ("lambda" "D-0074")
+ ("lambda" "D-0083")
("lambda-match" "N-031E43FF")
("lambda-set" "N-02FEBA97")
- ("last" "D-004E")
+ ("last" "D-0058")
("lazy-str" "N-02AFF63D")
("lazy-str-force" "N-03269DEF")
("lazy-str-force-upto" "N-0212FED6")
@@ -1115,11 +1131,12 @@
("lcons-cdr" "N-03598F4D")
("lcons-fun" "N-02E1BA6F")
("lconsp" "N-02E217A2")
+ ("ldexp" "N-035C06D4")
("ldiff" "N-02193773")
("ldo" "N-03EF3A27")
("left" "N-020D5C1D")
("len" "N-03AD172A")
- ("length" "D-0051")
+ ("length" "D-005B")
("length-buf" "N-0026D89A")
("length-carray" "N-03FF97BD")
("length-list" "N-01F8186A")
@@ -1136,6 +1153,7 @@
("lexical-fun-p" "N-007B1A53")
("lexical-lisp1-binding" "N-02D124AB")
("lexical-var-p" "N-007B1A53")
+ ("lgamma" "D-0086")
("lib-version" "N-032F57D4")
("line" "N-02D5D09D")
("link" "N-009EF0C8")
@@ -1149,13 +1167,13 @@
("listp" "N-03F70343")
("lnew" "N-0230059D")
("lnew*" "N-021E6FDC")
- ("load" "D-0039")
+ ("load" "D-0040")
("load-args-process" "N-03D9382A")
("load-args-recurse" "N-03067356")
("load-for" "N-0020A085")
- ("load-time" "D-0078")
+ ("load-time" "D-0089")
("loff-t" "N-01153D9E")
- ("log" "D-0050")
+ ("log" "D-005A")
("log-alert" "N-035D75EC")
("log-auth" "N-0116F48F")
("log-authpriv" "N-0116F48F")
@@ -1174,15 +1192,17 @@
("log-pid" "N-02371913")
("log-user" "N-0116F48F")
("log-warning" "N-035D75EC")
- ("log10" "D-0056")
- ("log2" "D-0063")
- ("logand" "D-001E")
- ("logcount" "D-004B")
- ("logior" "D-007A")
- ("lognot" "D-003F")
+ ("log10" "D-0060")
+ ("log1p" "D-001F")
+ ("log2" "D-006F")
+ ("logand" "D-0021")
+ ("logb" "D-006E")
+ ("logcount" "D-0055")
+ ("logior" "D-008B")
+ ("lognot" "D-0047")
("lognot1" "N-019541E2")
("logtest" "N-00B1548A")
- ("logtrunc" "D-0034")
+ ("logtrunc" "D-003B")
("logxor" "N-02D5AF97")
("long" "N-0235F4E4")
("long-suffix" "N-00A3183A")
@@ -1290,14 +1310,14 @@
("meq" "N-020A0042")
("meql" "N-020A0042")
("mequal" "N-020A0042")
- ("merge" "D-007E")
+ ("merge" "D-008F")
("merge-delete-package" "N-0160EA2C")
("meth" "N-02C216C3")
("method" "N-022200C1")
("mf" "N-036B6E55")
("min" "N-023C3643")
("minor" "N-02F0F482")
- ("minusp" "D-0055")
+ ("minusp" "D-005F")
("mismatch" "N-03164F4F")
("mkdir" "N-00C543B8")
("mkdtemp" "N-026E4871")
@@ -1308,7 +1328,7 @@
("mlet" "N-008216E0")
("mmakunbound" "N-02964FC0")
("mmap" "N-03C6CE44")
- ("mod" "D-0027")
+ ("mod" "D-002B")
("mode-t" "N-01153D9E")
("mprotect" "N-02805A83")
("ms-async" "N-01F782B2")
@@ -1330,6 +1350,7 @@
("ncon" "N-022F6E60")
("ncon*" "N-022F6E60")
("nconc" "N-0014162F")
+ ("nearbyint" "D-0023")
("neg" "N-02C9F5F9")
("neq" "N-0216A942")
("neql" "N-0216A942")
@@ -1337,8 +1358,9 @@
("new" "N-0230059D")
("new*" "N-021E6FDC")
("nexpand-left" "N-00E168FE")
- ("next" "D-005F")
+ ("next" "D-006A")
("next-file" "N-00839D2F")
+ ("nextafter" "N-035C06D4")
("nf" "N-0267AE6D")
("nil" "N-015134D8")
("nilf" "N-007E0508")
@@ -1348,10 +1370,10 @@
("nldly" "N-03BD477F")
("nlink-t" "N-01153D9E")
("noflsh" "N-0072FF5E")
- ("none" "D-005E")
+ ("none" "D-0069")
("nor" "N-03662D87")
("norf" "N-00C18907")
- ("not" "D-0032")
+ ("not" "D-0038")
("notf" "N-0026CE18")
("nr" "N-03A7AE6D")
("nreconc" "N-012FF2DC")
@@ -1363,7 +1385,7 @@
("nthcdr" "N-03D71D22")
("nthlast" "N-02FC66FA")
("null" "N-03C679D2")
- ("nullify" "D-0069")
+ ("nullify" "D-0075")
("num-str" "N-028043AE")
("numberp" "N-03E9D6E1")
("nzerop" "N-0197FF9D")
@@ -1390,7 +1412,7 @@
("obtain*-block" "N-0102F0EB")
("obtain-block" "N-01C791D0")
("ocrnl" "N-03BD477F")
- ("oddp" "D-004A")
+ ("oddp" "D-0054")
("ofdel" "N-03BD477F")
("off-t" "N-01153D9E")
("offsetof" "N-013D0A5C")
@@ -1422,7 +1444,7 @@
("opthelp-conventions" "N-010286EC")
("opthelp-types" "N-010286EC")
("opts" "N-01D911E8")
- ("or" "D-0070")
+ ("or" "D-007D")
("orec" "N-0003ED2C")
("orf" "N-01E7D2AD")
("ors" "N-02D33A3D")
@@ -1487,7 +1509,7 @@
("placelet" "N-0393C970")
("placelet*" "N-0393C970")
("plist-to-alist" "N-006E31B5")
- ("plusp" "D-0016")
+ ("plusp" "D-0017")
("poll" "N-0386D39D")
("poly" "N-026201AD")
("pop" "N-017F39D2")
@@ -1507,7 +1529,7 @@
("pprof" "N-018C92AB")
("pred" "N-038E636C")
("prinl" "N-02FCCE0D")
- ("print" "D-002A")
+ ("print" "D-002E")
("prn" "N-01E7F5F7")
("prod" "N-0163FFE2")
("prof" "N-004C9B10")
@@ -1534,38 +1556,51 @@
("ptrdiff-t" "N-01B6F219")
("pure-rel-path-p" "N-019DEA44")
("purge-deferred-warning" "N-0077C4FE")
- ("push" "D-001B")
+ ("push" "D-001D")
("push-after-load" "N-01F489FE")
("pushhash" "N-022660B2")
("pushnew" "N-02C37AB0")
- ("put-buf" "D-0083")
+ ("put-buf" "D-0095")
("put-byte" "D-000D")
("put-carray" "N-00737951")
- ("put-char" "D-003B")
+ ("put-char" "D-0042")
("put-json" "N-009C27EF")
("put-jsonl" "N-009C27EF")
("put-jsons" "N-0124CAE6")
("put-line" "N-012163C3")
("put-lines" "N-0367B282")
("put-obj" "N-025DB229")
- ("put-string" "D-0066")
+ ("put-string" "D-0072")
("put-strings" "N-0367B282")
("pwd" "N-0047F5F6")
("qquote" "N-01665185")
- ("qref" "D-0060")
+ ("qref" "D-006B")
("quantile" "N-0318C018")
("quip" "N-03C6D422")
("quote" "N-0163F998")
("r$" "N-03BBB0C5")
("r-atan2" "N-03BBA063")
("r-ceil" "N-0399208F")
+ ("r-copysign" "N-01358F72")
+ ("r-drem" "N-03A91FFE")
("r-expt" "N-00192012")
+ ("r-fdim" "N-03A926CB")
("r-floor" "N-00BBC669")
+ ("r-fmax" "N-0059272A")
+ ("r-fmin" "N-0379272F")
+ ("r-hypot" "N-011BB965")
+ ("r-jn" "N-0286D544")
+ ("r-ldexp" "N-01DBC90C")
("r-lognot" "N-00495055")
("r-logtrunc" "N-02439AC4")
("r-mod" "N-02F8C918")
+ ("r-nextafter" "N-038029B1")
+ ("r-remainder" "N-034F0B15")
("r-round" "N-031D7670")
+ ("r-scalb" "N-00BD7321")
+ ("r-scalbln" "N-0115C2A2")
("r-trunc" "N-02CD7330")
+ ("r-yn" "N-0186D541")
("r^" "N-03BBB0C5")
("r^$" "N-03BBB0C5")
("raise" "N-0108FFCE")
@@ -1617,6 +1652,7 @@
("rel-path" "N-016892B4")
("relate" "N-032DBF7E")
("release-deferred-warnings" "N-012F0BE9")
+ ("remainder" "N-035C06D4")
("remhash" "N-0029C57A")
("remove-if" "N-0159C541")
("remove-if*" "N-0159C541")
@@ -1629,8 +1665,8 @@
("remqual" "N-000ECD82")
("remqual*" "N-00B85CD2")
("rename-path" "N-016EF40C")
- ("rep" "D-0054")
- ("repeat" "D-0017")
+ ("rep" "D-005E")
+ ("repeat" "D-0018")
("replace" "N-035991E1")
("replace-buf" "N-01C59E4E")
("replace-env" "N-03C59E3B")
@@ -1639,7 +1675,7 @@
("replace-struct" "N-01A8343B")
("replace-tree-iter" "N-01225FF3")
("replace-vec" "N-01F59E62")
- ("require" "D-0038")
+ ("require" "D-003F")
("res" "N-03D33A57")
("reset-struct" "N-002A609F")
("rest" "N-02288559")
@@ -1653,6 +1689,7 @@
("rfind" "N-0301CDB6")
("rfind-if" "N-0301CDB6")
("right" "N-020D5C1D")
+ ("rint" "D-007A")
("rlcp" "N-024EB211")
("rlcp-tree" "N-024EB211")
("rlet" "N-008212A0")
@@ -1674,11 +1711,11 @@
("rng-" "N-01A056E4")
("rot" "N-025DB962")
("rotate" "N-0166291D")
- ("round" "D-0068")
+ ("round" "D-0074")
("round-rem" "N-02DE978F")
("round1" "N-03EA1351")
("rperm" "N-0188EBDE")
- ("rplaca" "D-0053")
+ ("rplaca" "D-005D")
("rplacd" "D-0003")
("rpoly" "N-026201AD")
("rpos" "N-01F68300")
@@ -1705,6 +1742,8 @@
("s-ixoth" "N-013C16AB")
("save-exe" "N-02850687")
("sbit" "N-011F2878")
+ ("scalb" "N-035C06D4")
+ ("scalbln" "N-035C06D4")
("scan" "N-03E989D0")
("scan-until-match" "N-00EFD668")
("search" "N-015D8676")
@@ -1727,7 +1766,7 @@
("seq-next" "N-02E3D643")
("seq-reset" "N-01CA6912")
("seqp" "N-03C6CAE0")
- ("set" "D-006E")
+ ("set" "D-007B")
("set-cflags" "N-02061924")
("set-hash-userdata" "N-030B40A7")
("set-iflags" "N-02061924")
@@ -1814,10 +1853,11 @@
("sig-winch" "N-0176430F")
("sig-xcpu" "N-0176430F")
("sig-xfsz" "N-0176430F")
- ("sign-extend" "D-0047")
- ("signum" "D-003E")
- ("sin" "D-006A")
- ("sinh" "D-005D")
+ ("sign-extend" "D-0051")
+ ("significand" "D-0085")
+ ("signum" "D-0046")
+ ("sin" "D-0076")
+ ("sinh" "D-0068")
("sixth" "N-01B0FA33")
("size-t" "N-01B6F219")
("size-vec" "N-01000634")
@@ -1868,7 +1908,7 @@
("sockaddr-un" "N-01DD05D2")
("socklen-t" "N-01153D9E")
("sol-socket" "N-031C01CB")
- ("some" "D-0028")
+ ("some" "D-002C")
("some-false" "N-016BDF48")
("some-true" "N-016BDF48")
("sort" "N-03923640")
@@ -1885,22 +1925,22 @@
("split-str" "N-000386B4")
("split-str-set" "N-0296195B")
("spln" "N-026FC0BD")
- ("sqrt" "D-0072")
- ("square" "D-0048")
+ ("sqrt" "D-0081")
+ ("square" "D-0052")
("ssize-t" "N-01153D9E")
("ssort" "N-03923640")
("sspl" "N-0296195B")
("sssucc" "N-038E636C")
("ssucc" "N-038E636C")
("starts-with" "N-004955D4")
- ("stat" "D-002E")
+ ("stat" "D-0032")
("static-slot" "N-02C47D17")
("static-slot-ensure" "N-02E71F31")
("static-slot-home" "N-01F88B0D")
("static-slot-p" "N-032FD510")
("static-slot-set" "N-0017D1B5")
("stdlib" "N-008E4BC2")
- ("str" "D-0059")
+ ("str" "D-0063")
("str-addr" "N-02E1B78B")
("str-buf" "N-012BF6AD")
("str-d" "N-01736060")
@@ -1988,8 +2028,8 @@
("take" "N-00F6D433")
("take-until" "N-01E42C4C")
("take-while" "N-01E42C4C")
- ("tan" "D-004C")
- ("tanh" "D-0030")
+ ("tan" "D-0056")
+ ("tanh" "D-0035")
("tb" "N-02AB6E53")
("tc" "N-029B6E53")
("tcdrain" "N-01AC4760")
@@ -2021,15 +2061,16 @@
("test-set" "N-036C7E9E")
("test-set-indent-mode" "N-01A1F89C")
("tf" "N-007E0508")
+ ("tgamma" "D-0080")
("third" "N-01B0FA33")
- ("throw" "D-002C")
+ ("throw" "D-0030")
("throwf" "N-015466AD")
- ("time" "D-0049")
+ ("time" "D-0053")
("time-fields-local" "N-00789418")
("time-fields-utc" "N-00789418")
("time-local" "N-001284ED")
("time-nsec" "N-03B6DB3D")
- ("time-parse" "D-005B")
+ ("time-parse" "D-0066")
("time-parse-local" "N-00207C99")
("time-parse-utc" "N-00207C99")
("time-str-local" "N-01711783")
@@ -2060,7 +2101,7 @@
("touch" "N-0038DD42")
("tprint" "N-0217DE45")
("trace" "N-02833733")
- ("trailer" "D-0057")
+ ("trailer" "D-0061")
("transpose" "N-03AA85AD")
("tree" "N-02F6D50B")
("tree-begin" "N-02887FCA")
@@ -2097,7 +2138,7 @@
("trim-short-suffix" "N-03CAC692")
("trim-str" "N-00E6E63B")
("true" "N-00373D97")
- ("trunc" "D-007F")
+ ("trunc" "D-0090")
("trunc-rem" "N-02DE978F")
("trunc1" "N-02E91F51")
("truncate" "N-0032FBF3")
@@ -2134,7 +2175,7 @@
("umethod" "N-000BCBC5")
("uname" "N-0308D954")
("unget-byte" "D-0002")
- ("unget-char" "D-0012")
+ ("unget-char" "D-0013")
("uni" "N-00DFDE76")
("unintern" "N-01B6BFC2")
("union" "N-01C78B86")
@@ -2148,7 +2189,7 @@
("unless" "N-017EFAB6")
("unquote" "N-036B313D")
("unsetenv" "N-002E0364")
- ("until" "D-0043")
+ ("until" "D-004C")
("until*" "N-01F7BF0B")
("untrace" "N-02833733")
("unuse-package" "N-024BF63F")
@@ -2222,7 +2263,7 @@
("while-match-case" "N-007220BC")
("while-true-match-case" "N-007220BC")
("whilet" "N-0154DC75")
- ("width" "D-0041")
+ ("width" "D-004A")
("width-check" "N-01A9EA49")
("window-map" "N-015AFD48")
("window-mapdo" "N-015AFD48")
@@ -2253,12 +2294,15 @@
("wstr-d" "N-033B8A6D")
("wstr-s" "N-033B8A6D")
("xcase" "N-0072FF5E")
+ ("y0" "D-004E")
+ ("y1" "D-0036")
("yield" "N-02AE5C1E")
("yield-from" "N-01556613")
+ ("yn" "N-035C06D4")
("zap" "N-037F3A8C")
("zarray" "N-017039ED")
("zchar" "N-0008D7DC")
("zero-fill" "N-016D3BB5")
- ("zerop" "D-0077")
+ ("zerop" "D-0088")
("zip" "N-03AA85AD")
("znew" "N-00B1FC38"))))
diff --git a/txr.1 b/txr.1
index 954d04fa..a8941980 100644
--- a/txr.1
+++ b/txr.1
@@ -50549,6 +50549,59 @@ four rounding mode variables, and the function succeeds anyway, then the
rounding behavior of floating-point operations depends on the host
environment's interpretation of that value.
+.SS* Supplementary Math Library
+
+The following functions are defined, if they are available from the host
+platform. They corresponds to same-named functions in the ISO C language
+standard, which appeared in the 1999 revision ("C99").
+
+Even if some of these functions happen not to be defined, it is nevertheless
+possible to define them as methods in a user-defined arithmetic structure.
+See the section User-Defined Arithemtic Types below
+
+.coNP Functions @, cbrt @, erf @, erfc @, exp10 @, exp2 @, expm1 @, gamma @, j0 @, j1 @, lgamma @, log1p @, logb @, nearbyint @, rint @, significand @, tgamma @ y0 and @ y1
+.synb
+.mets (cbrt << arg )
+.mets (erf << arg )
+.mets (erfc << arg )
+.mets (exp10 << arg )
+.mets (exp2 << arg )
+.mets (expm1 << arg )
+.mets (gamma << arg )
+.mets (j0 << arg )
+.mets (j1 << arg )
+.mets (lgamma << arg )
+.mets (log1p << arg )
+.mets (logb << arg )
+.mets (nearbyint << arg )
+.mets (rint << arg )
+.mets (significand << arg )
+.mets (tgamma << arg )
+.mets (y0 << arg )
+.mets (y1 << arg )
+.syne
+.desc
+These are one-argument functions, which take a numeric argument, and return a floating-point result.
+
+.coNP Functions @, copysign @, drem @, fdim @, fmax @, fmin @, hypot @, jn @, ldexp @, nextafter @, remainder @, scalb @ scalbln and @ yn
+.synb
+.mets (copysign < arg1 << arg2 )
+.mets (drem < arg1 << arg2 )
+.mets (fdim < arg1 << arg2 )
+.mets (fmax < arg1 << arg2 )
+.mets (fmin < arg1 << arg2 )
+.mets (hypot < arg1 << arg2 )
+.mets (jn < arg1 << arg2 )
+.mets (ldexp < arg1 << arg2 )
+.mets (nextafter < arg1 << arg2 )
+.mets (remainder < arg1 << arg2 )
+.mets (scalb < arg1 << arg2 )
+.mets (scalbln < arg1 << arg2 )
+.mets (yn < arg1 << arg2 )
+.syne
+.desc
+These are two-argument functions, which take numeric arguments, and return a floating-point result.
+
.SS* Bit Operations
In \*(TL, similarly to Common Lisp, bit operations on integers are based
on a concept that might be called "infinite two's complement".
@@ -51485,6 +51538,37 @@ arguments must be integers.
.bmnl logtrunc
.bmnr r-logtrunc logtrunc
.bmnl sign-extend
+.um cbrt
+.um erf
+.um erfc
+.um exp10
+.um exp2
+.um expm1
+.um gamma
+.um j0
+.um j1
+.um lgamma
+.um log1p
+.um logb
+.um nearbyint
+.um rint
+.um significand
+.um tgamma
+.um y0
+.um y1
+.bmnr r-copysign copysign
+.bmnr r-drem drem
+.bmnr r-fdim fdim
+.bmnr r-fmax fmax
+.bmnr r-fmin fmin
+.bmnr r-hypot hypot
+.bmnr r-jn jn
+.bmnr r-ldexp ldexp
+.bmnr r-nextafter nextafter
+.bmnr r-remainder remainder
+.bmnr r-scalb scalb
+.bmnr r-scalbln scalbln
+.bmnr r-yn yn
Note: the
.code sign-extend