Average Error: 15.0 → 0.3
Time: 27.8s
Precision: 64
$\frac{r \cdot \sin b}{\cos \left(a + b\right)}$
$r \cdot \frac{\sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}$
\frac{r \cdot \sin b}{\cos \left(a + b\right)}
r \cdot \frac{\sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}
double f(double r, double b, double a) {
double r48616744 = r;
double r48616745 = b;
double r48616746 = sin(r48616745);
double r48616747 = r48616744 * r48616746;
double r48616748 = a;
double r48616749 = r48616748 + r48616745;
double r48616750 = cos(r48616749);
double r48616751 = r48616747 / r48616750;
return r48616751;
}


double f(double r, double b, double a) {
double r48616752 = r;
double r48616753 = b;
double r48616754 = sin(r48616753);
double r48616755 = a;
double r48616756 = cos(r48616755);
double r48616757 = cos(r48616753);
double r48616758 = r48616756 * r48616757;
double r48616759 = sin(r48616755);
double r48616760 = r48616759 * r48616754;
double r48616761 = r48616758 - r48616760;
double r48616762 = r48616754 / r48616761;
double r48616763 = r48616752 * r48616762;
return r48616763;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 15.0

$\frac{r \cdot \sin b}{\cos \left(a + b\right)}$
2. Using strategy rm
3. Applied cos-sum0.3

$\leadsto \frac{r \cdot \sin b}{\color{blue}{\cos a \cdot \cos b - \sin a \cdot \sin b}}$
4. Using strategy rm
5. Applied *-un-lft-identity0.3

$\leadsto \frac{r \cdot \sin b}{\color{blue}{1 \cdot \left(\cos a \cdot \cos b - \sin a \cdot \sin b\right)}}$
6. Applied times-frac0.3

$\leadsto \color{blue}{\frac{r}{1} \cdot \frac{\sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}}$
7. Simplified0.3

$\leadsto \color{blue}{r} \cdot \frac{\sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}$
8. Final simplification0.3

$\leadsto r \cdot \frac{\sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}$

# Reproduce

herbie shell --seed 1
(FPCore (r b a)
:name "r *  sin(b) / cos(a+b)"
(/ (* r (sin b)) (cos (+ a b))))