aboutsummaryrefslogtreecommitdiff
path: root/bigtest.c
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2016-01-13 06:28:21 -0500
committerB. Watson <yalhcru@gmail.com>2016-01-13 06:28:21 -0500
commit67761f7d5710fa93e2cd60726c1b8a02776077b5 (patch)
tree9043ccb47b42e360e51fba75edef88ec6966495b /bigtest.c
parent854aaed7643cc2224987738f04384f884d1084d5 (diff)
downloadtaipan-67761f7d5710fa93e2cd60726c1b8a02776077b5.tar.gz
more floating point test code
Diffstat (limited to 'bigtest.c')
-rw-r--r--bigtest.c38
1 files changed, 37 insertions, 1 deletions
diff --git a/bigtest.c b/bigtest.c
index f6b2551..cd8cd1d 100644
--- a/bigtest.c
+++ b/bigtest.c
@@ -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;
}