Average Error: 0.0 → 0.0
Time: 10.6s
Precision: binary64
Cost: 13056
\[e^{re} \cdot \sin im \]
\[\frac{\sin im}{e^{-re}} \]
(FPCore (re im) :precision binary64 (* (exp re) (sin im)))
(FPCore (re im) :precision binary64 (/ (sin im) (exp (- re))))
double code(double re, double im) {
	return exp(re) * sin(im);
}
double code(double re, double im) {
	return sin(im) / exp(-re);
}
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = exp(re) * sin(im)
end function
real(8) function code(re, im)
    real(8), intent (in) :: re
    real(8), intent (in) :: im
    code = sin(im) / exp(-re)
end function
public static double code(double re, double im) {
	return Math.exp(re) * Math.sin(im);
}
public static double code(double re, double im) {
	return Math.sin(im) / Math.exp(-re);
}
def code(re, im):
	return math.exp(re) * math.sin(im)
def code(re, im):
	return math.sin(im) / math.exp(-re)
function code(re, im)
	return Float64(exp(re) * sin(im))
end
function code(re, im)
	return Float64(sin(im) / exp(Float64(-re)))
end
function tmp = code(re, im)
	tmp = exp(re) * sin(im);
end
function tmp = code(re, im)
	tmp = sin(im) / exp(-re);
end
code[re_, im_] := N[(N[Exp[re], $MachinePrecision] * N[Sin[im], $MachinePrecision]), $MachinePrecision]
code[re_, im_] := N[(N[Sin[im], $MachinePrecision] / N[Exp[(-re)], $MachinePrecision]), $MachinePrecision]
e^{re} \cdot \sin im
\frac{\sin im}{e^{-re}}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[e^{re} \cdot \sin im \]
  2. Applied egg-rr1.0

    \[\leadsto \color{blue}{{\left(\sqrt[3]{e^{re} \cdot \sin im}\right)}^{3}} \]
  3. Applied egg-rr0.0

    \[\leadsto \color{blue}{\frac{\sin im}{\frac{1}{e^{re}}}} \]
  4. Simplified0.0

    \[\leadsto \color{blue}{\frac{\sin im}{e^{-re}}} \]
    Proof

Alternatives

Alternative 1
Error0.9
Cost13252
\[\begin{array}{l} \mathbf{if}\;e^{re} \leq 0:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\left(re + 1\right) \cdot \sin im\\ \end{array} \]
Alternative 2
Error1.4
Cost13124
\[\begin{array}{l} \mathbf{if}\;e^{re} \leq 0:\\ \;\;\;\;e^{re} \cdot im\\ \mathbf{else}:\\ \;\;\;\;\sin im\\ \end{array} \]
Alternative 3
Error0.0
Cost12992
\[e^{re} \cdot \sin im \]
Alternative 4
Error21.3
Cost6464
\[\sin im \]
Alternative 5
Error41.7
Cost64
\[im \]

Error

Reproduce

herbie shell --seed 2023010 
(FPCore (re im)
  :name "math.exp on complex, imaginary part"
  :precision binary64
  (* (exp re) (sin im)))