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

Percentage Accurate: 92.9% → 97.2%
Time: 9.4s
Alternatives: 10
Speedup: 1.0×

Specification

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

\\
x - \frac{y \cdot \left(z - t\right)}{a}
\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: 92.9% accurate, 1.0× speedup?

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

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

Alternative 1: 97.2% accurate, 1.0× speedup?

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

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

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

      \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
  3. Simplified96.2%

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Add Preprocessing
  5. Taylor expanded in y around 0 92.1%

    \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
  6. Step-by-step derivation
    1. associate-*l/97.0%

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

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
  7. Simplified97.0%

    \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
  8. Final simplification97.0%

    \[\leadsto x + \frac{y}{a} \cdot \left(t - z\right) \]
  9. Add Preprocessing

Alternative 2: 49.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-y\right) \cdot \frac{z}{a}\\ \mathbf{if}\;y \leq -3 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-25}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+175} \lor \neg \left(y \leq 2.7 \cdot 10^{+255}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* (- y) (/ z a))))
   (if (<= y -3e+83)
     t_1
     (if (<= y 2e-25)
       x
       (if (or (<= y 8e+175) (not (<= y 2.7e+255))) t_1 (/ t (/ a y)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = -y * (z / a);
	double tmp;
	if (y <= -3e+83) {
		tmp = t_1;
	} else if (y <= 2e-25) {
		tmp = x;
	} else if ((y <= 8e+175) || !(y <= 2.7e+255)) {
		tmp = t_1;
	} else {
		tmp = t / (a / y);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = -y * (z / a)
    if (y <= (-3d+83)) then
        tmp = t_1
    else if (y <= 2d-25) then
        tmp = x
    else if ((y <= 8d+175) .or. (.not. (y <= 2.7d+255))) then
        tmp = t_1
    else
        tmp = t / (a / y)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = -y * (z / a);
	double tmp;
	if (y <= -3e+83) {
		tmp = t_1;
	} else if (y <= 2e-25) {
		tmp = x;
	} else if ((y <= 8e+175) || !(y <= 2.7e+255)) {
		tmp = t_1;
	} else {
		tmp = t / (a / y);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = -y * (z / a)
	tmp = 0
	if y <= -3e+83:
		tmp = t_1
	elif y <= 2e-25:
		tmp = x
	elif (y <= 8e+175) or not (y <= 2.7e+255):
		tmp = t_1
	else:
		tmp = t / (a / y)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(-y) * Float64(z / a))
	tmp = 0.0
	if (y <= -3e+83)
		tmp = t_1;
	elseif (y <= 2e-25)
		tmp = x;
	elseif ((y <= 8e+175) || !(y <= 2.7e+255))
		tmp = t_1;
	else
		tmp = Float64(t / Float64(a / y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = -y * (z / a);
	tmp = 0.0;
	if (y <= -3e+83)
		tmp = t_1;
	elseif (y <= 2e-25)
		tmp = x;
	elseif ((y <= 8e+175) || ~((y <= 2.7e+255)))
		tmp = t_1;
	else
		tmp = t / (a / y);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+83], t$95$1, If[LessEqual[y, 2e-25], x, If[Or[LessEqual[y, 8e+175], N[Not[LessEqual[y, 2.7e+255]], $MachinePrecision]], t$95$1, N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{z}{a}\\
\mathbf{if}\;y \leq -3 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2 \cdot 10^{-25}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 8 \cdot 10^{+175} \lor \neg \left(y \leq 2.7 \cdot 10^{+255}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3e83 or 2.00000000000000008e-25 < y < 7.9999999999999995e175 or 2.7000000000000001e255 < y

    1. Initial program 84.7%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 46.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg46.1%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. associate-/l*55.8%

        \[\leadsto -\color{blue}{y \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in55.8%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{a}\right)} \]
      4. distribute-neg-frac255.8%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-a}} \]
    7. Simplified55.8%

      \[\leadsto \color{blue}{y \cdot \frac{z}{-a}} \]

    if -3e83 < y < 2.00000000000000008e-25

    1. Initial program 97.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 62.3%

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

    if 7.9999999999999995e175 < y < 2.7000000000000001e255

    1. Initial program 78.4%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 78.4%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative99.9%

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

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Taylor expanded in t around inf 41.8%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/63.1%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified63.1%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Step-by-step derivation
      1. clear-num63.1%

        \[\leadsto t \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. div-inv63.1%

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
    12. Applied egg-rr63.1%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+83}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{-25}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 8 \cdot 10^{+175} \lor \neg \left(y \leq 2.7 \cdot 10^{+255}\right):\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{\frac{a}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 50.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+83}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\

\mathbf{elif}\;y \leq 9 \cdot 10^{-23}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 4.75 \cdot 10^{+204}:\\
\;\;\;\;\frac{z}{\frac{a}{-y}}\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+255}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -8.00000000000000025e83

    1. Initial program 80.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 80.9%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/97.3%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative97.3%

        \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    7. Simplified97.3%

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Step-by-step derivation
      1. clear-num97.1%

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    9. Applied egg-rr97.1%

      \[\leadsto x - \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    10. Taylor expanded in z around inf 40.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg40.5%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. distribute-frac-neg240.5%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-a}} \]
      3. *-commutative40.5%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{-a} \]
      4. associate-/l*52.9%

        \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]
    12. Simplified52.9%

      \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]

    if -8.00000000000000025e83 < y < 8.9999999999999995e-23

    1. Initial program 97.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 62.3%

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

    if 8.9999999999999995e-23 < y < 4.7500000000000001e204

    1. Initial program 85.8%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 85.8%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/99.7%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative99.7%

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

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Taylor expanded in z around inf 40.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    9. Step-by-step derivation
      1. mul-1-neg40.4%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. associate-*r/48.2%

        \[\leadsto -\color{blue}{y \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in48.2%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{a}\right)} \]
      4. distribute-neg-frac48.2%

        \[\leadsto y \cdot \color{blue}{\frac{-z}{a}} \]
    10. Simplified48.2%

      \[\leadsto \color{blue}{y \cdot \frac{-z}{a}} \]
    11. Step-by-step derivation
      1. *-commutative48.2%

        \[\leadsto \color{blue}{\frac{-z}{a} \cdot y} \]
      2. associate-*l/40.4%

        \[\leadsto \color{blue}{\frac{\left(-z\right) \cdot y}{a}} \]
      3. associate-*r/52.2%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \frac{y}{a}} \]
      4. add-sqr-sqrt34.3%

        \[\leadsto \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)} \cdot \frac{y}{a} \]
      5. sqrt-unprod27.5%

        \[\leadsto \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} \cdot \frac{y}{a} \]
      6. sqr-neg27.5%

        \[\leadsto \sqrt{\color{blue}{z \cdot z}} \cdot \frac{y}{a} \]
      7. sqrt-unprod3.2%

        \[\leadsto \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot \frac{y}{a} \]
      8. add-sqr-sqrt3.8%

        \[\leadsto \color{blue}{z} \cdot \frac{y}{a} \]
      9. clear-num3.8%

        \[\leadsto z \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      10. div-inv3.8%

        \[\leadsto \color{blue}{\frac{z}{\frac{a}{y}}} \]
      11. frac-2neg3.8%

        \[\leadsto \color{blue}{\frac{-z}{-\frac{a}{y}}} \]
      12. add-sqr-sqrt0.7%

        \[\leadsto \frac{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}}{-\frac{a}{y}} \]
      13. sqrt-unprod14.3%

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}}{-\frac{a}{y}} \]
      14. sqr-neg14.3%

        \[\leadsto \frac{\sqrt{\color{blue}{z \cdot z}}}{-\frac{a}{y}} \]
      15. sqrt-unprod17.9%

        \[\leadsto \frac{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}{-\frac{a}{y}} \]
      16. add-sqr-sqrt52.2%

        \[\leadsto \frac{\color{blue}{z}}{-\frac{a}{y}} \]
      17. distribute-neg-frac252.2%

        \[\leadsto \frac{z}{\color{blue}{\frac{a}{-y}}} \]
    12. Applied egg-rr52.2%

      \[\leadsto \color{blue}{\frac{z}{\frac{a}{-y}}} \]

    if 4.7500000000000001e204 < y < 1.15e255

    1. Initial program 80.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 80.9%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative99.9%

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

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Taylor expanded in t around inf 47.4%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/78.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified78.7%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]

    if 1.15e255 < y

    1. Initial program 84.4%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 72.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg72.6%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. associate-/l*88.2%

        \[\leadsto -\color{blue}{y \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in88.2%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{a}\right)} \]
      4. distribute-neg-frac288.2%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-a}} \]
    7. Simplified88.2%

      \[\leadsto \color{blue}{y \cdot \frac{z}{-a}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification60.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 4.75 \cdot 10^{+204}:\\ \;\;\;\;\frac{z}{\frac{a}{-y}}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+255}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 50.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := z \cdot \frac{-y}{a}\\ \mathbf{if}\;y \leq -3.1 \cdot 10^{+83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+205}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+257}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* z (/ (- y) a))))
   (if (<= y -3.1e+83)
     t_1
     (if (<= y 2.5e-24)
       x
       (if (<= y 1.15e+205)
         t_1
         (if (<= y 1.55e+257) (* t (/ y a)) (* (- y) (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (-y / a);
	double tmp;
	if (y <= -3.1e+83) {
		tmp = t_1;
	} else if (y <= 2.5e-24) {
		tmp = x;
	} else if (y <= 1.15e+205) {
		tmp = t_1;
	} else if (y <= 1.55e+257) {
		tmp = t * (y / a);
	} else {
		tmp = -y * (z / a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = z * (-y / a)
    if (y <= (-3.1d+83)) then
        tmp = t_1
    else if (y <= 2.5d-24) then
        tmp = x
    else if (y <= 1.15d+205) then
        tmp = t_1
    else if (y <= 1.55d+257) then
        tmp = t * (y / a)
    else
        tmp = -y * (z / a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = z * (-y / a);
	double tmp;
	if (y <= -3.1e+83) {
		tmp = t_1;
	} else if (y <= 2.5e-24) {
		tmp = x;
	} else if (y <= 1.15e+205) {
		tmp = t_1;
	} else if (y <= 1.55e+257) {
		tmp = t * (y / a);
	} else {
		tmp = -y * (z / a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = z * (-y / a)
	tmp = 0
	if y <= -3.1e+83:
		tmp = t_1
	elif y <= 2.5e-24:
		tmp = x
	elif y <= 1.15e+205:
		tmp = t_1
	elif y <= 1.55e+257:
		tmp = t * (y / a)
	else:
		tmp = -y * (z / a)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(z * Float64(Float64(-y) / a))
	tmp = 0.0
	if (y <= -3.1e+83)
		tmp = t_1;
	elseif (y <= 2.5e-24)
		tmp = x;
	elseif (y <= 1.15e+205)
		tmp = t_1;
	elseif (y <= 1.55e+257)
		tmp = Float64(t * Float64(y / a));
	else
		tmp = Float64(Float64(-y) * Float64(z / a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = z * (-y / a);
	tmp = 0.0;
	if (y <= -3.1e+83)
		tmp = t_1;
	elseif (y <= 2.5e-24)
		tmp = x;
	elseif (y <= 1.15e+205)
		tmp = t_1;
	elseif (y <= 1.55e+257)
		tmp = t * (y / a);
	else
		tmp = -y * (z / a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+83], t$95$1, If[LessEqual[y, 2.5e-24], x, If[LessEqual[y, 1.15e+205], t$95$1, If[LessEqual[y, 1.55e+257], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], N[((-y) * N[(z / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := z \cdot \frac{-y}{a}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{-24}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 1.55 \cdot 10^{+257}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.09999999999999992e83 or 2.4999999999999999e-24 < y < 1.15000000000000004e205

    1. Initial program 83.7%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 83.7%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/98.7%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative98.7%

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

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Step-by-step derivation
      1. clear-num98.6%

        \[\leadsto x - \left(z - t\right) \cdot \color{blue}{\frac{1}{\frac{a}{y}}} \]
      2. un-div-inv98.6%

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    9. Applied egg-rr98.6%

      \[\leadsto x - \color{blue}{\frac{z - t}{\frac{a}{y}}} \]
    10. Taylor expanded in z around inf 40.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    11. Step-by-step derivation
      1. mul-1-neg40.4%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. distribute-frac-neg240.4%

        \[\leadsto \color{blue}{\frac{y \cdot z}{-a}} \]
      3. *-commutative40.4%

        \[\leadsto \frac{\color{blue}{z \cdot y}}{-a} \]
      4. associate-/l*52.5%

        \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]
    12. Simplified52.5%

      \[\leadsto \color{blue}{z \cdot \frac{y}{-a}} \]

    if -3.09999999999999992e83 < y < 2.4999999999999999e-24

    1. Initial program 97.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified93.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 62.3%

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

    if 1.15000000000000004e205 < y < 1.55e257

    1. Initial program 80.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 80.9%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/99.9%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative99.9%

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

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Taylor expanded in t around inf 47.4%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/78.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified78.7%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]

    if 1.55e257 < y

    1. Initial program 84.4%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 72.6%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg72.6%

        \[\leadsto \color{blue}{-\frac{y \cdot z}{a}} \]
      2. associate-/l*88.2%

        \[\leadsto -\color{blue}{y \cdot \frac{z}{a}} \]
      3. distribute-rgt-neg-in88.2%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{a}\right)} \]
      4. distribute-neg-frac288.2%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-a}} \]
    7. Simplified88.2%

      \[\leadsto \color{blue}{y \cdot \frac{z}{-a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification60.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+83}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-24}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+205}:\\ \;\;\;\;z \cdot \frac{-y}{a}\\ \mathbf{elif}\;y \leq 1.55 \cdot 10^{+257}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-26} \lor \neg \left(z \leq 1.35 \cdot 10^{+38}\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.6999999999999999e-26 or 1.34999999999999998e38 < z

    1. Initial program 87.8%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 82.7%

      \[\leadsto x - \color{blue}{\frac{y \cdot z}{a}} \]
    6. Step-by-step derivation
      1. *-commutative82.7%

        \[\leadsto x - \frac{\color{blue}{z \cdot y}}{a} \]
      2. associate-/l*89.5%

        \[\leadsto x - \color{blue}{z \cdot \frac{y}{a}} \]
    7. Applied egg-rr89.5%

      \[\leadsto x - \color{blue}{z \cdot \frac{y}{a}} \]

    if -3.6999999999999999e-26 < z < 1.34999999999999998e38

    1. Initial program 95.8%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified97.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 95.8%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/97.2%

        \[\leadsto x - \color{blue}{\frac{y}{a} \cdot \left(z - t\right)} \]
      2. *-commutative97.2%

        \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    7. Simplified97.2%

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Taylor expanded in z around 0 87.1%

      \[\leadsto \color{blue}{x - -1 \cdot \frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. cancel-sign-sub-inv87.1%

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

        \[\leadsto x + \color{blue}{1} \cdot \frac{t \cdot y}{a} \]
      3. *-lft-identity87.1%

        \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
      4. +-commutative87.1%

        \[\leadsto \color{blue}{\frac{t \cdot y}{a} + x} \]
      5. associate-*r/89.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} + x \]
    10. Simplified89.7%

      \[\leadsto \color{blue}{t \cdot \frac{y}{a} + x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-26} \lor \neg \left(z \leq 1.35 \cdot 10^{+38}\right):\\ \;\;\;\;x - z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 77.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+84} \lor \neg \left(y \leq 9.5 \cdot 10^{-23}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3000000000000001e84 or 9.50000000000000058e-23 < y

    1. Initial program 83.3%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 70.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg70.0%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(z - t\right)}{a}} \]
      2. distribute-frac-neg270.0%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{-a}} \]
      3. sub-neg70.0%

        \[\leadsto \frac{y \cdot \color{blue}{\left(z + \left(-t\right)\right)}}{-a} \]
      4. +-commutative70.0%

        \[\leadsto \frac{y \cdot \color{blue}{\left(\left(-t\right) + z\right)}}{-a} \]
      5. neg-sub070.0%

        \[\leadsto \frac{y \cdot \left(\color{blue}{\left(0 - t\right)} + z\right)}{-a} \]
      6. associate--r-70.0%

        \[\leadsto \frac{y \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}}{-a} \]
      7. neg-sub070.0%

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

        \[\leadsto \color{blue}{y \cdot \frac{-\left(t - z\right)}{-a}} \]
      9. distribute-neg-frac83.6%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t - z}{-a}\right)} \]
      10. distribute-neg-frac283.6%

        \[\leadsto y \cdot \color{blue}{\frac{t - z}{-\left(-a\right)}} \]
      11. remove-double-neg83.6%

        \[\leadsto y \cdot \frac{t - z}{\color{blue}{a}} \]
    7. Simplified83.6%

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

    if -1.3000000000000001e84 < y < 9.50000000000000058e-23

    1. Initial program 97.9%

      \[x - \frac{y \cdot \left(z - t\right)}{a} \]
    2. Step-by-step derivation
      1. sub-neg97.9%

        \[\leadsto \color{blue}{x + \left(-\frac{y \cdot \left(z - t\right)}{a}\right)} \]
      2. distribute-frac-neg297.9%

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{-a}} \]
      3. +-commutative97.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{-a} + x} \]
      4. associate-/l*93.8%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{-a}} + x \]
      5. fma-define93.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{-a}, x\right)} \]
      6. distribute-frac-neg293.8%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{-\frac{z - t}{a}}, x\right) \]
      7. distribute-neg-frac93.8%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-\left(z - t\right)}{a}}, x\right) \]
      8. sub-neg93.8%

        \[\leadsto \mathsf{fma}\left(y, \frac{-\color{blue}{\left(z + \left(-t\right)\right)}}{a}, x\right) \]
      9. distribute-neg-in93.8%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{\left(-z\right) + \left(-\left(-t\right)\right)}}{a}, x\right) \]
      10. remove-double-neg93.8%

        \[\leadsto \mathsf{fma}\left(y, \frac{\left(-z\right) + \color{blue}{t}}{a}, x\right) \]
      11. +-commutative93.8%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{t + \left(-z\right)}}{a}, x\right) \]
      12. sub-neg93.8%

        \[\leadsto \mathsf{fma}\left(y, \frac{\color{blue}{t - z}}{a}, x\right) \]
    3. Simplified93.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{t - z}{a}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 81.1%

      \[\leadsto \color{blue}{x + \frac{t \cdot y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+84} \lor \neg \left(y \leq 9.5 \cdot 10^{-23}\right):\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 65.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+52} \lor \neg \left(y \leq 4.1 \cdot 10^{-171}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3e52 or 4.1e-171 < y

    1. Initial program 87.3%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 64.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. mul-1-neg64.9%

        \[\leadsto \color{blue}{-\frac{y \cdot \left(z - t\right)}{a}} \]
      2. distribute-frac-neg264.9%

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{-a}} \]
      3. sub-neg64.9%

        \[\leadsto \frac{y \cdot \color{blue}{\left(z + \left(-t\right)\right)}}{-a} \]
      4. +-commutative64.9%

        \[\leadsto \frac{y \cdot \color{blue}{\left(\left(-t\right) + z\right)}}{-a} \]
      5. neg-sub064.9%

        \[\leadsto \frac{y \cdot \left(\color{blue}{\left(0 - t\right)} + z\right)}{-a} \]
      6. associate--r-64.9%

        \[\leadsto \frac{y \cdot \color{blue}{\left(0 - \left(t - z\right)\right)}}{-a} \]
      7. neg-sub064.9%

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

        \[\leadsto \color{blue}{y \cdot \frac{-\left(t - z\right)}{-a}} \]
      9. distribute-neg-frac75.3%

        \[\leadsto y \cdot \color{blue}{\left(-\frac{t - z}{-a}\right)} \]
      10. distribute-neg-frac275.3%

        \[\leadsto y \cdot \color{blue}{\frac{t - z}{-\left(-a\right)}} \]
      11. remove-double-neg75.3%

        \[\leadsto y \cdot \frac{t - z}{\color{blue}{a}} \]
    7. Simplified75.3%

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

    if -4.3e52 < y < 4.1e-171

    1. Initial program 98.1%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified91.7%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 67.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+52} \lor \neg \left(y \leq 4.1 \cdot 10^{-171}\right):\\ \;\;\;\;y \cdot \frac{t - z}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 51.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-15}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 0.0021:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8000000000000001e-15 or 0.00209999999999999987 < a

    1. Initial program 88.4%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 64.1%

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

    if -6.8000000000000001e-15 < a < 0.00209999999999999987

    1. Initial program 97.9%

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
    3. Simplified90.5%

      \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around 0 97.9%

      \[\leadsto x - \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    6. Step-by-step derivation
      1. associate-*l/97.1%

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

        \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    7. Simplified97.1%

      \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} \]
    8. Taylor expanded in t around inf 46.1%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/49.7%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    10. Simplified49.7%

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

Alternative 9: 93.2% accurate, 1.0× speedup?

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

\\
x + y \cdot \frac{t - z}{a}
\end{array}
Derivation
  1. Initial program 92.1%

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

      \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
  3. Simplified96.2%

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Add Preprocessing
  5. Final simplification96.2%

    \[\leadsto x + y \cdot \frac{t - z}{a} \]
  6. Add Preprocessing

Alternative 10: 39.7% accurate, 9.0× speedup?

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

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

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

      \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{a}} \]
  3. Simplified96.2%

    \[\leadsto \color{blue}{x - y \cdot \frac{z - t}{a}} \]
  4. Add Preprocessing
  5. Taylor expanded in x around inf 44.7%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 99.3% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a}{z - t}\\ \mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\ \;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\ \mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\ \;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{t\_1}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ a (- z t))))
   (if (< y -1.0761266216389975e-10)
     (- x (/ 1.0 (/ t_1 y)))
     (if (< y 2.894426862792089e-49)
       (- x (/ (* y (- z t)) a))
       (- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = a / (z - t);
	double tmp;
	if (y < -1.0761266216389975e-10) {
		tmp = x - (1.0 / (t_1 / y));
	} else if (y < 2.894426862792089e-49) {
		tmp = x - ((y * (z - t)) / a);
	} else {
		tmp = x - (y / t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = a / (z - t)
    if (y < (-1.0761266216389975d-10)) then
        tmp = x - (1.0d0 / (t_1 / y))
    else if (y < 2.894426862792089d-49) then
        tmp = x - ((y * (z - t)) / a)
    else
        tmp = x - (y / t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = a / (z - t);
	double tmp;
	if (y < -1.0761266216389975e-10) {
		tmp = x - (1.0 / (t_1 / y));
	} else if (y < 2.894426862792089e-49) {
		tmp = x - ((y * (z - t)) / a);
	} else {
		tmp = x - (y / t_1);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = a / (z - t)
	tmp = 0
	if y < -1.0761266216389975e-10:
		tmp = x - (1.0 / (t_1 / y))
	elif y < 2.894426862792089e-49:
		tmp = x - ((y * (z - t)) / a)
	else:
		tmp = x - (y / t_1)
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(a / Float64(z - t))
	tmp = 0.0
	if (y < -1.0761266216389975e-10)
		tmp = Float64(x - Float64(1.0 / Float64(t_1 / y)));
	elseif (y < 2.894426862792089e-49)
		tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a));
	else
		tmp = Float64(x - Float64(y / t_1));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = a / (z - t);
	tmp = 0.0;
	if (y < -1.0761266216389975e-10)
		tmp = x - (1.0 / (t_1 / y));
	elseif (y < 2.894426862792089e-49)
		tmp = x - ((y * (z - t)) / a);
	else
		tmp = x - (y / t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024091 
(FPCore (x y z t a)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
  :precision binary64

  :alt
  (if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))

  (- x (/ (* y (- z t)) a)))