diff test/float.c @ 91:9b1aeb62e0b9

powerpc continue... (floating point)
author kono
date Fri, 07 Mar 2003 05:22:01 +0900
parents 07e3113c3c13
children 1ad7045741a7
line wrap: on
line diff
--- a/test/float.c	Fri Mar 07 03:09:02 2003 +0900
+++ b/test/float.c	Fri Mar 07 05:22:01 2003 +0900
@@ -13,13 +13,25 @@
 double d1 = 0.3;
 double d2 = -0.2;
 
-unsigned u;
+int
+d2i(double d) {
+   return (int)d;
+}
+
+double
+i2d(int u) {
+   return (double)u;
+}
 
-int
-u2w() {
-   d1=u;
-   u2w();
-   u=d;
+unsigned u;
+unsigned
+d2u(double d) {
+   return (unsigned)d;
+}
+
+double
+u2d(unsigned u) {
+   return (double)u;
 }
 
 int