summaryrefslogtreecommitdiffstats
path: root/arith.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-09-22 06:19:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-09-22 06:19:36 -0700
commitbbd2e86fa76d4afb0ca39a28682f5a0da62aa1a0 (patch)
tree6f81cef60ea2adc431af7458dd5b1548970e1ef0 /arith.h
parent2c977768ba68fa50f091dd7dbb3f335f06e835a1 (diff)
downloadtxr-bbd2e86fa76d4afb0ca39a28682f5a0da62aa1a0.tar.gz
txr-bbd2e86fa76d4afb0ca39a28682f5a0da62aa1a0.tar.bz2
txr-bbd2e86fa76d4afb0ca39a28682f5a0da62aa1a0.zip
math: quantile estimator using P-Squared algorithm.
* Makefile (psquare.o): New object file. * arith.c (psq_ops): New static structure. (quant_fun): New static function. (quantile): New function. (arith_init): Register quantile intrinsic. * arith.h (quantile): Declared. * psquare.c, psquare.h: New files. * tests/016/arith.tl: New tests. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
Diffstat (limited to 'arith.h')
-rw-r--r--arith.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arith.h b/arith.h
index 1651853a..21288519 100644
--- a/arith.h
+++ b/arith.h
@@ -61,6 +61,8 @@ val digits(val n, val base);
val poly(val x, val seq);
val rpoly(val x, val seq);
+val quantile(val pv, val chsize_in, val rate_in);
+
NORETURN void do_mp_error(val self, mp_err code);
void arith_init(void);
void arith_compat_fixup(int compat_ver);