Average Error: 0.0 → 0.0
Time: 6.3s
Precision: binary64
\[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)\]
\[\left(0.5 \cdot \sin re\right) \cdot e^{\log \left(e^{-im} + e^{im}\right)}\]
\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)
\left(0.5 \cdot \sin re\right) \cdot e^{\log \left(e^{-im} + e^{im}\right)}
(FPCore (re im)
 :precision binary64
 (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))
(FPCore (re im)
 :precision binary64
 (* (* 0.5 (sin re)) (exp (log (+ (exp (- im)) (exp im))))))
double code(double re, double im) {
	return (0.5 * sin(re)) * (exp(0.0 - im) + exp(im));
}
double code(double re, double im) {
	return (0.5 * sin(re)) * exp(log(exp(-im) + exp(im)));
}

Error

Bits error versus re

Bits error versus im

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(0.5 \cdot \sin re\right) \cdot \left(e^{0 - im} + e^{im}\right)\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left(0.5 \cdot \sin re\right) \cdot \left(e^{-im} + e^{im}\right)}\]
  3. Using strategy rm
  4. Applied add-exp-log_binary64_1160.0

    \[\leadsto \left(0.5 \cdot \sin re\right) \cdot \color{blue}{e^{\log \left(e^{-im} + e^{im}\right)}}\]
  5. Final simplification0.0

    \[\leadsto \left(0.5 \cdot \sin re\right) \cdot e^{\log \left(e^{-im} + e^{im}\right)}\]

Reproduce

herbie shell --seed 2020346 
(FPCore (re im)
  :name "math.sin on complex, real part"
  :precision binary64
  (* (* 0.5 (sin re)) (+ (exp (- 0.0 im)) (exp im))))