diff options
author | Duncan Wilkie <antigravityd@gmail.com> | 2023-11-18 06:11:09 -0600 |
---|---|---|
committer | Duncan Wilkie <antigravityd@gmail.com> | 2023-11-18 06:11:09 -0600 |
commit | 11da511c784eca003deb90c23570f0873954e0de (patch) | |
tree | e14fdd3d5d6345956d67e79ae771d0633d28362b /ic-reals-6.3/tests/t0.c |
Initial commit.
Diffstat (limited to 'ic-reals-6.3/tests/t0.c')
-rw-r--r-- | ic-reals-6.3/tests/t0.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ic-reals-6.3/tests/t0.c b/ic-reals-6.3/tests/t0.c new file mode 100644 index 0000000..4b1ca8b --- /dev/null +++ b/ic-reals-6.3/tests/t0.c @@ -0,0 +1,37 @@ +#include <stdio.h> +#include "real.h" +#include <math.h> + +/* + * Random test + */ +main(int argc, char *argv[]) +{ + Real x, y, z; + double f; + Real makeRealSignCNQInt(Sign, char *, int, int, int); + + MyName = argv[0]; + + if (argc != 7) { + fprintf(stderr, "%s <sign> <c> <n> <a> <b> <ndigits>\n", MyName); + exit(1); + } + + initReals(); + + y = makeRealSignCNQInt( + atoi(argv[1]), /* sign */ + argv[2], /* c */ + atoi(argv[3]), /* n */ + atoi(argv[4]), /* a */ + atoi(argv[5])); /* b */ + + print_R_Dec(y, atoi(argv[6])); + printf("\n"); + + x = matrix_Int(y, 1, 2, 3, 4); + + print_R_Dec(x, atoi(argv[6])); + printf("\n"); +} |