From 07e18043145f3d91c8ea7ec3ad41b3c905585277 Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Wed, 1 Jul 2026 09:42:39 +0400 Subject: initial commit: ts time series analysis library v0.1.0 - 354 financial and mathematical time-series indicators - Uniform C11 API with consistent function signatures - 349 passing tests with -Werror - Static and shared library builds - pkg-config integration - Python bindings - Fuzzing and sanitizer support - Security hardening flags --- test/minmax.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/minmax.c (limited to 'test/minmax.c') diff --git a/test/minmax.c b/test/minmax.c new file mode 100644 index 0000000..64ba78b --- /dev/null +++ b/test/minmax.c @@ -0,0 +1,17 @@ +#include +#include +#include "ts.h" + +bool ts_test_minmax( void ) +{ + uint_t k = 3; + + fp_t const x[] = { 1, 3, 2, 5, 4, 1, 6, 3, 2, 4 }; + fp_t const emin[] = { 1, 2, 2, 1, 1, 1, 2, 2 }; + fp_t const emax[] = { 3, 5, 5, 5, 6, 6, 6, 4 }; + + fp_t const * const inp[1] = { x }; + fp_t const * const exp[2] = { emin, emax }; + + return ts_test(ts_minmax, ts_minmax_offset, inp, exp, sizeof( x ) / sizeof( *x ), (ts_constant_t *)&k, &ts_minmax_p); +} -- cgit v1.3.1