Average Error: 26.1 → 0.3
Time: 12.3s
Precision: 64
$\frac{\sin \left(x - 1\right)}{x + 1}$
$\frac{\left(\left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) \cdot \sin x\right) \cdot \sqrt[3]{\cos 1} - \cos x \cdot \sin 1}{x + 1}$
\frac{\sin \left(x - 1\right)}{x + 1}
\frac{\left(\left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) \cdot \sin x\right) \cdot \sqrt[3]{\cos 1} - \cos x \cdot \sin 1}{x + 1}
double f(double x) {
double r1503004 = x;
double r1503005 = 1.0;
double r1503006 = r1503004 - r1503005;
double r1503007 = sin(r1503006);
double r1503008 = r1503004 + r1503005;
double r1503009 = r1503007 / r1503008;
return r1503009;
}


double f(double x) {
double r1503010 = 1.0;
double r1503011 = cos(r1503010);
double r1503012 = cbrt(r1503011);
double r1503013 = r1503012 * r1503012;
double r1503014 = x;
double r1503015 = sin(r1503014);
double r1503016 = r1503013 * r1503015;
double r1503017 = r1503016 * r1503012;
double r1503018 = cos(r1503014);
double r1503019 = sin(r1503010);
double r1503020 = r1503018 * r1503019;
double r1503021 = r1503017 - r1503020;
double r1503022 = r1503014 + r1503010;
double r1503023 = r1503021 / r1503022;
return r1503023;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 26.1

$\frac{\sin \left(x - 1\right)}{x + 1}$
2. Using strategy rm
3. Applied sin-diff0.4

$\leadsto \frac{\color{blue}{\sin x \cdot \cos 1 - \cos x \cdot \sin 1}}{x + 1}$
4. Using strategy rm

$\leadsto \frac{\sin x \cdot \color{blue}{\left(\left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) \cdot \sqrt[3]{\cos 1}\right)} - \cos x \cdot \sin 1}{x + 1}$
6. Applied associate-*r*0.3

$\leadsto \frac{\color{blue}{\left(\sin x \cdot \left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right)\right) \cdot \sqrt[3]{\cos 1}} - \cos x \cdot \sin 1}{x + 1}$
7. Simplified0.3

$\leadsto \frac{\color{blue}{\left(\left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) \cdot \sin x\right)} \cdot \sqrt[3]{\cos 1} - \cos x \cdot \sin 1}{x + 1}$
8. Final simplification0.3

$\leadsto \frac{\left(\left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right) \cdot \sin x\right) \cdot \sqrt[3]{\cos 1} - \cos x \cdot \sin 1}{x + 1}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "sin(x-1)/(x+1)"
:precision binary64
(/ (sin (- x 1)) (+ x 1)))