Average Error: 0.0 → 0.0
Time: 12.9s
Precision: 64
$\left(\left(\left(a + b\right) + c\right) + d\right) \cdot x$
$\left(\left(\left(a + b\right) + c\right) + d\right) \cdot x$
\left(\left(\left(a + b\right) + c\right) + d\right) \cdot x
\left(\left(\left(a + b\right) + c\right) + d\right) \cdot x
double f(double a, double b, double c, double d, double x) {
double r1032637 = a;
double r1032638 = b;
double r1032639 = r1032637 + r1032638;
double r1032640 = c;
double r1032641 = r1032639 + r1032640;
double r1032642 = d;
double r1032643 = r1032641 + r1032642;
double r1032644 = x;
double r1032645 = r1032643 * r1032644;
return r1032645;
}


double f(double a, double b, double c, double d, double x) {
double r1032646 = a;
double r1032647 = b;
double r1032648 = r1032646 + r1032647;
double r1032649 = c;
double r1032650 = r1032648 + r1032649;
double r1032651 = d;
double r1032652 = r1032650 + r1032651;
double r1032653 = x;
double r1032654 = r1032652 * r1032653;
return r1032654;
}



Try it out

Results

 In Out
Enter valid numbers for all inputs

Derivation

1. Initial program 0.0

$\left(\left(\left(a + b\right) + c\right) + d\right) \cdot x$
2. Final simplification0.0

$\leadsto \left(\left(\left(a + b\right) + c\right) + d\right) \cdot x$

Reproduce

herbie shell --seed 1
(FPCore (a b c d x)
:name "(a+b+c+d)*x"
:precision binary64
(* (+ (+ (+ a b) c) d) x))