Average Error: 15.2 → 0.2
Time: 15.0s
Precision: 64
$\frac{\sin x}{\sin \left(x - y\right)}$
$\frac{\sin x}{\cos y \cdot \sin x - \sin y \cdot \cos x}$
\frac{\sin x}{\sin \left(x - y\right)}
\frac{\sin x}{\cos y \cdot \sin x - \sin y \cdot \cos x}
double f(double x, double y) {
double r21944252 = x;
double r21944253 = sin(r21944252);
double r21944254 = y;
double r21944255 = r21944252 - r21944254;
double r21944256 = sin(r21944255);
double r21944257 = r21944253 / r21944256;
return r21944257;
}


double f(double x, double y) {
double r21944258 = x;
double r21944259 = sin(r21944258);
double r21944260 = y;
double r21944261 = cos(r21944260);
double r21944262 = r21944261 * r21944259;
double r21944263 = sin(r21944260);
double r21944264 = cos(r21944258);
double r21944265 = r21944263 * r21944264;
double r21944266 = r21944262 - r21944265;
double r21944267 = r21944259 / r21944266;
return r21944267;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 15.2

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

$\leadsto \frac{\sin x}{\color{blue}{\sin x \cdot \cos y - \cos x \cdot \sin y}}$
4. Taylor expanded around inf 0.2

$\leadsto \color{blue}{\frac{\sin x}{\cos y \cdot \sin x - \sin y \cdot \cos x}}$
5. Final simplification0.2

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

# Reproduce

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