diff options
Diffstat (limited to 'test/polynomial.c')
| -rw-r--r-- | test/polynomial.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/polynomial.c b/test/polynomial.c new file mode 100644 index 0000000..1591343 --- /dev/null +++ b/test/polynomial.c @@ -0,0 +1,15 @@ +#include <stddef.h> +#include "ts.h" + +bool ts_test_polynomial( void ) +{ + /* y = x0 ^ x1 */ + fp_t const x0[] = { 1, 2, 3, 4, 5 }; + fp_t const x1[] = { 0, 1, 2, 3, 4 }; + fp_t const e0[] = { 1, 2, 9, 64, 625 }; + + fp_t const * const x[2] = { x0, x1 }; + fp_t const * const e[1] = { e0 }; + + return ts_test(ts_polynomial, ts_polynomial_offset, x, e, sizeof( x0 ) / sizeof( *x0 ), NULL, &ts_polynomial_p); +} |