Mercurial > hg > CbC > old > device
view test/float.c @ 81:f94ca1168520
float first try...
author | kono |
---|---|
date | Mon, 03 Mar 2003 20:59:51 +0900 |
parents | 82d0e30f61dd |
children | 25654dc29ecc |
line wrap: on
line source
#include "stdio.h" void test2(double); void test1(); extern double sin(double); extern float fsin(float); int main(int ac,char *av[]) { test1(); return 0; } double testd(double i,double j) { return i+1.1+.0e3+12.3e-12; } float testf(float i,float j) { return i+1; } void test1() { float f; float f1; double g; double g1; f = 1.3; g = 1.0; g = g+g; g1 = g*g; g = g/g1; g = g-g1; g = sin(g1); g = testd(g,g1); f = f+f; f1 = f*f; f = f/f1; f = f-f1; f = sin(f1); g = f+f; f = g*g; f = testf(f,f1); g = g*g+f*f-g1*g1; printf("%g %g %g %g\n",g,f,g1,f1); return; }