Average Error: 0.1 → 0.1
Time: 4.9s
Precision: binary64
\[0 \leq e \land e \leq 1\]
\[\frac{e \cdot \sin v}{1 + e \cdot \cos v}\]
\[e \cdot \left(\frac{\sin v}{e \cdot \left(e \cdot {\cos v}^{2}\right) + -1} \cdot \left(-1 + e \cdot \cos v\right)\right)\]
\frac{e \cdot \sin v}{1 + e \cdot \cos v}
e \cdot \left(\frac{\sin v}{e \cdot \left(e \cdot {\cos v}^{2}\right) + -1} \cdot \left(-1 + e \cdot \cos v\right)\right)
(FPCore (e v) :precision binary64 (/ (* e (sin v)) (+ 1.0 (* e (cos v)))))
(FPCore (e v)
 :precision binary64
 (*
  e
  (*
   (/ (sin v) (+ (* e (* e (pow (cos v) 2.0))) -1.0))
   (+ -1.0 (* e (cos v))))))
double code(double e, double v) {
	return (e * sin(v)) / (1.0 + (e * cos(v)));
}
double code(double e, double v) {
	return e * ((sin(v) / ((e * (e * pow(cos(v), 2.0))) + -1.0)) * (-1.0 + (e * cos(v))));
}

Error

Bits error versus e

Bits error versus v

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\frac{e \cdot \sin v}{1 + e \cdot \cos v}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary64_11010.1

    \[\leadsto \frac{e \cdot \sin v}{\color{blue}{1 \cdot \left(1 + e \cdot \cos v\right)}}\]
  4. Applied times-frac_binary64_11070.1

    \[\leadsto \color{blue}{\frac{e}{1} \cdot \frac{\sin v}{1 + e \cdot \cos v}}\]
  5. Simplified0.1

    \[\leadsto \color{blue}{e} \cdot \frac{\sin v}{1 + e \cdot \cos v}\]
  6. Simplified0.1

    \[\leadsto e \cdot \color{blue}{\frac{\sin v}{e \cdot \cos v + 1}}\]
  7. Using strategy rm
  8. Applied flip-+_binary64_10750.1

    \[\leadsto e \cdot \frac{\sin v}{\color{blue}{\frac{\left(e \cdot \cos v\right) \cdot \left(e \cdot \cos v\right) - 1 \cdot 1}{e \cdot \cos v - 1}}}\]
  9. Applied associate-/r/_binary64_10470.1

    \[\leadsto e \cdot \color{blue}{\left(\frac{\sin v}{\left(e \cdot \cos v\right) \cdot \left(e \cdot \cos v\right) - 1 \cdot 1} \cdot \left(e \cdot \cos v - 1\right)\right)}\]
  10. Simplified0.1

    \[\leadsto e \cdot \left(\color{blue}{\frac{\sin v}{e \cdot \left(e \cdot {\cos v}^{2}\right) + -1}} \cdot \left(e \cdot \cos v - 1\right)\right)\]
  11. Final simplification0.1

    \[\leadsto e \cdot \left(\frac{\sin v}{e \cdot \left(e \cdot {\cos v}^{2}\right) + -1} \cdot \left(-1 + e \cdot \cos v\right)\right)\]

Reproduce

herbie shell --seed 2020357 
(FPCore (e v)
  :name "Trigonometry A"
  :precision binary64
  :pre (<= 0.0 e 1.0)
  (/ (* e (sin v)) (+ 1.0 (* e (cos v)))))