Average Error: 15.2 → 0.4
Time: 22.3s
Precision: 64
Internal Precision: 1344
\[\frac{r \cdot \sin b}{\cos \left(a + b\right)}\]
\[\frac{r}{\frac{1}{\sin b} \cdot \left(\cos b \cdot \cos a - \sin b \cdot \sin a\right)}\]

Error

Bits error versus r

Bits error versus a

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.2

    \[\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 associate-/l*0.4

    \[\leadsto \color{blue}{\frac{r}{\frac{\cos a \cdot \cos b - \sin a \cdot \sin b}{\sin b}}}\]
  6. Using strategy rm
  7. Applied div-inv0.4

    \[\leadsto \frac{r}{\color{blue}{\left(\cos a \cdot \cos b - \sin a \cdot \sin b\right) \cdot \frac{1}{\sin b}}}\]
  8. Final simplification0.4

    \[\leadsto \frac{r}{\frac{1}{\sin b} \cdot \left(\cos b \cdot \cos a - \sin b \cdot \sin a\right)}\]

Runtime

Time bar (total: 22.3s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.40.40.10.40%
herbie shell --seed 2018274 
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), A"
  (/ (* r (sin b)) (cos (+ a b))))