URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 326 |
Rev 338 |
/* PR target/17245 */
|
/* PR target/17245 */
|
/* Origin: <aaronw@net.com> */
|
/* Origin: <aaronw@net.com> */
|
/* Testcase by Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de> */
|
/* Testcase by Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de> */
|
|
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-O -mcpu=v9" } */
|
/* { dg-options "-O -mcpu=v9" } */
|
|
|
/* This used to fail on 32-bit Ultrasparc because reload was emitting
|
/* This used to fail on 32-bit Ultrasparc because reload was emitting
|
a move insn that doesn't satisfy its constraints. */
|
a move insn that doesn't satisfy its constraints. */
|
|
|
int n;
|
int n;
|
double range ;
|
double range ;
|
double bin ;
|
double bin ;
|
double wmean;
|
double wmean;
|
|
|
double f ()
|
double f ()
|
{
|
{
|
int i ;
|
int i ;
|
long double W = 0 ;
|
long double W = 0 ;
|
for ( i = 0 ; i < n ; i ++) {
|
for ( i = 0 ; i < n ; i ++) {
|
double xi = range;
|
double xi = range;
|
double wi = bin;
|
double wi = bin;
|
W += wi ;
|
W += wi ;
|
wmean += ( xi - wmean) * ( wi / W);
|
wmean += ( xi - wmean) * ( wi / W);
|
}
|
}
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.