2 /* Originator: James Troup <james@nocrew.org> */
3 /* { dg-do compile { target sparc-*-linux* } } */
4 /* { dg-options "-g -O1" } */
6 extern __inline
double sqrt (double __x
)
9 __asm ("fsqrtd %1,%0" : "=f" (__r
) : "f" (__x
));
13 static double our_skew
, max_update_skew
;
15 static double Sqr(double x
)
20 void REF_SetReference(double skew
)
22 double previous_skew
, new_skew
;
23 double old_weight
, new_weight
, sum_weight
;
24 double delta_freq1
, delta_freq2
;
27 previous_skew
= our_skew
;
28 skew1
= sqrt((Sqr(delta_freq1
) * old_weight
+ Sqr(delta_freq2
) * new_weight
) / sum_weight
);
29 skew2
= (previous_skew
* old_weight
+ new_skew
* new_weight
) / sum_weight
;
30 our_skew
= skew1
+ skew2
;