Average Error: 0.4 → 0.3
Time: 11.0s
Precision: 64
$1.000999999999999889865875957184471189976 \le x \le 2 \land 1.000999999999999889865875957184471189976 \le y \le 2$
$\frac{x \cdot y - 1}{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - 1}$
$\frac{y \cdot x - 1}{y \cdot x - \sqrt{1}} \cdot \frac{1}{y \cdot x + \sqrt{1}}$
\frac{x \cdot y - 1}{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - 1}
\frac{y \cdot x - 1}{y \cdot x - \sqrt{1}} \cdot \frac{1}{y \cdot x + \sqrt{1}}
double f(double x, double y) {
double r14027011 = x;
double r14027012 = y;
double r14027013 = r14027011 * r14027012;
double r14027014 = 1.0;
double r14027015 = r14027013 - r14027014;
double r14027016 = r14027013 * r14027013;
double r14027017 = r14027016 - r14027014;
double r14027018 = r14027015 / r14027017;
return r14027018;
}


double f(double x, double y) {
double r14027019 = y;
double r14027020 = x;
double r14027021 = r14027019 * r14027020;
double r14027022 = 1.0;
double r14027023 = r14027021 - r14027022;
double r14027024 = sqrt(r14027022);
double r14027025 = r14027021 - r14027024;
double r14027026 = r14027023 / r14027025;
double r14027027 = 1.0;
double r14027028 = r14027021 + r14027024;
double r14027029 = r14027027 / r14027028;
double r14027030 = r14027026 * r14027029;
return r14027030;
}



Try it out

Results

 In Out
Enter valid numbers for all inputs

Derivation

1. Initial program 0.4

$\frac{x \cdot y - 1}{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - 1}$
2. Using strategy rm

$\leadsto \frac{x \cdot y - 1}{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - \color{blue}{\sqrt{1} \cdot \sqrt{1}}}$
4. Applied difference-of-squares0.4

$\leadsto \frac{x \cdot y - 1}{\color{blue}{\left(x \cdot y + \sqrt{1}\right) \cdot \left(x \cdot y - \sqrt{1}\right)}}$
5. Applied *-un-lft-identity0.4

$\leadsto \frac{\color{blue}{1 \cdot \left(x \cdot y - 1\right)}}{\left(x \cdot y + \sqrt{1}\right) \cdot \left(x \cdot y - \sqrt{1}\right)}$
6. Applied times-frac0.3

$\leadsto \color{blue}{\frac{1}{x \cdot y + \sqrt{1}} \cdot \frac{x \cdot y - 1}{x \cdot y - \sqrt{1}}}$
7. Final simplification0.3

$\leadsto \frac{y \cdot x - 1}{y \cdot x - \sqrt{1}} \cdot \frac{1}{y \cdot x + \sqrt{1}}$

Reproduce

herbie shell --seed 1
(FPCore (x y)
:name "sec4-example"
:pre (and (<= 1.001 x 2.0) (<= 1.001 y 2.0))
(/ (- (* x y) 1.0) (- (* (* x y) (* x y)) 1.0)))