Average Error: 0.1 → 0.1
Time: 5.1s
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 - {t_0}^{2}} \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 (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 - pow(t_0, 2.0))) * (1.0 - t_0);
}
real(8) function code(e, v)
    real(8), intent (in) :: e
    real(8), intent (in) :: v
    code = (e * sin(v)) / (1.0d0 + (e * cos(v)))
end function
real(8) function code(e, v)
    real(8), intent (in) :: e
    real(8), intent (in) :: v
    real(8) :: t_0
    t_0 = e * cos(v)
    code = ((e * sin(v)) / (1.0d0 - (t_0 ** 2.0d0))) * (1.0d0 - t_0)
end function
public static double code(double e, double v) {
	return (e * Math.sin(v)) / (1.0 + (e * Math.cos(v)));
}
public static double code(double e, double v) {
	double t_0 = e * Math.cos(v);
	return ((e * Math.sin(v)) / (1.0 - Math.pow(t_0, 2.0))) * (1.0 - t_0);
}
def code(e, v):
	return (e * math.sin(v)) / (1.0 + (e * math.cos(v)))
def code(e, v):
	t_0 = e * math.cos(v)
	return ((e * math.sin(v)) / (1.0 - math.pow(t_0, 2.0))) * (1.0 - t_0)
function code(e, v)
	return Float64(Float64(e * sin(v)) / Float64(1.0 + Float64(e * cos(v))))
end
function code(e, v)
	t_0 = Float64(e * cos(v))
	return Float64(Float64(Float64(e * sin(v)) / Float64(1.0 - (t_0 ^ 2.0))) * Float64(1.0 - t_0))
end
function tmp = code(e, v)
	tmp = (e * sin(v)) / (1.0 + (e * cos(v)));
end
function tmp = code(e, v)
	t_0 = e * cos(v);
	tmp = ((e * sin(v)) / (1.0 - (t_0 ^ 2.0))) * (1.0 - t_0);
end
code[e_, v_] := N[(N[(e * N[Sin[v], $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(e * N[Cos[v], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[e_, v_] := Block[{t$95$0 = N[(e * N[Cos[v], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(e * N[Sin[v], $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - t$95$0), $MachinePrecision]), $MachinePrecision]]
\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 - {t_0}^{2}} \cdot \left(1 - t_0\right)
\end{array}

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. Applied egg-rr0.1

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

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

Reproduce

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