diff options
author | B. Watson <yalhcru@gmail.com> | 2016-01-13 06:28:21 -0500 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2016-01-13 06:28:21 -0500 |
commit | 67761f7d5710fa93e2cd60726c1b8a02776077b5 (patch) | |
tree | 9043ccb47b42e360e51fba75edef88ec6966495b /bigtest.c | |
parent | 854aaed7643cc2224987738f04384f884d1084d5 (diff) | |
download | taipan-67761f7d5710fa93e2cd60726c1b8a02776077b5.tar.gz |
more floating point test code
Diffstat (limited to 'bigtest.c')
-rw-r--r-- | bigtest.c | 38 |
1 files changed, 37 insertions, 1 deletions
@@ -20,6 +20,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; } |