OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [ssa-pre-1.c] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
void washQtoM3(double m[9], double q[4]);
2
double sqrt(double);
3
int f(int samp)
4
{
5
      double clp[2], xyz[3], q[4], len;
6
      double mRF[9];
7
      int xi;
8
      for (xi=0; xi<samp; xi++)
9
            {
10
                    q[0] = 1.0;
11
                    q[1] = ( ((double)(1)-(-1))*((double)((float)xi)-(-0.5)) / ((double)(samp-0.5)-(-0.5)) + (-1));
12
                    q[2] = ( ((double)(1)-(-1))*((double)((float)0)-(-0.5)) / ((double)(samp-0.5)-(-0.5)) + (-1));
13
                    q[3] = ( ((double)(1)-(-1))*((double)((float)0)-(-0.5)) / ((double)(samp-0.5)-(-0.5)) + (-1));
14
                    len = (sqrt((((q))[0]*((q))[0] + ((q))[1]*((q))[1] + ((q))[2]*((q))[2] + ((q))[3]*((q))[3])));
15
                  ((q)[0] = (q)[0]*1.0/len, (q)[1] = (q)[1]*1.0/len, (q)[2] = (q)[2]*1.0/len, (q)[3] = (q)[3]*1.0/len);
16
                 washQtoM3(mRF, q);
17
                      }
18
      return 0;
19
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.