Average Error: 0.1 → 0.1
Time: 4.0s
Precision: binary64
\[0 \leq e \land e \leq 1\]
\[\frac{e \cdot \sin v}{1 + e \cdot \cos v}\]
\[\frac{e \cdot \sin v}{1 + {\left(e \cdot \cos v\right)}^{3}} \cdot \left(1 + \left(\left(e \cdot \cos v\right) \cdot \left(e \cdot \cos v\right) - e \cdot \cos v\right)\right)\]
\frac{e \cdot \sin v}{1 + e \cdot \cos v}
\frac{e \cdot \sin v}{1 + {\left(e \cdot \cos v\right)}^{3}} \cdot \left(1 + \left(\left(e \cdot \cos v\right) \cdot \left(e \cdot \cos v\right) - 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)) (+ 1.0 (pow (* e (cos v)) 3.0)))
  (+ 1.0 (- (* (* e (cos v)) (* e (cos v))) (* 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)) / (1.0 + pow((e * cos(v)), 3.0))) * (1.0 + (((e * cos(v)) * (e * cos(v))) - (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 flip3-+_binary640.1

    \[\leadsto \frac{e \cdot \sin v}{\color{blue}{\frac{{1}^{3} + {\left(e \cdot \cos v\right)}^{3}}{1 \cdot 1 + \left(\left(e \cdot \cos v\right) \cdot \left(e \cdot \cos v\right) - 1 \cdot \left(e \cdot \cos v\right)\right)}}}\]
  4. Applied associate-/r/_binary640.1

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

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

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

Reproduce

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