Average Error: 0 → 0
Time: 2.9s
Precision: 64
$\frac{\sin x}{x + y} - \frac{\cos x}{y - x}$
$\frac{\sin x}{x + y} - \frac{\cos x}{y - x}$
\frac{\sin x}{x + y} - \frac{\cos x}{y - x}
\frac{\sin x}{x + y} - \frac{\cos x}{y - x}
double f(double x, double y) {
double r1307842 = x;
double r1307843 = sin(r1307842);
double r1307844 = y;
double r1307845 = r1307842 + r1307844;
double r1307846 = r1307843 / r1307845;
double r1307847 = cos(r1307842);
double r1307848 = r1307844 - r1307842;
double r1307849 = r1307847 / r1307848;
double r1307850 = r1307846 - r1307849;
return r1307850;
}


double f(double x, double y) {
double r1307851 = x;
double r1307852 = sin(r1307851);
double r1307853 = y;
double r1307854 = r1307851 + r1307853;
double r1307855 = r1307852 / r1307854;
double r1307856 = cos(r1307851);
double r1307857 = r1307853 - r1307851;
double r1307858 = r1307856 / r1307857;
double r1307859 = r1307855 - r1307858;
return r1307859;
}



Try it out

Results

 In Out
Enter valid numbers for all inputs

Derivation

1. Initial program 0

$\frac{\sin x}{x + y} - \frac{\cos x}{y - x}$
2. Final simplification0

$\leadsto \frac{\sin x}{x + y} - \frac{\cos x}{y - x}$

Reproduce

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