summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-01-11 23:09:22 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-01-11 23:09:22 -0800
commitfc14a0592d94b1dbb502afe298a67b9b544559af (patch)
treeb7be35c9a1ec5f1dddcc14e668a030024d1198dc /eval.c
parentc1535145101cf8758f3716c2e4fd3ddaa722f21c (diff)
downloadtxr-fc14a0592d94b1dbb502afe298a67b9b544559af.tar.gz
txr-fc14a0592d94b1dbb502afe298a67b9b544559af.tar.bz2
txr-fc14a0592d94b1dbb502afe298a67b9b544559af.zip
* arith.c (rising_product): New static function.
(n_choose_k, n_perm_k): New functions. * arith.h (n_choose_k, n_perm_k): Declared. * eval.c (eval_init): New functions interned. * txr.1: Documented.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 12f3ebd0..03e8d34d 100644
--- a/eval.c
+++ b/eval.c
@@ -2353,6 +2353,8 @@ void eval_init(void)
reg_fun(intern(lit("exp"), user_package), func_n1(expo));
reg_fun(intern(lit("sqrt"), user_package), func_n1(sqroot));
reg_fun(intern(lit("cum-norm-dist"), user_package), func_n1(cum_norm_dist));
+ reg_fun(intern(lit("n-choose-k"), user_package), func_n2(n_choose_k));
+ reg_fun(intern(lit("n-perm-k"), user_package), func_n2(n_perm_k));
reg_fun(intern(lit("fixnump"), user_package), func_n1(fixnump));
reg_fun(intern(lit("bignump"), user_package), func_n1(bignump));
reg_fun(intern(lit("floatp"), user_package), func_n1(floatp));