Average Error: 0.1 → 0.1
Time: 4.2s
Precision: binary64
\[0 \leq e \land e \leq 1\]
\[\frac{e \cdot \sin v}{1 + e \cdot \cos v} \]
\[\left(e \cdot \sin v\right) \cdot \log \left(e^{\frac{1}{\mathsf{fma}\left(e, \cos v, 1\right)}}\right) \]
(FPCore (e v) :precision binary64 (/ (* e (sin v)) (+ 1.0 (* e (cos v)))))
(FPCore (e v)
 :precision binary64
 (* (* e (sin v)) (log (exp (/ 1.0 (fma e (cos v) 1.0))))))
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)) * log(exp((1.0 / fma(e, cos(v), 1.0))));
}
function code(e, v)
	return Float64(Float64(e * sin(v)) / Float64(1.0 + Float64(e * cos(v))))
end
function code(e, v)
	return Float64(Float64(e * sin(v)) * log(exp(Float64(1.0 / fma(e, cos(v), 1.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_] := N[(N[(e * N[Sin[v], $MachinePrecision]), $MachinePrecision] * N[Log[N[Exp[N[(1.0 / N[(e * N[Cos[v], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\frac{e \cdot \sin v}{1 + e \cdot \cos v}
\left(e \cdot \sin v\right) \cdot \log \left(e^{\frac{1}{\mathsf{fma}\left(e, \cos v, 1\right)}}\right)

Error

Bits error versus e

Bits error versus v

Derivation

  1. Initial program 0.1

    \[\frac{e \cdot \sin v}{1 + e \cdot \cos v} \]
  2. Applied egg-rr0.1

    \[\leadsto \color{blue}{\left(e \cdot \sin v\right) \cdot \frac{1}{\mathsf{fma}\left(e, \cos v, 1\right)}} \]
  3. Applied egg-rr0.1

    \[\leadsto \left(e \cdot \sin v\right) \cdot \color{blue}{\log \left(e^{\frac{1}{\mathsf{fma}\left(e, \cos v, 1\right)}}\right)} \]
  4. Final simplification0.1

    \[\leadsto \left(e \cdot \sin v\right) \cdot \log \left(e^{\frac{1}{\mathsf{fma}\left(e, \cos v, 1\right)}}\right) \]

Reproduce

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