Average Error: 15.2 → 0.3
Time: 25.4s
Precision: 64
Internal Precision: 128
\[\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}\]

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. Initial simplification15.2

    \[\leadsto \frac{r \cdot \sin b}{\cos \left(b + a\right)}\]
  3. Using strategy rm
  4. Applied cos-sum0.3

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{\cos b \cdot \cos a - \sin b \cdot \sin a}}\]
  5. Using strategy rm
  6. Applied fma-neg0.3

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\sin b \cdot \sin a\right))_*}}\]
  7. Using strategy rm
  8. Applied add-log-exp0.4

    \[\leadsto \frac{r \cdot \sin b}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\color{blue}{\log \left(e^{\sin b \cdot \sin a}\right)}\right))_*}\]
  9. Using strategy rm
  10. Applied *-un-lft-identity0.4

    \[\leadsto \frac{r \cdot \sin b}{\color{blue}{1 \cdot (\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\log \left(e^{\sin b \cdot \sin a}\right)\right))_*}}\]
  11. Applied times-frac0.4

    \[\leadsto \color{blue}{\frac{r}{1} \cdot \frac{\sin b}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\log \left(e^{\sin b \cdot \sin a}\right)\right))_*}}\]
  12. Simplified0.4

    \[\leadsto \color{blue}{r} \cdot \frac{\sin b}{(\left(\cos b\right) \cdot \left(\cos a\right) + \left(-\log \left(e^{\sin b \cdot \sin a}\right)\right))_*}\]
  13. Simplified0.3

    \[\leadsto r \cdot \color{blue}{\frac{\sin b}{\cos a \cdot \cos b - \sin a \cdot \sin b}}\]
  14. Final simplification0.3

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

Runtime

Time bar (total: 25.4s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes0.30.30.10.30%
herbie shell --seed 2018353 +o rules:numerics
(FPCore (r a b)
  :name "r*sin(b)/cos(a+b), A"
  (/ (* r (sin b)) (cos (+ a b))))