Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C

Percentage Accurate: 99.9% → 100.0%
Time: 6.1s
Alternatives: 8
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x \cdot \left(y + z\right) + z \cdot 5 \end{array} \]
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
	return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
	return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z):
	return (x * (y + z)) + (z * 5.0)
function code(x, y, z)
	return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0))
end
function tmp = code(x, y, z)
	tmp = (x * (y + z)) + (z * 5.0);
end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \left(y + z\right) + z \cdot 5 \end{array} \]
(FPCore (x y z) :precision binary64 (+ (* x (+ y z)) (* z 5.0)))
double code(double x, double y, double z) {
	return (x * (y + z)) + (z * 5.0);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (y + z)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
	return (x * (y + z)) + (z * 5.0);
}
def code(x, y, z):
	return (x * (y + z)) + (z * 5.0)
function code(x, y, z)
	return Float64(Float64(x * Float64(y + z)) + Float64(z * 5.0))
end
function tmp = code(x, y, z)
	tmp = (x * (y + z)) + (z * 5.0);
end
code[x_, y_, z_] := N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(y + z\right) + z \cdot 5
\end{array}

Alternative 1: 100.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(z, 5, x \cdot \left(z + y\right)\right) \end{array} \]
(FPCore (x y z) :precision binary64 (fma z 5.0 (* x (+ z y))))
double code(double x, double y, double z) {
	return fma(z, 5.0, (x * (z + y)));
}
function code(x, y, z)
	return fma(z, 5.0, Float64(x * Float64(z + y)))
end
code[x_, y_, z_] := N[(z * 5.0 + N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(z, 5, x \cdot \left(z + y\right)\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[x \cdot \left(y + z\right) + z \cdot 5 \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. +-commutative99.9%

      \[\leadsto \color{blue}{z \cdot 5 + x \cdot \left(y + z\right)} \]
    2. fma-define100.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, 5, x \cdot \left(y + z\right)\right)} \]
  4. Applied egg-rr100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(z, 5, x \cdot \left(y + z\right)\right)} \]
  5. Final simplification100.0%

    \[\leadsto \mathsf{fma}\left(z, 5, x \cdot \left(z + y\right)\right) \]
  6. Add Preprocessing

Alternative 2: 61.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+250}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{+77}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+15}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{-29}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+29} \lor \neg \left(x \leq 1.18 \cdot 10^{+101}\right) \land \left(x \leq 8.4 \cdot 10^{+133} \lor \neg \left(x \leq 5.8 \cdot 10^{+163}\right) \land x \leq 2 \cdot 10^{+235}\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -3.4e+250)
   (* z x)
   (if (<= x -2.8e+77)
     (* x y)
     (if (<= x -2e+15)
       (* z x)
       (if (<= x 9.8e-29)
         (* z 5.0)
         (if (or (<= x 5.8e+29)
                 (and (not (<= x 1.18e+101))
                      (or (<= x 8.4e+133)
                          (and (not (<= x 5.8e+163)) (<= x 2e+235)))))
           (* x y)
           (* z x)))))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -3.4e+250) {
		tmp = z * x;
	} else if (x <= -2.8e+77) {
		tmp = x * y;
	} else if (x <= -2e+15) {
		tmp = z * x;
	} else if (x <= 9.8e-29) {
		tmp = z * 5.0;
	} else if ((x <= 5.8e+29) || (!(x <= 1.18e+101) && ((x <= 8.4e+133) || (!(x <= 5.8e+163) && (x <= 2e+235))))) {
		tmp = x * y;
	} else {
		tmp = z * x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x <= (-3.4d+250)) then
        tmp = z * x
    else if (x <= (-2.8d+77)) then
        tmp = x * y
    else if (x <= (-2d+15)) then
        tmp = z * x
    else if (x <= 9.8d-29) then
        tmp = z * 5.0d0
    else if ((x <= 5.8d+29) .or. (.not. (x <= 1.18d+101)) .and. (x <= 8.4d+133) .or. (.not. (x <= 5.8d+163)) .and. (x <= 2d+235)) then
        tmp = x * y
    else
        tmp = z * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -3.4e+250) {
		tmp = z * x;
	} else if (x <= -2.8e+77) {
		tmp = x * y;
	} else if (x <= -2e+15) {
		tmp = z * x;
	} else if (x <= 9.8e-29) {
		tmp = z * 5.0;
	} else if ((x <= 5.8e+29) || (!(x <= 1.18e+101) && ((x <= 8.4e+133) || (!(x <= 5.8e+163) && (x <= 2e+235))))) {
		tmp = x * y;
	} else {
		tmp = z * x;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -3.4e+250:
		tmp = z * x
	elif x <= -2.8e+77:
		tmp = x * y
	elif x <= -2e+15:
		tmp = z * x
	elif x <= 9.8e-29:
		tmp = z * 5.0
	elif (x <= 5.8e+29) or (not (x <= 1.18e+101) and ((x <= 8.4e+133) or (not (x <= 5.8e+163) and (x <= 2e+235)))):
		tmp = x * y
	else:
		tmp = z * x
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -3.4e+250)
		tmp = Float64(z * x);
	elseif (x <= -2.8e+77)
		tmp = Float64(x * y);
	elseif (x <= -2e+15)
		tmp = Float64(z * x);
	elseif (x <= 9.8e-29)
		tmp = Float64(z * 5.0);
	elseif ((x <= 5.8e+29) || (!(x <= 1.18e+101) && ((x <= 8.4e+133) || (!(x <= 5.8e+163) && (x <= 2e+235)))))
		tmp = Float64(x * y);
	else
		tmp = Float64(z * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -3.4e+250)
		tmp = z * x;
	elseif (x <= -2.8e+77)
		tmp = x * y;
	elseif (x <= -2e+15)
		tmp = z * x;
	elseif (x <= 9.8e-29)
		tmp = z * 5.0;
	elseif ((x <= 5.8e+29) || (~((x <= 1.18e+101)) && ((x <= 8.4e+133) || (~((x <= 5.8e+163)) && (x <= 2e+235)))))
		tmp = x * y;
	else
		tmp = z * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -3.4e+250], N[(z * x), $MachinePrecision], If[LessEqual[x, -2.8e+77], N[(x * y), $MachinePrecision], If[LessEqual[x, -2e+15], N[(z * x), $MachinePrecision], If[LessEqual[x, 9.8e-29], N[(z * 5.0), $MachinePrecision], If[Or[LessEqual[x, 5.8e+29], And[N[Not[LessEqual[x, 1.18e+101]], $MachinePrecision], Or[LessEqual[x, 8.4e+133], And[N[Not[LessEqual[x, 5.8e+163]], $MachinePrecision], LessEqual[x, 2e+235]]]]], N[(x * y), $MachinePrecision], N[(z * x), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{+250}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;x \leq -2.8 \cdot 10^{+77}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq -2 \cdot 10^{+15}:\\
\;\;\;\;z \cdot x\\

\mathbf{elif}\;x \leq 9.8 \cdot 10^{-29}:\\
\;\;\;\;z \cdot 5\\

\mathbf{elif}\;x \leq 5.8 \cdot 10^{+29} \lor \neg \left(x \leq 1.18 \cdot 10^{+101}\right) \land \left(x \leq 8.4 \cdot 10^{+133} \lor \neg \left(x \leq 5.8 \cdot 10^{+163}\right) \land x \leq 2 \cdot 10^{+235}\right):\\
\;\;\;\;x \cdot y\\

\mathbf{else}:\\
\;\;\;\;z \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -3.39999999999999973e250 or -2.8e77 < x < -2e15 or 5.7999999999999999e29 < x < 1.18000000000000005e101 or 8.4e133 < x < 5.79999999999999996e163 or 2.0000000000000001e235 < x

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 100.0%

      \[\leadsto \color{blue}{x \cdot \left(y + z\right)} \]
    4. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto x \cdot \color{blue}{\left(z + y\right)} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{x \cdot \left(z + y\right)} \]
    6. Taylor expanded in z around inf 73.9%

      \[\leadsto \color{blue}{x \cdot z} \]

    if -3.39999999999999973e250 < x < -2.8e77 or 9.7999999999999997e-29 < x < 5.7999999999999999e29 or 1.18000000000000005e101 < x < 8.4e133 or 5.79999999999999996e163 < x < 2.0000000000000001e235

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 72.5%

      \[\leadsto \color{blue}{x \cdot y} \]

    if -2e15 < x < 9.7999999999999997e-29

    1. Initial program 99.9%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 71.0%

      \[\leadsto \color{blue}{5 \cdot z} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -3.4 \cdot 10^{+250}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;x \leq -2.8 \cdot 10^{+77}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -2 \cdot 10^{+15}:\\ \;\;\;\;z \cdot x\\ \mathbf{elif}\;x \leq 9.8 \cdot 10^{-29}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq 5.8 \cdot 10^{+29} \lor \neg \left(x \leq 1.18 \cdot 10^{+101}\right) \land \left(x \leq 8.4 \cdot 10^{+133} \lor \neg \left(x \leq 5.8 \cdot 10^{+163}\right) \land x \leq 2 \cdot 10^{+235}\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.1% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(z + y\right)\\ \mathbf{if}\;x \leq -1.05 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-28}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{-90}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-233}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq -1.75 \cdot 10^{-235}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-225}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{-225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-37}:\\ \;\;\;\;z \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* x (+ z y))))
   (if (<= x -1.05e-6)
     t_0
     (if (<= x -3.2e-28)
       (* z 5.0)
       (if (<= x -2.6e-90)
         (* x y)
         (if (<= x -7e-233)
           (* z 5.0)
           (if (<= x -1.75e-235)
             (* x y)
             (if (<= x 5.2e-225)
               (* z 5.0)
               (if (<= x 5.3e-225)
                 (* x y)
                 (if (<= x 1.9e-37) (* z 5.0) t_0))))))))))
double code(double x, double y, double z) {
	double t_0 = x * (z + y);
	double tmp;
	if (x <= -1.05e-6) {
		tmp = t_0;
	} else if (x <= -3.2e-28) {
		tmp = z * 5.0;
	} else if (x <= -2.6e-90) {
		tmp = x * y;
	} else if (x <= -7e-233) {
		tmp = z * 5.0;
	} else if (x <= -1.75e-235) {
		tmp = x * y;
	} else if (x <= 5.2e-225) {
		tmp = z * 5.0;
	} else if (x <= 5.3e-225) {
		tmp = x * y;
	} else if (x <= 1.9e-37) {
		tmp = z * 5.0;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x * (z + y)
    if (x <= (-1.05d-6)) then
        tmp = t_0
    else if (x <= (-3.2d-28)) then
        tmp = z * 5.0d0
    else if (x <= (-2.6d-90)) then
        tmp = x * y
    else if (x <= (-7d-233)) then
        tmp = z * 5.0d0
    else if (x <= (-1.75d-235)) then
        tmp = x * y
    else if (x <= 5.2d-225) then
        tmp = z * 5.0d0
    else if (x <= 5.3d-225) then
        tmp = x * y
    else if (x <= 1.9d-37) then
        tmp = z * 5.0d0
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x * (z + y);
	double tmp;
	if (x <= -1.05e-6) {
		tmp = t_0;
	} else if (x <= -3.2e-28) {
		tmp = z * 5.0;
	} else if (x <= -2.6e-90) {
		tmp = x * y;
	} else if (x <= -7e-233) {
		tmp = z * 5.0;
	} else if (x <= -1.75e-235) {
		tmp = x * y;
	} else if (x <= 5.2e-225) {
		tmp = z * 5.0;
	} else if (x <= 5.3e-225) {
		tmp = x * y;
	} else if (x <= 1.9e-37) {
		tmp = z * 5.0;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x * (z + y)
	tmp = 0
	if x <= -1.05e-6:
		tmp = t_0
	elif x <= -3.2e-28:
		tmp = z * 5.0
	elif x <= -2.6e-90:
		tmp = x * y
	elif x <= -7e-233:
		tmp = z * 5.0
	elif x <= -1.75e-235:
		tmp = x * y
	elif x <= 5.2e-225:
		tmp = z * 5.0
	elif x <= 5.3e-225:
		tmp = x * y
	elif x <= 1.9e-37:
		tmp = z * 5.0
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(x * Float64(z + y))
	tmp = 0.0
	if (x <= -1.05e-6)
		tmp = t_0;
	elseif (x <= -3.2e-28)
		tmp = Float64(z * 5.0);
	elseif (x <= -2.6e-90)
		tmp = Float64(x * y);
	elseif (x <= -7e-233)
		tmp = Float64(z * 5.0);
	elseif (x <= -1.75e-235)
		tmp = Float64(x * y);
	elseif (x <= 5.2e-225)
		tmp = Float64(z * 5.0);
	elseif (x <= 5.3e-225)
		tmp = Float64(x * y);
	elseif (x <= 1.9e-37)
		tmp = Float64(z * 5.0);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x * (z + y);
	tmp = 0.0;
	if (x <= -1.05e-6)
		tmp = t_0;
	elseif (x <= -3.2e-28)
		tmp = z * 5.0;
	elseif (x <= -2.6e-90)
		tmp = x * y;
	elseif (x <= -7e-233)
		tmp = z * 5.0;
	elseif (x <= -1.75e-235)
		tmp = x * y;
	elseif (x <= 5.2e-225)
		tmp = z * 5.0;
	elseif (x <= 5.3e-225)
		tmp = x * y;
	elseif (x <= 1.9e-37)
		tmp = z * 5.0;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e-6], t$95$0, If[LessEqual[x, -3.2e-28], N[(z * 5.0), $MachinePrecision], If[LessEqual[x, -2.6e-90], N[(x * y), $MachinePrecision], If[LessEqual[x, -7e-233], N[(z * 5.0), $MachinePrecision], If[LessEqual[x, -1.75e-235], N[(x * y), $MachinePrecision], If[LessEqual[x, 5.2e-225], N[(z * 5.0), $MachinePrecision], If[LessEqual[x, 5.3e-225], N[(x * y), $MachinePrecision], If[LessEqual[x, 1.9e-37], N[(z * 5.0), $MachinePrecision], t$95$0]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(z + y\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq -3.2 \cdot 10^{-28}:\\
\;\;\;\;z \cdot 5\\

\mathbf{elif}\;x \leq -2.6 \cdot 10^{-90}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq -7 \cdot 10^{-233}:\\
\;\;\;\;z \cdot 5\\

\mathbf{elif}\;x \leq -1.75 \cdot 10^{-235}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-225}:\\
\;\;\;\;z \cdot 5\\

\mathbf{elif}\;x \leq 5.3 \cdot 10^{-225}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq 1.9 \cdot 10^{-37}:\\
\;\;\;\;z \cdot 5\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.0499999999999999e-6 or 1.9000000000000002e-37 < x

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 97.0%

      \[\leadsto \color{blue}{x \cdot \left(y + z\right)} \]
    4. Step-by-step derivation
      1. +-commutative97.0%

        \[\leadsto x \cdot \color{blue}{\left(z + y\right)} \]
    5. Simplified97.0%

      \[\leadsto \color{blue}{x \cdot \left(z + y\right)} \]

    if -1.0499999999999999e-6 < x < -3.19999999999999982e-28 or -2.6e-90 < x < -6.99999999999999982e-233 or -1.7499999999999999e-235 < x < 5.20000000000000027e-225 or 5.30000000000000005e-225 < x < 1.9000000000000002e-37

    1. Initial program 99.9%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 78.3%

      \[\leadsto \color{blue}{5 \cdot z} \]

    if -3.19999999999999982e-28 < x < -2.6e-90 or -6.99999999999999982e-233 < x < -1.7499999999999999e-235 or 5.20000000000000027e-225 < x < 5.30000000000000005e-225

    1. Initial program 99.8%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 71.0%

      \[\leadsto \color{blue}{x \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(z + y\right)\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-28}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq -2.6 \cdot 10^{-90}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-233}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq -1.75 \cdot 10^{-235}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-225}:\\ \;\;\;\;z \cdot 5\\ \mathbf{elif}\;x \leq 5.3 \cdot 10^{-225}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 1.9 \cdot 10^{-37}:\\ \;\;\;\;z \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := x \cdot \left(z + y\right)\\ \mathbf{if}\;x \leq -8.5 \cdot 10^{-6}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-14}:\\ \;\;\;\;z \cdot \left(5 + x\right)\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-90}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 7.1 \cdot 10^{-43}:\\ \;\;\;\;z \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* x (+ z y))))
   (if (<= x -8.5e-6)
     t_0
     (if (<= x -3.5e-14)
       (* z (+ 5.0 x))
       (if (<= x -4.6e-90) (* x y) (if (<= x 7.1e-43) (* z 5.0) t_0))))))
double code(double x, double y, double z) {
	double t_0 = x * (z + y);
	double tmp;
	if (x <= -8.5e-6) {
		tmp = t_0;
	} else if (x <= -3.5e-14) {
		tmp = z * (5.0 + x);
	} else if (x <= -4.6e-90) {
		tmp = x * y;
	} else if (x <= 7.1e-43) {
		tmp = z * 5.0;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = x * (z + y)
    if (x <= (-8.5d-6)) then
        tmp = t_0
    else if (x <= (-3.5d-14)) then
        tmp = z * (5.0d0 + x)
    else if (x <= (-4.6d-90)) then
        tmp = x * y
    else if (x <= 7.1d-43) then
        tmp = z * 5.0d0
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = x * (z + y);
	double tmp;
	if (x <= -8.5e-6) {
		tmp = t_0;
	} else if (x <= -3.5e-14) {
		tmp = z * (5.0 + x);
	} else if (x <= -4.6e-90) {
		tmp = x * y;
	} else if (x <= 7.1e-43) {
		tmp = z * 5.0;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = x * (z + y)
	tmp = 0
	if x <= -8.5e-6:
		tmp = t_0
	elif x <= -3.5e-14:
		tmp = z * (5.0 + x)
	elif x <= -4.6e-90:
		tmp = x * y
	elif x <= 7.1e-43:
		tmp = z * 5.0
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(x * Float64(z + y))
	tmp = 0.0
	if (x <= -8.5e-6)
		tmp = t_0;
	elseif (x <= -3.5e-14)
		tmp = Float64(z * Float64(5.0 + x));
	elseif (x <= -4.6e-90)
		tmp = Float64(x * y);
	elseif (x <= 7.1e-43)
		tmp = Float64(z * 5.0);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = x * (z + y);
	tmp = 0.0;
	if (x <= -8.5e-6)
		tmp = t_0;
	elseif (x <= -3.5e-14)
		tmp = z * (5.0 + x);
	elseif (x <= -4.6e-90)
		tmp = x * y;
	elseif (x <= 7.1e-43)
		tmp = z * 5.0;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e-6], t$95$0, If[LessEqual[x, -3.5e-14], N[(z * N[(5.0 + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.6e-90], N[(x * y), $MachinePrecision], If[LessEqual[x, 7.1e-43], N[(z * 5.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := x \cdot \left(z + y\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-6}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq -3.5 \cdot 10^{-14}:\\
\;\;\;\;z \cdot \left(5 + x\right)\\

\mathbf{elif}\;x \leq -4.6 \cdot 10^{-90}:\\
\;\;\;\;x \cdot y\\

\mathbf{elif}\;x \leq 7.1 \cdot 10^{-43}:\\
\;\;\;\;z \cdot 5\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -8.4999999999999999e-6 or 7.10000000000000025e-43 < x

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 96.3%

      \[\leadsto \color{blue}{x \cdot \left(y + z\right)} \]
    4. Step-by-step derivation
      1. +-commutative96.3%

        \[\leadsto x \cdot \color{blue}{\left(z + y\right)} \]
    5. Simplified96.3%

      \[\leadsto \color{blue}{x \cdot \left(z + y\right)} \]

    if -8.4999999999999999e-6 < x < -3.5000000000000002e-14

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 100.0%

      \[\leadsto \color{blue}{5 \cdot z + x \cdot z} \]
    4. Step-by-step derivation
      1. distribute-rgt-in100.0%

        \[\leadsto \color{blue}{z \cdot \left(5 + x\right)} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{z \cdot \left(5 + x\right)} \]

    if -3.5000000000000002e-14 < x < -4.5999999999999996e-90

    1. Initial program 99.8%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 59.7%

      \[\leadsto \color{blue}{x \cdot y} \]

    if -4.5999999999999996e-90 < x < 7.10000000000000025e-43

    1. Initial program 99.9%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 76.4%

      \[\leadsto \color{blue}{5 \cdot z} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification85.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{-6}:\\ \;\;\;\;x \cdot \left(z + y\right)\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-14}:\\ \;\;\;\;z \cdot \left(5 + x\right)\\ \mathbf{elif}\;x \leq -4.6 \cdot 10^{-90}:\\ \;\;\;\;x \cdot y\\ \mathbf{elif}\;x \leq 7.1 \cdot 10^{-43}:\\ \;\;\;\;z \cdot 5\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(z + y\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{-6} \lor \neg \left(x \leq -6.1 \cdot 10^{-37}\right) \land \left(x \leq -4.4 \cdot 10^{-91} \lor \neg \left(x \leq 9.5 \cdot 10^{-29}\right)\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot 5\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -1.1e-6)
         (and (not (<= x -6.1e-37)) (or (<= x -4.4e-91) (not (<= x 9.5e-29)))))
   (* x y)
   (* z 5.0)))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.1e-6) || (!(x <= -6.1e-37) && ((x <= -4.4e-91) || !(x <= 9.5e-29)))) {
		tmp = x * y;
	} else {
		tmp = z * 5.0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-1.1d-6)) .or. (.not. (x <= (-6.1d-37))) .and. (x <= (-4.4d-91)) .or. (.not. (x <= 9.5d-29))) then
        tmp = x * y
    else
        tmp = z * 5.0d0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -1.1e-6) || (!(x <= -6.1e-37) && ((x <= -4.4e-91) || !(x <= 9.5e-29)))) {
		tmp = x * y;
	} else {
		tmp = z * 5.0;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -1.1e-6) or (not (x <= -6.1e-37) and ((x <= -4.4e-91) or not (x <= 9.5e-29))):
		tmp = x * y
	else:
		tmp = z * 5.0
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -1.1e-6) || (!(x <= -6.1e-37) && ((x <= -4.4e-91) || !(x <= 9.5e-29))))
		tmp = Float64(x * y);
	else
		tmp = Float64(z * 5.0);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -1.1e-6) || (~((x <= -6.1e-37)) && ((x <= -4.4e-91) || ~((x <= 9.5e-29)))))
		tmp = x * y;
	else
		tmp = z * 5.0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.1e-6], And[N[Not[LessEqual[x, -6.1e-37]], $MachinePrecision], Or[LessEqual[x, -4.4e-91], N[Not[LessEqual[x, 9.5e-29]], $MachinePrecision]]]], N[(x * y), $MachinePrecision], N[(z * 5.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-6} \lor \neg \left(x \leq -6.1 \cdot 10^{-37}\right) \land \left(x \leq -4.4 \cdot 10^{-91} \lor \neg \left(x \leq 9.5 \cdot 10^{-29}\right)\right):\\
\;\;\;\;x \cdot y\\

\mathbf{else}:\\
\;\;\;\;z \cdot 5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.1000000000000001e-6 or -6.1000000000000003e-37 < x < -4.4000000000000002e-91 or 9.50000000000000023e-29 < x

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 55.9%

      \[\leadsto \color{blue}{x \cdot y} \]

    if -1.1000000000000001e-6 < x < -6.1000000000000003e-37 or -4.4000000000000002e-91 < x < 9.50000000000000023e-29

    1. Initial program 99.9%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around 0 76.6%

      \[\leadsto \color{blue}{5 \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{-6} \lor \neg \left(x \leq -6.1 \cdot 10^{-37}\right) \land \left(x \leq -4.4 \cdot 10^{-91} \lor \neg \left(x \leq 9.5 \cdot 10^{-29}\right)\right):\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z \cdot 5\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 97.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5 \lor \neg \left(x \leq 1.26 \cdot 10^{-31}\right):\\ \;\;\;\;x \cdot \left(z + y\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot 5 + x \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= x -5.0) (not (<= x 1.26e-31)))
   (* x (+ z y))
   (+ (* z 5.0) (* x y))))
double code(double x, double y, double z) {
	double tmp;
	if ((x <= -5.0) || !(x <= 1.26e-31)) {
		tmp = x * (z + y);
	} else {
		tmp = (z * 5.0) + (x * y);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((x <= (-5.0d0)) .or. (.not. (x <= 1.26d-31))) then
        tmp = x * (z + y)
    else
        tmp = (z * 5.0d0) + (x * y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((x <= -5.0) || !(x <= 1.26e-31)) {
		tmp = x * (z + y);
	} else {
		tmp = (z * 5.0) + (x * y);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (x <= -5.0) or not (x <= 1.26e-31):
		tmp = x * (z + y)
	else:
		tmp = (z * 5.0) + (x * y)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((x <= -5.0) || !(x <= 1.26e-31))
		tmp = Float64(x * Float64(z + y));
	else
		tmp = Float64(Float64(z * 5.0) + Float64(x * y));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((x <= -5.0) || ~((x <= 1.26e-31)))
		tmp = x * (z + y);
	else
		tmp = (z * 5.0) + (x * y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.0], N[Not[LessEqual[x, 1.26e-31]], $MachinePrecision]], N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision], N[(N[(z * 5.0), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \lor \neg \left(x \leq 1.26 \cdot 10^{-31}\right):\\
\;\;\;\;x \cdot \left(z + y\right)\\

\mathbf{else}:\\
\;\;\;\;z \cdot 5 + x \cdot y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5 or 1.2599999999999999e-31 < x

    1. Initial program 100.0%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 96.9%

      \[\leadsto \color{blue}{x \cdot \left(y + z\right)} \]
    4. Step-by-step derivation
      1. +-commutative96.9%

        \[\leadsto x \cdot \color{blue}{\left(z + y\right)} \]
    5. Simplified96.9%

      \[\leadsto \color{blue}{x \cdot \left(z + y\right)} \]

    if -5 < x < 1.2599999999999999e-31

    1. Initial program 99.9%

      \[x \cdot \left(y + z\right) + z \cdot 5 \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 89.4%

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot x + -1 \cdot \frac{5 \cdot z + x \cdot z}{y}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*r*89.4%

        \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot \left(-1 \cdot x + -1 \cdot \frac{5 \cdot z + x \cdot z}{y}\right)} \]
      2. mul-1-neg89.4%

        \[\leadsto \color{blue}{\left(-y\right)} \cdot \left(-1 \cdot x + -1 \cdot \frac{5 \cdot z + x \cdot z}{y}\right) \]
      3. distribute-lft-out89.4%

        \[\leadsto \left(-y\right) \cdot \color{blue}{\left(-1 \cdot \left(x + \frac{5 \cdot z + x \cdot z}{y}\right)\right)} \]
      4. distribute-rgt-in89.4%

        \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \frac{\color{blue}{z \cdot \left(5 + x\right)}}{y}\right)\right) \]
      5. associate-/l*89.2%

        \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \color{blue}{z \cdot \frac{5 + x}{y}}\right)\right) \]
    5. Simplified89.2%

      \[\leadsto \color{blue}{\left(-y\right) \cdot \left(-1 \cdot \left(x + z \cdot \frac{5 + x}{y}\right)\right)} \]
    6. Step-by-step derivation
      1. clear-num89.1%

        \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + z \cdot \color{blue}{\frac{1}{\frac{y}{5 + x}}}\right)\right) \]
      2. un-div-inv89.2%

        \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \color{blue}{\frac{z}{\frac{y}{5 + x}}}\right)\right) \]
    7. Applied egg-rr89.2%

      \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \color{blue}{\frac{z}{\frac{y}{5 + x}}}\right)\right) \]
    8. Taylor expanded in x around 0 88.3%

      \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \frac{z}{\color{blue}{0.2 \cdot y}}\right)\right) \]
    9. Step-by-step derivation
      1. *-commutative88.3%

        \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \frac{z}{\color{blue}{y \cdot 0.2}}\right)\right) \]
    10. Simplified88.3%

      \[\leadsto \left(-y\right) \cdot \left(-1 \cdot \left(x + \frac{z}{\color{blue}{y \cdot 0.2}}\right)\right) \]
    11. Taylor expanded in y around 0 99.1%

      \[\leadsto \color{blue}{5 \cdot z + x \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -5 \lor \neg \left(x \leq 1.26 \cdot 10^{-31}\right):\\ \;\;\;\;x \cdot \left(z + y\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot 5 + x \cdot y\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \left(z + y\right) + z \cdot 5 \end{array} \]
(FPCore (x y z) :precision binary64 (+ (* x (+ z y)) (* z 5.0)))
double code(double x, double y, double z) {
	return (x * (z + y)) + (z * 5.0);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * (z + y)) + (z * 5.0d0)
end function
public static double code(double x, double y, double z) {
	return (x * (z + y)) + (z * 5.0);
}
def code(x, y, z):
	return (x * (z + y)) + (z * 5.0)
function code(x, y, z)
	return Float64(Float64(x * Float64(z + y)) + Float64(z * 5.0))
end
function tmp = code(x, y, z)
	tmp = (x * (z + y)) + (z * 5.0);
end
code[x_, y_, z_] := N[(N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision] + N[(z * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(z + y\right) + z \cdot 5
\end{array}
Derivation
  1. Initial program 99.9%

    \[x \cdot \left(y + z\right) + z \cdot 5 \]
  2. Add Preprocessing
  3. Final simplification99.9%

    \[\leadsto x \cdot \left(z + y\right) + z \cdot 5 \]
  4. Add Preprocessing

Alternative 8: 37.3% accurate, 3.0× speedup?

\[\begin{array}{l} \\ z \cdot 5 \end{array} \]
(FPCore (x y z) :precision binary64 (* z 5.0))
double code(double x, double y, double z) {
	return z * 5.0;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = z * 5.0d0
end function
public static double code(double x, double y, double z) {
	return z * 5.0;
}
def code(x, y, z):
	return z * 5.0
function code(x, y, z)
	return Float64(z * 5.0)
end
function tmp = code(x, y, z)
	tmp = z * 5.0;
end
code[x_, y_, z_] := N[(z * 5.0), $MachinePrecision]
\begin{array}{l}

\\
z \cdot 5
\end{array}
Derivation
  1. Initial program 99.9%

    \[x \cdot \left(y + z\right) + z \cdot 5 \]
  2. Add Preprocessing
  3. Taylor expanded in x around 0 40.4%

    \[\leadsto \color{blue}{5 \cdot z} \]
  4. Final simplification40.4%

    \[\leadsto z \cdot 5 \]
  5. Add Preprocessing

Developer target: 97.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + 5\right) \cdot z + x \cdot y \end{array} \]
(FPCore (x y z) :precision binary64 (+ (* (+ x 5.0) z) (* x y)))
double code(double x, double y, double z) {
	return ((x + 5.0) * z) + (x * y);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((x + 5.0d0) * z) + (x * y)
end function
public static double code(double x, double y, double z) {
	return ((x + 5.0) * z) + (x * y);
}
def code(x, y, z):
	return ((x + 5.0) * z) + (x * y)
function code(x, y, z)
	return Float64(Float64(Float64(x + 5.0) * z) + Float64(x * y))
end
function tmp = code(x, y, z)
	tmp = ((x + 5.0) * z) + (x * y);
end
code[x_, y_, z_] := N[(N[(N[(x + 5.0), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x + 5\right) \cdot z + x \cdot y
\end{array}

Reproduce

?
herbie shell --seed 2024107 
(FPCore (x y z)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, C"
  :precision binary64

  :alt
  (+ (* (+ x 5.0) z) (* x y))

  (+ (* x (+ y z)) (* z 5.0)))