?

Average Accuracy: 88.4% → 98.5%
Time: 9.4s
Precision: binary64
Cost: 3656

?

\[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]
\[\begin{array}{l} t_0 := x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right)\\ t_1 := t_0 + x.re \cdot \left(x.re \cdot x.im + x.re \cdot x.im\right)\\ \mathbf{if}\;t_1 \leq -5 \cdot 10^{+273}:\\ \;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+301}:\\ \;\;\;\;x.re \cdot \left(\left(x.re \cdot x.im\right) \cdot 2\right) + t_0\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)\\ \end{array} \]
(FPCore (x.re x.im)
 :precision binary64
 (+
  (* (- (* x.re x.re) (* x.im x.im)) x.im)
  (* (+ (* x.re x.im) (* x.im x.re)) x.re)))
(FPCore (x.re x.im)
 :precision binary64
 (let* ((t_0 (* x.im (- (* x.re x.re) (* x.im x.im))))
        (t_1 (+ t_0 (* x.re (+ (* x.re x.im) (* x.re x.im))))))
   (if (<= t_1 -5e+273)
     (* x.re (* x.re (* x.im 3.0)))
     (if (<= t_1 2e+301)
       (+ (* x.re (* (* x.re x.im) 2.0)) t_0)
       (* 3.0 (* x.re (* x.re x.im)))))))
double code(double x_46_re, double x_46_im) {
	return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
double code(double x_46_re, double x_46_im) {
	double t_0 = x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im));
	double t_1 = t_0 + (x_46_re * ((x_46_re * x_46_im) + (x_46_re * x_46_im)));
	double tmp;
	if (t_1 <= -5e+273) {
		tmp = x_46_re * (x_46_re * (x_46_im * 3.0));
	} else if (t_1 <= 2e+301) {
		tmp = (x_46_re * ((x_46_re * x_46_im) * 2.0)) + t_0;
	} else {
		tmp = 3.0 * (x_46_re * (x_46_re * x_46_im));
	}
	return tmp;
}
real(8) function code(x_46re, x_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    code = (((x_46re * x_46re) - (x_46im * x_46im)) * x_46im) + (((x_46re * x_46im) + (x_46im * x_46re)) * x_46re)
end function
real(8) function code(x_46re, x_46im)
    real(8), intent (in) :: x_46re
    real(8), intent (in) :: x_46im
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = x_46im * ((x_46re * x_46re) - (x_46im * x_46im))
    t_1 = t_0 + (x_46re * ((x_46re * x_46im) + (x_46re * x_46im)))
    if (t_1 <= (-5d+273)) then
        tmp = x_46re * (x_46re * (x_46im * 3.0d0))
    else if (t_1 <= 2d+301) then
        tmp = (x_46re * ((x_46re * x_46im) * 2.0d0)) + t_0
    else
        tmp = 3.0d0 * (x_46re * (x_46re * x_46im))
    end if
    code = tmp
end function
public static double code(double x_46_re, double x_46_im) {
	return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
}
public static double code(double x_46_re, double x_46_im) {
	double t_0 = x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im));
	double t_1 = t_0 + (x_46_re * ((x_46_re * x_46_im) + (x_46_re * x_46_im)));
	double tmp;
	if (t_1 <= -5e+273) {
		tmp = x_46_re * (x_46_re * (x_46_im * 3.0));
	} else if (t_1 <= 2e+301) {
		tmp = (x_46_re * ((x_46_re * x_46_im) * 2.0)) + t_0;
	} else {
		tmp = 3.0 * (x_46_re * (x_46_re * x_46_im));
	}
	return tmp;
}
def code(x_46_re, x_46_im):
	return (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re)
def code(x_46_re, x_46_im):
	t_0 = x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im))
	t_1 = t_0 + (x_46_re * ((x_46_re * x_46_im) + (x_46_re * x_46_im)))
	tmp = 0
	if t_1 <= -5e+273:
		tmp = x_46_re * (x_46_re * (x_46_im * 3.0))
	elif t_1 <= 2e+301:
		tmp = (x_46_re * ((x_46_re * x_46_im) * 2.0)) + t_0
	else:
		tmp = 3.0 * (x_46_re * (x_46_re * x_46_im))
	return tmp
function code(x_46_re, x_46_im)
	return Float64(Float64(Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)) * x_46_im) + Float64(Float64(Float64(x_46_re * x_46_im) + Float64(x_46_im * x_46_re)) * x_46_re))
end
function code(x_46_re, x_46_im)
	t_0 = Float64(x_46_im * Float64(Float64(x_46_re * x_46_re) - Float64(x_46_im * x_46_im)))
	t_1 = Float64(t_0 + Float64(x_46_re * Float64(Float64(x_46_re * x_46_im) + Float64(x_46_re * x_46_im))))
	tmp = 0.0
	if (t_1 <= -5e+273)
		tmp = Float64(x_46_re * Float64(x_46_re * Float64(x_46_im * 3.0)));
	elseif (t_1 <= 2e+301)
		tmp = Float64(Float64(x_46_re * Float64(Float64(x_46_re * x_46_im) * 2.0)) + t_0);
	else
		tmp = Float64(3.0 * Float64(x_46_re * Float64(x_46_re * x_46_im)));
	end
	return tmp
end
function tmp = code(x_46_re, x_46_im)
	tmp = (((x_46_re * x_46_re) - (x_46_im * x_46_im)) * x_46_im) + (((x_46_re * x_46_im) + (x_46_im * x_46_re)) * x_46_re);
end
function tmp_2 = code(x_46_re, x_46_im)
	t_0 = x_46_im * ((x_46_re * x_46_re) - (x_46_im * x_46_im));
	t_1 = t_0 + (x_46_re * ((x_46_re * x_46_im) + (x_46_re * x_46_im)));
	tmp = 0.0;
	if (t_1 <= -5e+273)
		tmp = x_46_re * (x_46_re * (x_46_im * 3.0));
	elseif (t_1 <= 2e+301)
		tmp = (x_46_re * ((x_46_re * x_46_im) * 2.0)) + t_0;
	else
		tmp = 3.0 * (x_46_re * (x_46_re * x_46_im));
	end
	tmp_2 = tmp;
end
code[x$46$re_, x$46$im_] := N[(N[(N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision] * x$46$im), $MachinePrecision] + N[(N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$im * x$46$re), $MachinePrecision]), $MachinePrecision] * x$46$re), $MachinePrecision]), $MachinePrecision]
code[x$46$re_, x$46$im_] := Block[{t$95$0 = N[(x$46$im * N[(N[(x$46$re * x$46$re), $MachinePrecision] - N[(x$46$im * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 + N[(x$46$re * N[(N[(x$46$re * x$46$im), $MachinePrecision] + N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+273], N[(x$46$re * N[(x$46$re * N[(x$46$im * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+301], N[(N[(x$46$re * N[(N[(x$46$re * x$46$im), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision], N[(3.0 * N[(x$46$re * N[(x$46$re * x$46$im), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re
\begin{array}{l}
t_0 := x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right)\\
t_1 := t_0 + x.re \cdot \left(x.re \cdot x.im + x.re \cdot x.im\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+273}:\\
\;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right)\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;x.re \cdot \left(\left(x.re \cdot x.im\right) \cdot 2\right) + t_0\\

\mathbf{else}:\\
\;\;\;\;3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original88.4%
Target99.6%
Herbie98.5%
\[\left(x.re \cdot x.im\right) \cdot \left(2 \cdot x.re\right) + \left(x.im \cdot \left(x.re - x.im\right)\right) \cdot \left(x.re + x.im\right) \]

Derivation?

  1. Split input into 3 regimes
  2. if (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < -4.99999999999999961e273

    1. Initial program 20.4%

      \[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]
    2. Applied egg-rr20.4%

      \[\leadsto \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \color{blue}{\left(\left(x.re \cdot x.im\right) \cdot 2\right)} \cdot x.re \]
      Proof

      [Start]20.4

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]

      *-un-lft-identity [=>]20.4

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(\color{blue}{1 \cdot \left(x.re \cdot x.im\right)} + x.im \cdot x.re\right) \cdot x.re \]

      *-commutative [<=]20.4

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(1 \cdot \left(x.re \cdot x.im\right) + \color{blue}{x.re \cdot x.im}\right) \cdot x.re \]

      *-un-lft-identity [=>]20.4

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(1 \cdot \left(x.re \cdot x.im\right) + \color{blue}{1 \cdot \left(x.re \cdot x.im\right)}\right) \cdot x.re \]

      distribute-rgt-out [=>]20.4

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \color{blue}{\left(\left(x.re \cdot x.im\right) \cdot \left(1 + 1\right)\right)} \cdot x.re \]

      metadata-eval [=>]20.4

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(\left(x.re \cdot x.im\right) \cdot \color{blue}{2}\right) \cdot x.re \]
    3. Taylor expanded in x.re around inf 5.8%

      \[\leadsto \color{blue}{{x.re}^{2} \cdot \left(x.im + 2 \cdot x.im\right)} \]
    4. Simplified84.9%

      \[\leadsto \color{blue}{x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right)} \]
      Proof

      [Start]5.8

      \[ {x.re}^{2} \cdot \left(x.im + 2 \cdot x.im\right) \]

      unpow2 [=>]5.8

      \[ \color{blue}{\left(x.re \cdot x.re\right)} \cdot \left(x.im + 2 \cdot x.im\right) \]

      associate-*l* [=>]84.9

      \[ \color{blue}{x.re \cdot \left(x.re \cdot \left(x.im + 2 \cdot x.im\right)\right)} \]

      distribute-rgt1-in [=>]84.9

      \[ x.re \cdot \left(x.re \cdot \color{blue}{\left(\left(2 + 1\right) \cdot x.im\right)}\right) \]

      metadata-eval [=>]84.9

      \[ x.re \cdot \left(x.re \cdot \left(\color{blue}{3} \cdot x.im\right)\right) \]

      *-commutative [=>]84.9

      \[ x.re \cdot \left(x.re \cdot \color{blue}{\left(x.im \cdot 3\right)}\right) \]

    if -4.99999999999999961e273 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re)) < 2.00000000000000011e301

    1. Initial program 99.7%

      \[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]
    2. Applied egg-rr99.7%

      \[\leadsto \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \color{blue}{\left(\left(x.re \cdot x.im\right) \cdot 2\right)} \cdot x.re \]
      Proof

      [Start]99.7

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]

      *-un-lft-identity [=>]99.7

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(\color{blue}{1 \cdot \left(x.re \cdot x.im\right)} + x.im \cdot x.re\right) \cdot x.re \]

      *-commutative [<=]99.7

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(1 \cdot \left(x.re \cdot x.im\right) + \color{blue}{x.re \cdot x.im}\right) \cdot x.re \]

      *-un-lft-identity [=>]99.7

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(1 \cdot \left(x.re \cdot x.im\right) + \color{blue}{1 \cdot \left(x.re \cdot x.im\right)}\right) \cdot x.re \]

      distribute-rgt-out [=>]99.7

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \color{blue}{\left(\left(x.re \cdot x.im\right) \cdot \left(1 + 1\right)\right)} \cdot x.re \]

      metadata-eval [=>]99.7

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(\left(x.re \cdot x.im\right) \cdot \color{blue}{2}\right) \cdot x.re \]

    if 2.00000000000000011e301 < (+.f64 (*.f64 (-.f64 (*.f64 x.re x.re) (*.f64 x.im x.im)) x.im) (*.f64 (+.f64 (*.f64 x.re x.im) (*.f64 x.im x.re)) x.re))

    1. Initial program 2.8%

      \[\left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]
    2. Simplified2.8%

      \[\leadsto \color{blue}{x.im \cdot \mathsf{fma}\left(3, x.re \cdot x.re, -x.im \cdot x.im\right)} \]
      Proof

      [Start]2.8

      \[ \left(x.re \cdot x.re - x.im \cdot x.im\right) \cdot x.im + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]

      *-commutative [=>]2.8

      \[ \color{blue}{x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right)} + \left(x.re \cdot x.im + x.im \cdot x.re\right) \cdot x.re \]

      *-commutative [<=]2.8

      \[ x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + \left(x.re \cdot x.im + \color{blue}{x.re \cdot x.im}\right) \cdot x.re \]

      distribute-rgt-out [=>]2.8

      \[ x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + \color{blue}{\left(x.im \cdot \left(x.re + x.re\right)\right)} \cdot x.re \]

      associate-*l* [=>]2.8

      \[ x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + \color{blue}{x.im \cdot \left(\left(x.re + x.re\right) \cdot x.re\right)} \]

      distribute-lft-out [=>]2.8

      \[ \color{blue}{x.im \cdot \left(\left(x.re \cdot x.re - x.im \cdot x.im\right) + \left(x.re + x.re\right) \cdot x.re\right)} \]

      +-commutative [<=]2.8

      \[ x.im \cdot \color{blue}{\left(\left(x.re + x.re\right) \cdot x.re + \left(x.re \cdot x.re - x.im \cdot x.im\right)\right)} \]

      associate-+r- [=>]2.8

      \[ x.im \cdot \color{blue}{\left(\left(\left(x.re + x.re\right) \cdot x.re + x.re \cdot x.re\right) - x.im \cdot x.im\right)} \]

      count-2 [=>]2.8

      \[ x.im \cdot \left(\left(\color{blue}{\left(2 \cdot x.re\right)} \cdot x.re + x.re \cdot x.re\right) - x.im \cdot x.im\right) \]

      associate-*l* [=>]2.8

      \[ x.im \cdot \left(\left(\color{blue}{2 \cdot \left(x.re \cdot x.re\right)} + x.re \cdot x.re\right) - x.im \cdot x.im\right) \]

      distribute-lft1-in [=>]2.8

      \[ x.im \cdot \left(\color{blue}{\left(2 + 1\right) \cdot \left(x.re \cdot x.re\right)} - x.im \cdot x.im\right) \]

      fma-neg [=>]2.8

      \[ x.im \cdot \color{blue}{\mathsf{fma}\left(2 + 1, x.re \cdot x.re, -x.im \cdot x.im\right)} \]

      metadata-eval [=>]2.8

      \[ x.im \cdot \mathsf{fma}\left(\color{blue}{3}, x.re \cdot x.re, -x.im \cdot x.im\right) \]
    3. Taylor expanded in x.im around 0 0.9%

      \[\leadsto \color{blue}{3 \cdot \left({x.re}^{2} \cdot x.im\right)} \]
    4. Simplified97.6%

      \[\leadsto \color{blue}{3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)} \]
      Proof

      [Start]0.9

      \[ 3 \cdot \left({x.re}^{2} \cdot x.im\right) \]

      unpow2 [=>]0.9

      \[ 3 \cdot \left(\color{blue}{\left(x.re \cdot x.re\right)} \cdot x.im\right) \]

      associate-*l* [=>]97.6

      \[ 3 \cdot \color{blue}{\left(x.re \cdot \left(x.re \cdot x.im\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + x.re \cdot \left(x.re \cdot x.im + x.re \cdot x.im\right) \leq -5 \cdot 10^{+273}:\\ \;\;\;\;x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right)\\ \mathbf{elif}\;x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right) + x.re \cdot \left(x.re \cdot x.im + x.re \cdot x.im\right) \leq 2 \cdot 10^{+301}:\\ \;\;\;\;x.re \cdot \left(\left(x.re \cdot x.im\right) \cdot 2\right) + x.im \cdot \left(x.re \cdot x.re - x.im \cdot x.im\right)\\ \mathbf{else}:\\ \;\;\;\;3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy99.7%
Cost7040
\[x.re \cdot \left(x.re \cdot \left(x.im \cdot 3\right)\right) - {x.im}^{3} \]
Alternative 2
Accuracy99.6%
Cost1216
\[\frac{x.im}{\frac{1}{x.re - x.im}} \cdot \left(x.re + x.im\right) + x.re \cdot \left(\left(x.re \cdot x.im\right) \cdot 2\right) \]
Alternative 3
Accuracy99.2%
Cost1096
\[\begin{array}{l} \mathbf{if}\;x.re \leq -6.8 \cdot 10^{+50}:\\ \;\;\;\;3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)\\ \mathbf{elif}\;x.re \leq 1.4 \cdot 10^{+58}:\\ \;\;\;\;x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right)\right) - x.im \cdot \left(x.im \cdot x.im\right)\\ \mathbf{else}:\\ \;\;\;\;x.re \cdot \left(3 \cdot \left(x.re \cdot x.im\right)\right)\\ \end{array} \]
Alternative 4
Accuracy99.1%
Cost968
\[\begin{array}{l} \mathbf{if}\;x.re \leq -6.9 \cdot 10^{+50}:\\ \;\;\;\;3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)\\ \mathbf{elif}\;x.re \leq 5 \cdot 10^{+55}:\\ \;\;\;\;x.im \cdot \left(3 \cdot \left(x.re \cdot x.re\right) - x.im \cdot x.im\right)\\ \mathbf{else}:\\ \;\;\;\;x.re \cdot \left(3 \cdot \left(x.re \cdot x.im\right)\right)\\ \end{array} \]
Alternative 5
Accuracy80.6%
Cost713
\[\begin{array}{l} \mathbf{if}\;x.re \leq -1.55 \cdot 10^{-50} \lor \neg \left(x.re \leq 2 \cdot 10^{-55}\right):\\ \;\;\;\;3 \cdot \left(x.im \cdot \left(x.re \cdot x.re\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x.im \cdot x.im\right) \cdot \left(-x.im\right)\\ \end{array} \]
Alternative 6
Accuracy91.8%
Cost713
\[\begin{array}{l} \mathbf{if}\;x.re \leq -1.92 \cdot 10^{-50} \lor \neg \left(x.re \leq 5.3 \cdot 10^{-55}\right):\\ \;\;\;\;3 \cdot \left(x.re \cdot \left(x.re \cdot x.im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x.im \cdot x.im\right) \cdot \left(-x.im\right)\\ \end{array} \]
Alternative 7
Accuracy91.8%
Cost713
\[\begin{array}{l} \mathbf{if}\;x.re \leq -1.56 \cdot 10^{-50} \lor \neg \left(x.re \leq 1.22 \cdot 10^{-55}\right):\\ \;\;\;\;x.re \cdot \left(3 \cdot \left(x.re \cdot x.im\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x.im \cdot x.im\right) \cdot \left(-x.im\right)\\ \end{array} \]
Alternative 8
Accuracy54.9%
Cost384
\[\left(x.im \cdot x.im\right) \cdot \left(-x.im\right) \]

Error

Reproduce?

herbie shell --seed 2023133 
(FPCore (x.re x.im)
  :name "math.cube on complex, imaginary part"
  :precision binary64

  :herbie-target
  (+ (* (* x.re x.im) (* 2.0 x.re)) (* (* x.im (- x.re x.im)) (+ x.re x.im)))

  (+ (* (- (* x.re x.re) (* x.im x.im)) x.im) (* (+ (* x.re x.im) (* x.im x.re)) x.re)))