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

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

Specification

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

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

\\
\frac{\left(x + y\right) - z}{t \cdot 2}
\end{array}

Alternative 1: 99.9% accurate, 1.0× speedup?

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

\\
\frac{z - \left(x + y\right)}{t} \cdot -0.5
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
  2. Step-by-step derivation
    1. associate-/r*100.0%

      \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
    2. remove-double-neg100.0%

      \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
    3. distribute-frac-neg2100.0%

      \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
    4. neg-mul-1100.0%

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

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

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

      \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
    8. distribute-neg-frac100.0%

      \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
    9. neg-sub0100.0%

      \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
    10. associate--r-100.0%

      \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
    11. neg-sub0100.0%

      \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
    12. +-commutative100.0%

      \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
    13. sub-neg100.0%

      \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
    14. metadata-eval100.0%

      \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
  3. Simplified100.0%

    \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 47.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+53}:\\ \;\;\;\;0.5 \cdot \frac{x}{t}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-212}:\\ \;\;\;\;-0.5 \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -1.3e+53)
   (* 0.5 (/ x t))
   (if (<= x -2e-212) (* -0.5 (/ z t)) (* 0.5 (/ y t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.3e+53) {
		tmp = 0.5 * (x / t);
	} else if (x <= -2e-212) {
		tmp = -0.5 * (z / t);
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-1.3d+53)) then
        tmp = 0.5d0 * (x / t)
    else if (x <= (-2d-212)) then
        tmp = (-0.5d0) * (z / t)
    else
        tmp = 0.5d0 * (y / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -1.3e+53) {
		tmp = 0.5 * (x / t);
	} else if (x <= -2e-212) {
		tmp = -0.5 * (z / t);
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -1.3e+53:
		tmp = 0.5 * (x / t)
	elif x <= -2e-212:
		tmp = -0.5 * (z / t)
	else:
		tmp = 0.5 * (y / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -1.3e+53)
		tmp = Float64(0.5 * Float64(x / t));
	elseif (x <= -2e-212)
		tmp = Float64(-0.5 * Float64(z / t));
	else
		tmp = Float64(0.5 * Float64(y / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -1.3e+53)
		tmp = 0.5 * (x / t);
	elseif (x <= -2e-212)
		tmp = -0.5 * (z / t);
	else
		tmp = 0.5 * (y / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.3e+53], N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2e-212], N[(-0.5 * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+53}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\

\mathbf{elif}\;x \leq -2 \cdot 10^{-212}:\\
\;\;\;\;-0.5 \cdot \frac{z}{t}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.29999999999999999e53

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 68.8%

      \[\leadsto \color{blue}{0.5 \cdot \frac{x}{t}} \]

    if -1.29999999999999999e53 < x < -1.99999999999999991e-212

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 60.2%

      \[\leadsto \color{blue}{\frac{z}{t}} \cdot -0.5 \]

    if -1.99999999999999991e-212 < x

    1. Initial program 99.2%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 46.0%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification55.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.3 \cdot 10^{+53}:\\ \;\;\;\;0.5 \cdot \frac{x}{t}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-212}:\\ \;\;\;\;-0.5 \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 47.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.3 \cdot 10^{+51}:\\ \;\;\;\;0.5 \cdot \frac{x}{t}\\ \mathbf{elif}\;x \leq -5.2 \cdot 10^{-180}:\\ \;\;\;\;z \cdot \frac{-0.5}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -2.3e+51)
   (* 0.5 (/ x t))
   (if (<= x -5.2e-180) (* z (/ -0.5 t)) (* 0.5 (/ y t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.3e+51) {
		tmp = 0.5 * (x / t);
	} else if (x <= -5.2e-180) {
		tmp = z * (-0.5 / t);
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-2.3d+51)) then
        tmp = 0.5d0 * (x / t)
    else if (x <= (-5.2d-180)) then
        tmp = z * ((-0.5d0) / t)
    else
        tmp = 0.5d0 * (y / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -2.3e+51) {
		tmp = 0.5 * (x / t);
	} else if (x <= -5.2e-180) {
		tmp = z * (-0.5 / t);
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -2.3e+51:
		tmp = 0.5 * (x / t)
	elif x <= -5.2e-180:
		tmp = z * (-0.5 / t)
	else:
		tmp = 0.5 * (y / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -2.3e+51)
		tmp = Float64(0.5 * Float64(x / t));
	elseif (x <= -5.2e-180)
		tmp = Float64(z * Float64(-0.5 / t));
	else
		tmp = Float64(0.5 * Float64(y / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -2.3e+51)
		tmp = 0.5 * (x / t);
	elseif (x <= -5.2e-180)
		tmp = z * (-0.5 / t);
	else
		tmp = 0.5 * (y / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.3e+51], N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-180], N[(z * N[(-0.5 / t), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+51}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\

\mathbf{elif}\;x \leq -5.2 \cdot 10^{-180}:\\
\;\;\;\;z \cdot \frac{-0.5}{t}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -2.30000000000000005e51

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 68.8%

      \[\leadsto \color{blue}{0.5 \cdot \frac{x}{t}} \]

    if -2.30000000000000005e51 < x < -5.1999999999999998e-180

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 58.2%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{z}{t}} \]
    6. Step-by-step derivation
      1. metadata-eval58.2%

        \[\leadsto \color{blue}{\left(-0.5\right)} \cdot \frac{z}{t} \]
      2. distribute-lft-neg-in58.2%

        \[\leadsto \color{blue}{-0.5 \cdot \frac{z}{t}} \]
      3. *-lft-identity58.2%

        \[\leadsto -0.5 \cdot \frac{\color{blue}{1 \cdot z}}{t} \]
      4. associate-*l/58.1%

        \[\leadsto -0.5 \cdot \color{blue}{\left(\frac{1}{t} \cdot z\right)} \]
      5. associate-*l*58.1%

        \[\leadsto -\color{blue}{\left(0.5 \cdot \frac{1}{t}\right) \cdot z} \]
      6. *-commutative58.1%

        \[\leadsto -\color{blue}{z \cdot \left(0.5 \cdot \frac{1}{t}\right)} \]
      7. distribute-rgt-neg-in58.1%

        \[\leadsto \color{blue}{z \cdot \left(-0.5 \cdot \frac{1}{t}\right)} \]
      8. associate-*r/58.1%

        \[\leadsto z \cdot \left(-\color{blue}{\frac{0.5 \cdot 1}{t}}\right) \]
      9. metadata-eval58.1%

        \[\leadsto z \cdot \left(-\frac{\color{blue}{0.5}}{t}\right) \]
      10. distribute-neg-frac58.1%

        \[\leadsto z \cdot \color{blue}{\frac{-0.5}{t}} \]
      11. metadata-eval58.1%

        \[\leadsto z \cdot \frac{\color{blue}{-0.5}}{t} \]
    7. Simplified58.1%

      \[\leadsto \color{blue}{z \cdot \frac{-0.5}{t}} \]

    if -5.1999999999999998e-180 < x

    1. Initial program 99.3%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 46.4%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 4: 70.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + y \leq -2 \cdot 10^{-222}:\\ \;\;\;\;\frac{-0.5 \cdot \left(z - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.5 \cdot \left(z - y\right)}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (+ x y) -2e-222) (/ (* -0.5 (- z x)) t) (/ (* -0.5 (- z y)) t)))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x + y) <= -2e-222) {
		tmp = (-0.5 * (z - x)) / t;
	} else {
		tmp = (-0.5 * (z - y)) / t;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x + y) <= (-2d-222)) then
        tmp = ((-0.5d0) * (z - x)) / t
    else
        tmp = ((-0.5d0) * (z - y)) / t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x + y) <= -2e-222) {
		tmp = (-0.5 * (z - x)) / t;
	} else {
		tmp = (-0.5 * (z - y)) / t;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if (x + y) <= -2e-222:
		tmp = (-0.5 * (z - x)) / t
	else:
		tmp = (-0.5 * (z - y)) / t
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(x + y) <= -2e-222)
		tmp = Float64(Float64(-0.5 * Float64(z - x)) / t);
	else
		tmp = Float64(Float64(-0.5 * Float64(z - y)) / t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x + y) <= -2e-222)
		tmp = (-0.5 * (z - x)) / t;
	else
		tmp = (-0.5 * (z - y)) / t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[N[(x + y), $MachinePrecision], -2e-222], N[(N[(-0.5 * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(N[(-0.5 * N[(z - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x + y \leq -2 \cdot 10^{-222}:\\
\;\;\;\;\frac{-0.5 \cdot \left(z - x\right)}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{-0.5 \cdot \left(z - y\right)}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x y) < -2.0000000000000001e-222

    1. Initial program 99.3%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 70.9%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{z - x}{t}} \]
    6. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(z - x\right)}{t}} \]
    7. Simplified70.9%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(z - x\right)}{t}} \]

    if -2.0000000000000001e-222 < (+.f64 x y)

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 70.9%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{z - y}{t}} \]
    6. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(z - y\right)}{t}} \]
    7. Simplified70.9%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(z - y\right)}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 75.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 2.6 \cdot 10^{+161}:\\ \;\;\;\;\frac{-0.5 \cdot \left(z - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 2.6e+161) (/ (* -0.5 (- z x)) t) (* 0.5 (/ y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 2.6e+161) {
		tmp = (-0.5 * (z - x)) / t;
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 2.6d+161) then
        tmp = ((-0.5d0) * (z - x)) / t
    else
        tmp = 0.5d0 * (y / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 2.6e+161) {
		tmp = (-0.5 * (z - x)) / t;
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 2.6e+161:
		tmp = (-0.5 * (z - x)) / t
	else:
		tmp = 0.5 * (y / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 2.6e+161)
		tmp = Float64(Float64(-0.5 * Float64(z - x)) / t);
	else
		tmp = Float64(0.5 * Float64(y / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 2.6e+161)
		tmp = (-0.5 * (z - x)) / t;
	else
		tmp = 0.5 * (y / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 2.6e+161], N[(N[(-0.5 * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(0.5 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{+161}:\\
\;\;\;\;\frac{-0.5 \cdot \left(z - x\right)}{t}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 2.5999999999999998e161

    1. Initial program 99.6%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 75.7%

      \[\leadsto \color{blue}{-0.5 \cdot \frac{z - x}{t}} \]
    6. Step-by-step derivation
      1. associate-*r/75.7%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(z - x\right)}{t}} \]
    7. Simplified75.7%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot \left(z - x\right)}{t}} \]

    if 2.5999999999999998e161 < y

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 79.3%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 75.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq 4.1 \cdot 10^{+161}:\\ \;\;\;\;\frac{-0.5}{\frac{t}{z - x}}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= y 4.1e+161) (/ -0.5 (/ t (- z x))) (* 0.5 (/ y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 4.1e+161) {
		tmp = -0.5 / (t / (z - x));
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (y <= 4.1d+161) then
        tmp = (-0.5d0) / (t / (z - x))
    else
        tmp = 0.5d0 * (y / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (y <= 4.1e+161) {
		tmp = -0.5 / (t / (z - x));
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if y <= 4.1e+161:
		tmp = -0.5 / (t / (z - x))
	else:
		tmp = 0.5 * (y / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (y <= 4.1e+161)
		tmp = Float64(-0.5 / Float64(t / Float64(z - x)));
	else
		tmp = Float64(0.5 * Float64(y / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (y <= 4.1e+161)
		tmp = -0.5 / (t / (z - x));
	else
		tmp = 0.5 * (y / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[y, 4.1e+161], N[(-0.5 / N[(t / N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.1 \cdot 10^{+161}:\\
\;\;\;\;\frac{-0.5}{\frac{t}{z - x}}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < 4.1000000000000001e161

    1. Initial program 99.6%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

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

        \[\leadsto \color{blue}{-0.5 \cdot \frac{z - \left(x + y\right)}{t}} \]
      2. clear-num99.7%

        \[\leadsto -0.5 \cdot \color{blue}{\frac{1}{\frac{t}{z - \left(x + y\right)}}} \]
      3. un-div-inv99.7%

        \[\leadsto \color{blue}{\frac{-0.5}{\frac{t}{z - \left(x + y\right)}}} \]
    6. Applied egg-rr99.7%

      \[\leadsto \color{blue}{\frac{-0.5}{\frac{t}{z - \left(x + y\right)}}} \]
    7. Taylor expanded in y around 0 75.5%

      \[\leadsto \frac{-0.5}{\color{blue}{\frac{t}{z - x}}} \]

    if 4.1000000000000001e161 < y

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 79.3%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 46.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-25}:\\ \;\;\;\;0.5 \cdot \frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot \frac{y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x -3.7e-25) (* 0.5 (/ x t)) (* 0.5 (/ y t))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.7e-25) {
		tmp = 0.5 * (x / t);
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= (-3.7d-25)) then
        tmp = 0.5d0 * (x / t)
    else
        tmp = 0.5d0 * (y / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= -3.7e-25) {
		tmp = 0.5 * (x / t);
	} else {
		tmp = 0.5 * (y / t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= -3.7e-25:
		tmp = 0.5 * (x / t)
	else:
		tmp = 0.5 * (y / t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= -3.7e-25)
		tmp = Float64(0.5 * Float64(x / t));
	else
		tmp = Float64(0.5 * Float64(y / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= -3.7e-25)
		tmp = 0.5 * (x / t);
	else
		tmp = 0.5 * (y / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.7e-25], N[(0.5 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{-25}:\\
\;\;\;\;0.5 \cdot \frac{x}{t}\\

\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{y}{t}\\


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

    1. Initial program 100.0%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 61.1%

      \[\leadsto \color{blue}{0.5 \cdot \frac{x}{t}} \]

    if -3.70000000000000009e-25 < x

    1. Initial program 99.5%

      \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
    2. Step-by-step derivation
      1. associate-/r*100.0%

        \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
      2. remove-double-neg100.0%

        \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
      3. distribute-frac-neg2100.0%

        \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
      4. neg-mul-1100.0%

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

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

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

        \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
      8. distribute-neg-frac100.0%

        \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
      9. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
      10. associate--r-100.0%

        \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
      11. neg-sub0100.0%

        \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
      12. +-commutative100.0%

        \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
      13. sub-neg100.0%

        \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
      14. metadata-eval100.0%

        \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
    4. Add Preprocessing
    5. Taylor expanded in y around inf 44.0%

      \[\leadsto \color{blue}{0.5 \cdot \frac{y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 37.4% accurate, 1.8× speedup?

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

\\
0.5 \cdot \frac{x}{t}
\end{array}
Derivation
  1. Initial program 99.6%

    \[\frac{\left(x + y\right) - z}{t \cdot 2} \]
  2. Step-by-step derivation
    1. associate-/r*100.0%

      \[\leadsto \color{blue}{\frac{\frac{\left(x + y\right) - z}{t}}{2}} \]
    2. remove-double-neg100.0%

      \[\leadsto \frac{\color{blue}{-\left(-\frac{\left(x + y\right) - z}{t}\right)}}{2} \]
    3. distribute-frac-neg2100.0%

      \[\leadsto \frac{-\color{blue}{\frac{\left(x + y\right) - z}{-t}}}{2} \]
    4. neg-mul-1100.0%

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

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

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

      \[\leadsto \color{blue}{\left(-\frac{\left(x + y\right) - z}{t}\right)} \cdot \frac{-1}{2} \]
    8. distribute-neg-frac100.0%

      \[\leadsto \color{blue}{\frac{-\left(\left(x + y\right) - z\right)}{t}} \cdot \frac{-1}{2} \]
    9. neg-sub0100.0%

      \[\leadsto \frac{\color{blue}{0 - \left(\left(x + y\right) - z\right)}}{t} \cdot \frac{-1}{2} \]
    10. associate--r-100.0%

      \[\leadsto \frac{\color{blue}{\left(0 - \left(x + y\right)\right) + z}}{t} \cdot \frac{-1}{2} \]
    11. neg-sub0100.0%

      \[\leadsto \frac{\color{blue}{\left(-\left(x + y\right)\right)} + z}{t} \cdot \frac{-1}{2} \]
    12. +-commutative100.0%

      \[\leadsto \frac{\color{blue}{z + \left(-\left(x + y\right)\right)}}{t} \cdot \frac{-1}{2} \]
    13. sub-neg100.0%

      \[\leadsto \frac{\color{blue}{z - \left(x + y\right)}}{t} \cdot \frac{-1}{2} \]
    14. metadata-eval100.0%

      \[\leadsto \frac{z - \left(x + y\right)}{t} \cdot \color{blue}{-0.5} \]
  3. Simplified100.0%

    \[\leadsto \color{blue}{\frac{z - \left(x + y\right)}{t} \cdot -0.5} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 36.0%

    \[\leadsto \color{blue}{0.5 \cdot \frac{x}{t}} \]
  6. Add Preprocessing

Reproduce

?
herbie shell --seed 2024163 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, B"
  :precision binary64
  (/ (- (+ x y) z) (* t 2.0)))