From 67761f7d5710fa93e2cd60726c1b8a02776077b5 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 13 Jan 2016 06:28:21 -0500 Subject: more floating point test code --- bigtest.c | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'bigtest.c') diff --git a/bigtest.c b/bigtest.c index f6b2551..cd8cd1d 100644 --- a/bigtest.c +++ b/bigtest.c @@ -19,6 +19,42 @@ unsigned long values[] = { }; int main(void) { + char i, j; + unsigned long got; + bignum(a); + bignum(b); + + ulong_to_big(1234L, a); + ulong_to_big(10L, b); + // got = cformat_big(&i, a); + // printf("got %lu, mag %d\n", got, i); + for(i = 0; i < 11; i++) { + cprintfancy_big(a); + big_mul(a, a, b); + } + + /* + ulong_to_big(5L, a); + for(i = 0; i < 10; i++) { + ulong_to_big((unsigned long)i, b); + j = big_cmp(a, b); + printf("5 cmp %d: %d\n", i, j); + } + */ + + /* + unsigned long al = 111, bl = 2, result; + + ulong_to_big(al, a); + ulong_to_big(bl, b); + big_div(a, a, b); + big_to_ulong(a, &result); + printf("%lu\n", result); + */ +hang: goto hang; +} + +int oldmain(void) { char i, j; unsigned long l = 123456789L; // 075bcd15, or 52501 + 256 * 1883 bignum(b); @@ -40,5 +76,5 @@ int main(void) { } printf("%d\n", PEEK(20)+256*PEEK(19)); -hang: goto hang; +// hang: goto hang; } -- cgit v1.2.3