Average Error: 0.0 → 0.0
Time: 7.8s
Precision: 64
$\left(\frac{\log \left(\left|3 \cdot \left(1 - x\right) + 1\right|\right)}{80} + x \cdot x\right) + 1$
$\left(x \cdot x + \frac{\log \left(\left|\left(1 - x\right) \cdot 3 + 1\right|\right)}{80}\right) + 1$
\left(\frac{\log \left(\left|3 \cdot \left(1 - x\right) + 1\right|\right)}{80} + x \cdot x\right) + 1
\left(x \cdot x + \frac{\log \left(\left|\left(1 - x\right) \cdot 3 + 1\right|\right)}{80}\right) + 1
double f(double x) {
double r41475635 = 3.0;
double r41475636 = 1.0;
double r41475637 = x;
double r41475638 = r41475636 - r41475637;
double r41475639 = r41475635 * r41475638;
double r41475640 = r41475639 + r41475636;
double r41475641 = fabs(r41475640);
double r41475642 = log(r41475641);
double r41475643 = 80.0;
double r41475644 = r41475642 / r41475643;
double r41475645 = r41475637 * r41475637;
double r41475646 = r41475644 + r41475645;
double r41475647 = r41475646 + r41475636;
return r41475647;
}


double f(double x) {
double r41475648 = x;
double r41475649 = r41475648 * r41475648;
double r41475650 = 1.0;
double r41475651 = r41475650 - r41475648;
double r41475652 = 3.0;
double r41475653 = r41475651 * r41475652;
double r41475654 = r41475653 + r41475650;
double r41475655 = fabs(r41475654);
double r41475656 = log(r41475655);
double r41475657 = 80.0;
double r41475658 = r41475656 / r41475657;
double r41475659 = r41475649 + r41475658;
double r41475660 = r41475659 + r41475650;
return r41475660;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\left(\frac{\log \left(\left|3 \cdot \left(1 - x\right) + 1\right|\right)}{80} + x \cdot x\right) + 1$
2. Final simplification0.0

$\leadsto \left(x \cdot x + \frac{\log \left(\left|\left(1 - x\right) \cdot 3 + 1\right|\right)}{80}\right) + 1$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "log(abs(3 * (1 - x) + 1)) / 80 + x * x + 1"
(+ (+ (/ (log (fabs (+ (* 3 (- 1 x)) 1))) 80) (* x x)) 1))