Optimisation.CirclePacking:place from circle-packing-0.1.0.4, G

Percentage Accurate: 100.0% → 100.0%
Time: 5.1s
Alternatives: 10
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left(x + y\right) \cdot \left(z + 1\right) \end{array} \]
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
double code(double x, double y, double z) {
	return (x + y) * (z + 1.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 + 1.0d0)
end function
public static double code(double x, double y, double z) {
	return (x + y) * (z + 1.0);
}
def code(x, y, z):
	return (x + y) * (z + 1.0)
function code(x, y, z)
	return Float64(Float64(x + y) * Float64(z + 1.0))
end
function tmp = code(x, y, z)
	tmp = (x + y) * (z + 1.0);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\left(x + y\right) \cdot \left(z + 1\right)
\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 10 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: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + y\right) \cdot \left(z + 1\right) \end{array} \]
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
double code(double x, double y, double z) {
	return (x + y) * (z + 1.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 + 1.0d0)
end function
public static double code(double x, double y, double z) {
	return (x + y) * (z + 1.0);
}
def code(x, y, z):
	return (x + y) * (z + 1.0)
function code(x, y, z)
	return Float64(Float64(x + y) * Float64(z + 1.0))
end
function tmp = code(x, y, z)
	tmp = (x + y) * (z + 1.0);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 100.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \left(x + y\right) + z \cdot \left(x + y\right) \end{array} \]
(FPCore (x y z) :precision binary64 (+ (+ x y) (* z (+ x y))))
double code(double x, double y, double z) {
	return (x + y) + (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 + y) + (z * (x + y))
end function
public static double code(double x, double y, double z) {
	return (x + y) + (z * (x + y));
}
def code(x, y, z):
	return (x + y) + (z * (x + y))
function code(x, y, z)
	return Float64(Float64(x + y) + Float64(z * Float64(x + y)))
end
function tmp = code(x, y, z)
	tmp = (x + y) + (z * (x + y));
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

      \[\leadsto \left(x + y\right) \cdot \color{blue}{\left(1 + z\right)} \]
    2. distribute-lft-in100.0%

      \[\leadsto \color{blue}{\left(x + y\right) \cdot 1 + \left(x + y\right) \cdot z} \]
    3. *-rgt-identity100.0%

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

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

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

Alternative 2: 50.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-140}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-195}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-172}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 2550:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 10^{+226} \lor \neg \left(z \leq 1.1 \cdot 10^{+272}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1.0)
   (* y z)
   (if (<= z -9e-140)
     y
     (if (<= z -1.35e-195)
       x
       (if (<= z 1.75e-172)
         y
         (if (<= z 2550.0)
           x
           (if (or (<= z 1e+226) (not (<= z 1.1e+272))) (* y z) (* x z))))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.0) {
		tmp = y * z;
	} else if (z <= -9e-140) {
		tmp = y;
	} else if (z <= -1.35e-195) {
		tmp = x;
	} else if (z <= 1.75e-172) {
		tmp = y;
	} else if (z <= 2550.0) {
		tmp = x;
	} else if ((z <= 1e+226) || !(z <= 1.1e+272)) {
		tmp = y * z;
	} else {
		tmp = x * z;
	}
	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 (z <= (-1.0d0)) then
        tmp = y * z
    else if (z <= (-9d-140)) then
        tmp = y
    else if (z <= (-1.35d-195)) then
        tmp = x
    else if (z <= 1.75d-172) then
        tmp = y
    else if (z <= 2550.0d0) then
        tmp = x
    else if ((z <= 1d+226) .or. (.not. (z <= 1.1d+272))) then
        tmp = y * z
    else
        tmp = x * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.0) {
		tmp = y * z;
	} else if (z <= -9e-140) {
		tmp = y;
	} else if (z <= -1.35e-195) {
		tmp = x;
	} else if (z <= 1.75e-172) {
		tmp = y;
	} else if (z <= 2550.0) {
		tmp = x;
	} else if ((z <= 1e+226) || !(z <= 1.1e+272)) {
		tmp = y * z;
	} else {
		tmp = x * z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1.0:
		tmp = y * z
	elif z <= -9e-140:
		tmp = y
	elif z <= -1.35e-195:
		tmp = x
	elif z <= 1.75e-172:
		tmp = y
	elif z <= 2550.0:
		tmp = x
	elif (z <= 1e+226) or not (z <= 1.1e+272):
		tmp = y * z
	else:
		tmp = x * z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1.0)
		tmp = Float64(y * z);
	elseif (z <= -9e-140)
		tmp = y;
	elseif (z <= -1.35e-195)
		tmp = x;
	elseif (z <= 1.75e-172)
		tmp = y;
	elseif (z <= 2550.0)
		tmp = x;
	elseif ((z <= 1e+226) || !(z <= 1.1e+272))
		tmp = Float64(y * z);
	else
		tmp = Float64(x * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1.0)
		tmp = y * z;
	elseif (z <= -9e-140)
		tmp = y;
	elseif (z <= -1.35e-195)
		tmp = x;
	elseif (z <= 1.75e-172)
		tmp = y;
	elseif (z <= 2550.0)
		tmp = x;
	elseif ((z <= 1e+226) || ~((z <= 1.1e+272)))
		tmp = y * z;
	else
		tmp = x * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1.0], N[(y * z), $MachinePrecision], If[LessEqual[z, -9e-140], y, If[LessEqual[z, -1.35e-195], x, If[LessEqual[z, 1.75e-172], y, If[LessEqual[z, 2550.0], x, If[Or[LessEqual[z, 1e+226], N[Not[LessEqual[z, 1.1e+272]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(x * z), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;z \leq -9 \cdot 10^{-140}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-195}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-172}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 10^{+226} \lor \neg \left(z \leq 1.1 \cdot 10^{+272}\right):\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1 or 2550 < z < 9.99999999999999961e225 or 1.10000000000000004e272 < z

    1. Initial program 100.0%

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

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

        \[\leadsto y \cdot \color{blue}{\left(z + 1\right)} \]
      2. distribute-lft-in48.9%

        \[\leadsto \color{blue}{y \cdot z + y \cdot 1} \]
      3. *-rgt-identity48.9%

        \[\leadsto y \cdot z + \color{blue}{y} \]
    5. Applied egg-rr48.9%

      \[\leadsto \color{blue}{y \cdot z + y} \]
    6. Taylor expanded in z around inf 48.0%

      \[\leadsto \color{blue}{y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative48.0%

        \[\leadsto \color{blue}{z \cdot y} \]
    8. Simplified48.0%

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

    if -1 < z < -9.00000000000000008e-140 or -1.35e-195 < z < 1.75000000000000014e-172

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(1 + z\right)} \]
    4. Taylor expanded in z around 0 53.3%

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

    if -9.00000000000000008e-140 < z < -1.35e-195 or 1.75000000000000014e-172 < z < 2550

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} \]
    4. Taylor expanded in z around 0 50.2%

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

    if 9.99999999999999961e225 < z < 1.10000000000000004e272

    1. Initial program 100.0%

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

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

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
      2. distribute-lft-in13.0%

        \[\leadsto \color{blue}{x \cdot z + x \cdot 1} \]
      3. *-rgt-identity13.0%

        \[\leadsto x \cdot z + \color{blue}{x} \]
    5. Applied egg-rr13.0%

      \[\leadsto \color{blue}{x \cdot z + x} \]
    6. Taylor expanded in z around inf 13.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-140}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.35 \cdot 10^{-195}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-172}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 2550:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 10^{+226} \lor \neg \left(z \leq 1.1 \cdot 10^{+272}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.8% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-140}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{-196}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-173}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1.0)
   (* x z)
   (if (<= z -7.6e-140)
     y
     (if (<= z -1.06e-196)
       x
       (if (<= z 4.7e-173) y (if (<= z 1.0) x (* x z)))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.0) {
		tmp = x * z;
	} else if (z <= -7.6e-140) {
		tmp = y;
	} else if (z <= -1.06e-196) {
		tmp = x;
	} else if (z <= 4.7e-173) {
		tmp = y;
	} else if (z <= 1.0) {
		tmp = x;
	} else {
		tmp = x * z;
	}
	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 (z <= (-1.0d0)) then
        tmp = x * z
    else if (z <= (-7.6d-140)) then
        tmp = y
    else if (z <= (-1.06d-196)) then
        tmp = x
    else if (z <= 4.7d-173) then
        tmp = y
    else if (z <= 1.0d0) then
        tmp = x
    else
        tmp = x * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.0) {
		tmp = x * z;
	} else if (z <= -7.6e-140) {
		tmp = y;
	} else if (z <= -1.06e-196) {
		tmp = x;
	} else if (z <= 4.7e-173) {
		tmp = y;
	} else if (z <= 1.0) {
		tmp = x;
	} else {
		tmp = x * z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1.0:
		tmp = x * z
	elif z <= -7.6e-140:
		tmp = y
	elif z <= -1.06e-196:
		tmp = x
	elif z <= 4.7e-173:
		tmp = y
	elif z <= 1.0:
		tmp = x
	else:
		tmp = x * z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1.0)
		tmp = Float64(x * z);
	elseif (z <= -7.6e-140)
		tmp = y;
	elseif (z <= -1.06e-196)
		tmp = x;
	elseif (z <= 4.7e-173)
		tmp = y;
	elseif (z <= 1.0)
		tmp = x;
	else
		tmp = Float64(x * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1.0)
		tmp = x * z;
	elseif (z <= -7.6e-140)
		tmp = y;
	elseif (z <= -1.06e-196)
		tmp = x;
	elseif (z <= 4.7e-173)
		tmp = y;
	elseif (z <= 1.0)
		tmp = x;
	else
		tmp = x * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1.0], N[(x * z), $MachinePrecision], If[LessEqual[z, -7.6e-140], y, If[LessEqual[z, -1.06e-196], x, If[LessEqual[z, 4.7e-173], y, If[LessEqual[z, 1.0], x, N[(x * z), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;x \cdot z\\

\mathbf{elif}\;z \leq -7.6 \cdot 10^{-140}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq -1.06 \cdot 10^{-196}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.7 \cdot 10^{-173}:\\
\;\;\;\;y\\

\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1 or 1 < z

    1. Initial program 100.0%

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

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

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
      2. distribute-lft-in52.4%

        \[\leadsto \color{blue}{x \cdot z + x \cdot 1} \]
      3. *-rgt-identity52.4%

        \[\leadsto x \cdot z + \color{blue}{x} \]
    5. Applied egg-rr52.4%

      \[\leadsto \color{blue}{x \cdot z + x} \]
    6. Taylor expanded in z around inf 51.3%

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

    if -1 < z < -7.59999999999999997e-140 or -1.05999999999999994e-196 < z < 4.7e-173

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(1 + z\right)} \]
    4. Taylor expanded in z around 0 53.3%

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

    if -7.59999999999999997e-140 < z < -1.05999999999999994e-196 or 4.7e-173 < z < 1

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} \]
    4. Taylor expanded in z around 0 51.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;x \cdot z\\ \mathbf{elif}\;z \leq -7.6 \cdot 10^{-140}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq -1.06 \cdot 10^{-196}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq 4.7 \cdot 10^{-173}:\\ \;\;\;\;y\\ \mathbf{elif}\;z \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 75.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 2550:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+223} \lor \neg \left(z \leq 1.2 \cdot 10^{+274}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1.0)
   (* y z)
   (if (<= z 2550.0)
     (+ x y)
     (if (or (<= z 5.5e+223) (not (<= z 1.2e+274))) (* y z) (* x z)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.0) {
		tmp = y * z;
	} else if (z <= 2550.0) {
		tmp = x + y;
	} else if ((z <= 5.5e+223) || !(z <= 1.2e+274)) {
		tmp = y * z;
	} else {
		tmp = x * z;
	}
	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 (z <= (-1.0d0)) then
        tmp = y * z
    else if (z <= 2550.0d0) then
        tmp = x + y
    else if ((z <= 5.5d+223) .or. (.not. (z <= 1.2d+274))) then
        tmp = y * z
    else
        tmp = x * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.0) {
		tmp = y * z;
	} else if (z <= 2550.0) {
		tmp = x + y;
	} else if ((z <= 5.5e+223) || !(z <= 1.2e+274)) {
		tmp = y * z;
	} else {
		tmp = x * z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1.0:
		tmp = y * z
	elif z <= 2550.0:
		tmp = x + y
	elif (z <= 5.5e+223) or not (z <= 1.2e+274):
		tmp = y * z
	else:
		tmp = x * z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1.0)
		tmp = Float64(y * z);
	elseif (z <= 2550.0)
		tmp = Float64(x + y);
	elseif ((z <= 5.5e+223) || !(z <= 1.2e+274))
		tmp = Float64(y * z);
	else
		tmp = Float64(x * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1.0)
		tmp = y * z;
	elseif (z <= 2550.0)
		tmp = x + y;
	elseif ((z <= 5.5e+223) || ~((z <= 1.2e+274)))
		tmp = y * z;
	else
		tmp = x * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1.0], N[(y * z), $MachinePrecision], If[LessEqual[z, 2550.0], N[(x + y), $MachinePrecision], If[Or[LessEqual[z, 5.5e+223], N[Not[LessEqual[z, 1.2e+274]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(x * z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;z \leq 2550:\\
\;\;\;\;x + y\\

\mathbf{elif}\;z \leq 5.5 \cdot 10^{+223} \lor \neg \left(z \leq 1.2 \cdot 10^{+274}\right):\\
\;\;\;\;y \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1 or 2550 < z < 5.4999999999999999e223 or 1.2e274 < z

    1. Initial program 100.0%

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

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

        \[\leadsto y \cdot \color{blue}{\left(z + 1\right)} \]
      2. distribute-lft-in48.9%

        \[\leadsto \color{blue}{y \cdot z + y \cdot 1} \]
      3. *-rgt-identity48.9%

        \[\leadsto y \cdot z + \color{blue}{y} \]
    5. Applied egg-rr48.9%

      \[\leadsto \color{blue}{y \cdot z + y} \]
    6. Taylor expanded in z around inf 48.0%

      \[\leadsto \color{blue}{y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative48.0%

        \[\leadsto \color{blue}{z \cdot y} \]
    8. Simplified48.0%

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

    if -1 < z < 2550

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative96.9%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified96.9%

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

    if 5.4999999999999999e223 < z < 1.2e274

    1. Initial program 100.0%

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

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

        \[\leadsto x \cdot \color{blue}{\left(z + 1\right)} \]
      2. distribute-lft-in13.0%

        \[\leadsto \color{blue}{x \cdot z + x \cdot 1} \]
      3. *-rgt-identity13.0%

        \[\leadsto x \cdot z + \color{blue}{x} \]
    5. Applied egg-rr13.0%

      \[\leadsto \color{blue}{x \cdot z + x} \]
    6. Taylor expanded in z around inf 13.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq 2550:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+223} \lor \neg \left(z \leq 1.2 \cdot 10^{+274}\right):\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 57.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 7.5 \cdot 10^{-204}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 7.1 \cdot 10^{+75} \lor \neg \left(y \leq 2.65 \cdot 10^{+126}\right):\\ \;\;\;\;y \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= y 7.5e-204)
   (* x (+ z 1.0))
   (if (or (<= y 7.1e+75) (not (<= y 2.65e+126))) (* y (+ z 1.0)) (+ x y))))
double code(double x, double y, double z) {
	double tmp;
	if (y <= 7.5e-204) {
		tmp = x * (z + 1.0);
	} else if ((y <= 7.1e+75) || !(y <= 2.65e+126)) {
		tmp = y * (z + 1.0);
	} else {
		tmp = 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 (y <= 7.5d-204) then
        tmp = x * (z + 1.0d0)
    else if ((y <= 7.1d+75) .or. (.not. (y <= 2.65d+126))) then
        tmp = y * (z + 1.0d0)
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (y <= 7.5e-204) {
		tmp = x * (z + 1.0);
	} else if ((y <= 7.1e+75) || !(y <= 2.65e+126)) {
		tmp = y * (z + 1.0);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if y <= 7.5e-204:
		tmp = x * (z + 1.0)
	elif (y <= 7.1e+75) or not (y <= 2.65e+126):
		tmp = y * (z + 1.0)
	else:
		tmp = x + y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (y <= 7.5e-204)
		tmp = Float64(x * Float64(z + 1.0));
	elseif ((y <= 7.1e+75) || !(y <= 2.65e+126))
		tmp = Float64(y * Float64(z + 1.0));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (y <= 7.5e-204)
		tmp = x * (z + 1.0);
	elseif ((y <= 7.1e+75) || ~((y <= 2.65e+126)))
		tmp = y * (z + 1.0);
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[y, 7.5e-204], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 7.1e+75], N[Not[LessEqual[y, 2.65e+126]], $MachinePrecision]], N[(y * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{-204}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\

\mathbf{elif}\;y \leq 7.1 \cdot 10^{+75} \lor \neg \left(y \leq 2.65 \cdot 10^{+126}\right):\\
\;\;\;\;y \cdot \left(z + 1\right)\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < 7.5000000000000003e-204

    1. Initial program 100.0%

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

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

    if 7.5000000000000003e-204 < y < 7.09999999999999982e75 or 2.65000000000000014e126 < y

    1. Initial program 100.0%

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

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

    if 7.09999999999999982e75 < y < 2.65000000000000014e126

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative83.4%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.4%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq 7.5 \cdot 10^{-204}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;y \leq 7.1 \cdot 10^{+75} \lor \neg \left(y \leq 2.65 \cdot 10^{+126}\right):\\ \;\;\;\;y \cdot \left(z + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 75.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+27}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;z \leq 2700:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -1.3e+27)
   (* y z)
   (if (<= z -4.8e-12) (* x (+ z 1.0)) (if (<= z 2700.0) (+ x y) (* y z)))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.3e+27) {
		tmp = y * z;
	} else if (z <= -4.8e-12) {
		tmp = x * (z + 1.0);
	} else if (z <= 2700.0) {
		tmp = x + y;
	} else {
		tmp = y * z;
	}
	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 (z <= (-1.3d+27)) then
        tmp = y * z
    else if (z <= (-4.8d-12)) then
        tmp = x * (z + 1.0d0)
    else if (z <= 2700.0d0) then
        tmp = x + y
    else
        tmp = y * z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -1.3e+27) {
		tmp = y * z;
	} else if (z <= -4.8e-12) {
		tmp = x * (z + 1.0);
	} else if (z <= 2700.0) {
		tmp = x + y;
	} else {
		tmp = y * z;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -1.3e+27:
		tmp = y * z
	elif z <= -4.8e-12:
		tmp = x * (z + 1.0)
	elif z <= 2700.0:
		tmp = x + y
	else:
		tmp = y * z
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -1.3e+27)
		tmp = Float64(y * z);
	elseif (z <= -4.8e-12)
		tmp = Float64(x * Float64(z + 1.0));
	elseif (z <= 2700.0)
		tmp = Float64(x + y);
	else
		tmp = Float64(y * z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -1.3e+27)
		tmp = y * z;
	elseif (z <= -4.8e-12)
		tmp = x * (z + 1.0);
	elseif (z <= 2700.0)
		tmp = x + y;
	else
		tmp = y * z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -1.3e+27], N[(y * z), $MachinePrecision], If[LessEqual[z, -4.8e-12], N[(x * N[(z + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2700.0], N[(x + y), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+27}:\\
\;\;\;\;y \cdot z\\

\mathbf{elif}\;z \leq -4.8 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(z + 1\right)\\

\mathbf{elif}\;z \leq 2700:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.30000000000000004e27 or 2700 < z

    1. Initial program 100.0%

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

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

        \[\leadsto y \cdot \color{blue}{\left(z + 1\right)} \]
      2. distribute-lft-in49.7%

        \[\leadsto \color{blue}{y \cdot z + y \cdot 1} \]
      3. *-rgt-identity49.7%

        \[\leadsto y \cdot z + \color{blue}{y} \]
    5. Applied egg-rr49.7%

      \[\leadsto \color{blue}{y \cdot z + y} \]
    6. Taylor expanded in z around inf 49.2%

      \[\leadsto \color{blue}{y \cdot z} \]
    7. Step-by-step derivation
      1. *-commutative49.2%

        \[\leadsto \color{blue}{z \cdot y} \]
    8. Simplified49.2%

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

    if -1.30000000000000004e27 < z < -4.79999999999999974e-12

    1. Initial program 100.0%

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

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

    if -4.79999999999999974e-12 < z < 2700

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative97.9%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified97.9%

      \[\leadsto \color{blue}{y + x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+27}:\\ \;\;\;\;y \cdot z\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-12}:\\ \;\;\;\;x \cdot \left(z + 1\right)\\ \mathbf{elif}\;z \leq 2700:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 97.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\ \;\;\;\;z \cdot \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (or (<= z -1.0) (not (<= z 1.0))) (* z (+ x y)) (+ x y)))
double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1.0) || !(z <= 1.0)) {
		tmp = z * (x + y);
	} else {
		tmp = 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 ((z <= (-1.0d0)) .or. (.not. (z <= 1.0d0))) then
        tmp = z * (x + y)
    else
        tmp = x + y
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if ((z <= -1.0) || !(z <= 1.0)) {
		tmp = z * (x + y);
	} else {
		tmp = x + y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (z <= -1.0) or not (z <= 1.0):
		tmp = z * (x + y)
	else:
		tmp = x + y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if ((z <= -1.0) || !(z <= 1.0))
		tmp = Float64(z * Float64(x + y));
	else
		tmp = Float64(x + y);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((z <= -1.0) || ~((z <= 1.0)))
		tmp = z * (x + y);
	else
		tmp = x + y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;z \cdot \left(x + y\right)\\

\mathbf{else}:\\
\;\;\;\;x + y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1 or 1 < z

    1. Initial program 100.0%

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

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

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

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

    if -1 < z < 1

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative97.6%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified97.6%

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

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

Alternative 8: 100.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + y\right) \cdot \left(z + 1\right) \end{array} \]
(FPCore (x y z) :precision binary64 (* (+ x y) (+ z 1.0)))
double code(double x, double y, double z) {
	return (x + y) * (z + 1.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 + 1.0d0)
end function
public static double code(double x, double y, double z) {
	return (x + y) * (z + 1.0);
}
def code(x, y, z):
	return (x + y) * (z + 1.0)
function code(x, y, z)
	return Float64(Float64(x + y) * Float64(z + 1.0))
end
function tmp = code(x, y, z)
	tmp = (x + y) * (z + 1.0);
end
code[x_, y_, z_] := N[(N[(x + y), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

    \[\left(x + y\right) \cdot \left(z + 1\right) \]
  2. Add Preprocessing
  3. Final simplification100.0%

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

Alternative 9: 32.2% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.04 \cdot 10^{-57}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
(FPCore (x y z) :precision binary64 (if (<= x -1.04e-57) x y))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -1.04e-57) {
		tmp = x;
	} else {
		tmp = 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 <= (-1.04d-57)) then
        tmp = x
    else
        tmp = y
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (x <= -1.04e-57) {
		tmp = x;
	} else {
		tmp = y;
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if x <= -1.04e-57:
		tmp = x
	else:
		tmp = y
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (x <= -1.04e-57)
		tmp = x;
	else
		tmp = y;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (x <= -1.04e-57)
		tmp = x;
	else
		tmp = y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[x, -1.04e-57], x, y]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.04 \cdot 10^{-57}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.04000000000000003e-57

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} \]
    4. Taylor expanded in z around 0 37.9%

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

    if -1.04000000000000003e-57 < x

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{y \cdot \left(1 + z\right)} \]
    4. Taylor expanded in z around 0 29.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.04 \cdot 10^{-57}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 26.2% accurate, 7.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 100.0%

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

    \[\leadsto \color{blue}{x \cdot \left(1 + z\right)} \]
  4. Taylor expanded in z around 0 25.0%

    \[\leadsto \color{blue}{x} \]
  5. Final simplification25.0%

    \[\leadsto x \]
  6. Add Preprocessing

Reproduce

?
herbie shell --seed 2024036 
(FPCore (x y z)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, G"
  :precision binary64
  (* (+ x y) (+ z 1.0)))