Average Error: 0.0 → 0.0
Time: 1.3s
Precision: 64
$\frac{1 \cdot \left|x\right|}{y} + 0.5$
$\frac{1 \cdot \left|x\right|}{y} + 0.5$
\frac{1 \cdot \left|x\right|}{y} + 0.5
\frac{1 \cdot \left|x\right|}{y} + 0.5
double f(double x, double y) {
double r1207765 = 1.0;
double r1207766 = x;
double r1207767 = fabs(r1207766);
double r1207768 = r1207765 * r1207767;
double r1207769 = y;
double r1207770 = r1207768 / r1207769;
double r1207771 = 0.5;
double r1207772 = r1207770 + r1207771;
return r1207772;
}


double f(double x, double y) {
double r1207773 = 1.0;
double r1207774 = x;
double r1207775 = fabs(r1207774);
double r1207776 = r1207773 * r1207775;
double r1207777 = y;
double r1207778 = r1207776 / r1207777;
double r1207779 = 0.5;
double r1207780 = r1207778 + r1207779;
return r1207780;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\frac{1 \cdot \left|x\right|}{y} + 0.5$
2. Final simplification0.0

$\leadsto \frac{1 \cdot \left|x\right|}{y} + 0.5$

# Reproduce

herbie shell --seed 1
(FPCore (x y)
:name "(1.0 * abs(x) / y) + 0.5"
:precision binary64
(+ (/ (* 1 (fabs x)) y) 0.5))