repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
graphite
/
pr42326.c
blob
de5d56ec93e25d4e82d6e8a5b0e0c3962038478d
1
/* { dg-options "-O1 -floop-parallelize-all" } */
2
3
double
lagrange
(
const double
x
[],
4
const double
y
[],
5
long
n
,
6
double
xval
)
7
{
8
long
i
,
j
;
9
double
yval
=
0
.;
10
11
for
(
i
=
0
;
i
<
n
;
i
++ )
12
{
13
double
l
=
1
.;
14
for
(
j
=
0
;
j
<
n
;
j
++ )
15
if
(
i
!=
j
)
16
l
*= (
xval
-
x
[
j
])/(
x
[
i
]-
x
[
j
]);
17
yval
+=
y
[
i
]*
l
;
18
}
19
return
yval
;
20
}