Average Error: 0.1 → 0.1
Time: 7.2s
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) \cdot \left(e \cdot \cos v\right)} \cdot \left(1 - e \cdot \cos v\right)\]
\frac{e \cdot \sin v}{1 + e \cdot \cos v}
\frac{e \cdot \sin v}{1 - \left(e \cdot \cos v\right) \cdot \left(e \cdot \cos v\right)} \cdot \left(1 - e \cdot \cos v\right)
(FPCore (e v) :precision binary64 (/ (* e (sin v)) (+ 1.0 (* e (cos v)))))
(FPCore (e v)
 :precision binary64
 (*
  (/ (* e (sin v)) (- 1.0 (* (* e (cos v)) (* e (cos v)))))
  (- 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)) / (1.0 - ((e * cos(v)) * (e * cos(v))))) * (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 flip-+_binary640.1

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

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

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

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

Reproduce

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