Average Error: 0.3 → 0.2
Time: 15.8s
Precision: 64
$\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {y}^{2}$
$6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left({x}^{3} + \left(-3\right) \cdot \left(x \cdot x\right)\right)$
\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {y}^{2}
6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left({x}^{3} + \left(-3\right) \cdot \left(x \cdot x\right)\right)
double f(double x, double y) {
double r273029 = x;
double r273030 = r273029 * r273029;
double r273031 = 3.0;
double r273032 = r273031 * r273029;
double r273033 = r273030 - r273032;
double r273034 = r273033 * r273029;
double r273035 = 6.0;
double r273036 = y;
double r273037 = 2.0;
double r273038 = pow(r273036, r273037);
double r273039 = r273035 * r273038;
double r273040 = r273034 + r273039;
return r273040;
}


double f(double x, double y) {
double r273041 = 6.0;
double r273042 = y;
double r273043 = 2.0;
double r273044 = pow(r273042, r273043);
double r273045 = 1.0;
double r273046 = -1.0;
double r273047 = 2.0;
double r273048 = pow(r273046, r273047);
double r273049 = r273045 / r273048;
double r273050 = 1.0;
double r273051 = pow(r273049, r273050);
double r273052 = r273044 * r273051;
double r273053 = r273041 * r273052;
double r273054 = x;
double r273055 = 3.0;
double r273056 = pow(r273054, r273055);
double r273057 = 3.0;
double r273058 = -r273057;
double r273059 = r273054 * r273054;
double r273060 = r273058 * r273059;
double r273061 = r273056 + r273060;
double r273062 = r273053 + r273061;
return r273062;
}



Try it out

Results

 In Out
Enter valid numbers for all inputs

Derivation

1. Initial program 0.3

$\left(x \cdot x - 3 \cdot x\right) \cdot x + 6 \cdot {y}^{2}$
2. Taylor expanded around -inf 0.2

$\leadsto \color{blue}{\left(6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + {x}^{3}\right) - 3 \cdot {x}^{2}}$
3. Simplified0.3

$\leadsto \color{blue}{6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left(x \cdot x\right) \cdot \left(x - 3\right)}$
4. Using strategy rm
5. Applied sub-neg0.3

$\leadsto 6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left(x \cdot x\right) \cdot \color{blue}{\left(x + \left(-3\right)\right)}$
6. Applied distribute-lft-in0.3

$\leadsto 6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \color{blue}{\left(\left(x \cdot x\right) \cdot x + \left(x \cdot x\right) \cdot \left(-3\right)\right)}$
7. Simplified0.2

$\leadsto 6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left(\color{blue}{{x}^{3}} + \left(x \cdot x\right) \cdot \left(-3\right)\right)$
8. Simplified0.2

$\leadsto 6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left({x}^{3} + \color{blue}{\left(-3\right) \cdot \left(x \cdot x\right)}\right)$
9. Final simplification0.2

$\leadsto 6 \cdot \left({y}^{2} \cdot {\left(\frac{1}{{-1}^{2}}\right)}^{1}\right) + \left({x}^{3} + \left(-3\right) \cdot \left(x \cdot x\right)\right)$

Reproduce

herbie shell --seed 1
(FPCore (x y)
:name "(x*x-3*x)*x+6*pow(y,2)"
:precision binary64
(+ (* (- (* x x) (* 3 x)) x) (* 6 (pow y 2))))