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

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 e\right) \cdot {\cos v}^{2}}} \cdot \left(1 - e \cdot \cos v\right) \]
  6. Using strategy rm
  7. Applied add-log-exp_binary640.1

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

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

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

Reproduce

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