Average Error: 29.6 → 0.4
Time: 19.2s
Precision: 64
$\sin \left(x + 1\right) - \sin x$
$\left(\left(\sin x \cdot \left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right)\right) \cdot \sqrt[3]{\cos 1} + \sin 1 \cdot \cos x\right) - \sin x$
\sin \left(x + 1\right) - \sin x
\left(\left(\sin x \cdot \left(\sqrt[3]{\cos 1} \cdot \sqrt[3]{\cos 1}\right)\right) \cdot \sqrt[3]{\cos 1} + \sin 1 \cdot \cos x\right) - \sin x
double f(double x) {
double r58070352 = x;
double r58070353 = 1.0;
double r58070354 = r58070352 + r58070353;
double r58070355 = sin(r58070354);
double r58070356 = sin(r58070352);
double r58070357 = r58070355 - r58070356;
return r58070357;
}


double f(double x) {
double r58070358 = x;
double r58070359 = sin(r58070358);
double r58070360 = 1.0;
double r58070361 = cos(r58070360);
double r58070362 = cbrt(r58070361);
double r58070363 = r58070362 * r58070362;
double r58070364 = r58070359 * r58070363;
double r58070365 = r58070364 * r58070362;
double r58070366 = sin(r58070360);
double r58070367 = cos(r58070358);
double r58070368 = r58070366 * r58070367;
double r58070369 = r58070365 + r58070368;
double r58070370 = r58070369 - r58070359;
return r58070370;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 29.6

$\sin \left(x + 1\right) - \sin x$
2. Using strategy rm
3. Applied sin-sum0.4

$\leadsto \color{blue}{\left(\sin x \cdot \cos 1 + \cos x \cdot \sin 1\right)} - \sin x$
4. Using strategy rm

$\leadsto \left(\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\right) - \sin x$
6. Applied associate-*r*0.4

$\leadsto \left(\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\right) - \sin x$
7. Final simplification0.4

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

# Reproduce

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