Average Error: 0.6 → 0.3
Time: 29.4s
Precision: 64
$4 \le x1 \le 6.360000000000000319744231092045083642006 \land 4 \le x2 \le 6.360000000000000319744231092045083642006 \land 4 \le x3 \le 6.360000000000000319744231092045083642006 \land 4 \le x4 \le 6.360000000000000319744231092045083642006 \land 4 \le x5 \le 6.360000000000000319744231092045083642006 \land 4 \le x6 \le 6.360000000000000319744231092045083642006$
$\left(\left(\left(x2 \cdot x5 + x3 \cdot x6\right) - x2 \cdot x3\right) - x5 \cdot x6\right) + x1 \cdot \left(\left(\left(\left(\left(\left(-x1\right) + x2\right) + x3\right) - x4\right) + x5\right) + x6\right)$
$\left(\left(\left(-x5\right) \cdot x6 + \left(x2 \cdot x5 + \left(x6 - x2\right) \cdot x3\right)\right) + \left(x6 + \left(\left(\left(x2 - x1\right) + x3\right) - x4\right)\right) \cdot x1\right) + x1 \cdot x5$
\left(\left(\left(x2 \cdot x5 + x3 \cdot x6\right) - x2 \cdot x3\right) - x5 \cdot x6\right) + x1 \cdot \left(\left(\left(\left(\left(\left(-x1\right) + x2\right) + x3\right) - x4\right) + x5\right) + x6\right)
\left(\left(\left(-x5\right) \cdot x6 + \left(x2 \cdot x5 + \left(x6 - x2\right) \cdot x3\right)\right) + \left(x6 + \left(\left(\left(x2 - x1\right) + x3\right) - x4\right)\right) \cdot x1\right) + x1 \cdot x5
double f(double x1, double x2, double x3, double x4, double x5, double x6) {
double r2839091 = x2;
double r2839092 = x5;
double r2839093 = r2839091 * r2839092;
double r2839094 = x3;
double r2839095 = x6;
double r2839096 = r2839094 * r2839095;
double r2839097 = r2839093 + r2839096;
double r2839098 = r2839091 * r2839094;
double r2839099 = r2839097 - r2839098;
double r2839100 = r2839092 * r2839095;
double r2839101 = r2839099 - r2839100;
double r2839102 = x1;
double r2839103 = -r2839102;
double r2839104 = r2839103 + r2839091;
double r2839105 = r2839104 + r2839094;
double r2839106 = x4;
double r2839107 = r2839105 - r2839106;
double r2839108 = r2839107 + r2839092;
double r2839109 = r2839108 + r2839095;
double r2839110 = r2839102 * r2839109;
double r2839111 = r2839101 + r2839110;
return r2839111;
}


double f(double x1, double x2, double x3, double x4, double x5, double x6) {
double r2839112 = x5;
double r2839113 = -r2839112;
double r2839114 = x6;
double r2839115 = r2839113 * r2839114;
double r2839116 = x2;
double r2839117 = r2839116 * r2839112;
double r2839118 = r2839114 - r2839116;
double r2839119 = x3;
double r2839120 = r2839118 * r2839119;
double r2839121 = r2839117 + r2839120;
double r2839122 = r2839115 + r2839121;
double r2839123 = x1;
double r2839124 = r2839116 - r2839123;
double r2839125 = r2839124 + r2839119;
double r2839126 = x4;
double r2839127 = r2839125 - r2839126;
double r2839128 = r2839114 + r2839127;
double r2839129 = r2839128 * r2839123;
double r2839130 = r2839122 + r2839129;
double r2839131 = r2839123 * r2839112;
double r2839132 = r2839130 + r2839131;
return r2839132;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.6

$\left(\left(\left(x2 \cdot x5 + x3 \cdot x6\right) - x2 \cdot x3\right) - x5 \cdot x6\right) + x1 \cdot \left(\left(\left(\left(\left(\left(-x1\right) + x2\right) + x3\right) - x4\right) + x5\right) + x6\right)$
2. Simplified0.4

$\leadsto \color{blue}{x1 \cdot \left(x5 + \left(x6 + \left(\left(x3 + \left(x2 - x1\right)\right) - x4\right)\right)\right) + \left(\left(x6 - x2\right) \cdot x3 + x5 \cdot \left(x2 - x6\right)\right)}$
3. Using strategy rm
4. Applied distribute-rgt-in0.3

$\leadsto \color{blue}{\left(x5 \cdot x1 + \left(x6 + \left(\left(x3 + \left(x2 - x1\right)\right) - x4\right)\right) \cdot x1\right)} + \left(\left(x6 - x2\right) \cdot x3 + x5 \cdot \left(x2 - x6\right)\right)$
5. Applied associate-+l+0.3

$\leadsto \color{blue}{x5 \cdot x1 + \left(\left(x6 + \left(\left(x3 + \left(x2 - x1\right)\right) - x4\right)\right) \cdot x1 + \left(\left(x6 - x2\right) \cdot x3 + x5 \cdot \left(x2 - x6\right)\right)\right)}$
6. Using strategy rm
7. Applied sub-neg0.3

$\leadsto x5 \cdot x1 + \left(\left(x6 + \left(\left(x3 + \left(x2 - x1\right)\right) - x4\right)\right) \cdot x1 + \left(\left(x6 - x2\right) \cdot x3 + x5 \cdot \color{blue}{\left(x2 + \left(-x6\right)\right)}\right)\right)$
8. Applied distribute-lft-in0.3

$\leadsto x5 \cdot x1 + \left(\left(x6 + \left(\left(x3 + \left(x2 - x1\right)\right) - x4\right)\right) \cdot x1 + \left(\left(x6 - x2\right) \cdot x3 + \color{blue}{\left(x5 \cdot x2 + x5 \cdot \left(-x6\right)\right)}\right)\right)$
9. Applied associate-+r+0.3

$\leadsto x5 \cdot x1 + \left(\left(x6 + \left(\left(x3 + \left(x2 - x1\right)\right) - x4\right)\right) \cdot x1 + \color{blue}{\left(\left(\left(x6 - x2\right) \cdot x3 + x5 \cdot x2\right) + x5 \cdot \left(-x6\right)\right)}\right)$
10. Final simplification0.3

$\leadsto \left(\left(\left(-x5\right) \cdot x6 + \left(x2 \cdot x5 + \left(x6 - x2\right) \cdot x3\right)\right) + \left(x6 + \left(\left(\left(x2 - x1\right) + x3\right) - x4\right)\right) \cdot x1\right) + x1 \cdot x5$

# Reproduce

herbie shell --seed 1
(FPCore (x1 x2 x3 x4 x5 x6)
:name "kepler0"
:pre (and (<= 4.0 x1 6.36) (<= 4.0 x2 6.36) (<= 4.0 x3 6.36) (<= 4.0 x4 6.36) (<= 4.0 x5 6.36) (<= 4.0 x6 6.36))
(+ (- (- (+ (* x2 x5) (* x3 x6)) (* x2 x3)) (* x5 x6)) (* x1 (+ (+ (- (+ (+ (- x1) x2) x3) x4) x5) x6))))