Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 67.8% → 90.8%
Time: 17.1s
Alternatives: 22
Speedup: 0.7×

Specification

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

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

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

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

Alternative 1: 90.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{z - a}\\ t_2 := \frac{z}{a - z} + 1\\ \mathbf{if}\;x \leq -1 \cdot 10^{-26} \lor \neg \left(x \leq 5.5 \cdot 10^{-72}\right):\\ \;\;\;\;x \cdot \left(t\_2 + \left(t\_1 - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(\frac{y - z}{a - z} + \frac{x \cdot \left(t\_2 + t\_1\right)}{t}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ y (- z a))) (t_2 (+ (/ z (- a z)) 1.0)))
   (if (or (<= x -1e-26) (not (<= x 5.5e-72)))
     (* x (+ t_2 (- t_1 (* (/ t x) (/ (- y z) (- z a))))))
     (* t (+ (/ (- y z) (- a z)) (/ (* x (+ t_2 t_1)) t))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y / (z - a);
	double t_2 = (z / (a - z)) + 1.0;
	double tmp;
	if ((x <= -1e-26) || !(x <= 5.5e-72)) {
		tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))));
	} else {
		tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t));
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = y / (z - a)
    t_2 = (z / (a - z)) + 1.0d0
    if ((x <= (-1d-26)) .or. (.not. (x <= 5.5d-72))) then
        tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))))
    else
        tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t))
    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 t_2 = (z / (a - z)) + 1.0;
	double tmp;
	if ((x <= -1e-26) || !(x <= 5.5e-72)) {
		tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))));
	} else {
		tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y / (z - a)
	t_2 = (z / (a - z)) + 1.0
	tmp = 0
	if (x <= -1e-26) or not (x <= 5.5e-72):
		tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))))
	else:
		tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y / Float64(z - a))
	t_2 = Float64(Float64(z / Float64(a - z)) + 1.0)
	tmp = 0.0
	if ((x <= -1e-26) || !(x <= 5.5e-72))
		tmp = Float64(x * Float64(t_2 + Float64(t_1 - Float64(Float64(t / x) * Float64(Float64(y - z) / Float64(z - a))))));
	else
		tmp = Float64(t * Float64(Float64(Float64(y - z) / Float64(a - z)) + Float64(Float64(x * Float64(t_2 + t_1)) / t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y / (z - a);
	t_2 = (z / (a - z)) + 1.0;
	tmp = 0.0;
	if ((x <= -1e-26) || ~((x <= 5.5e-72)))
		tmp = x * (t_2 + (t_1 - ((t / x) * ((y - z) / (z - a)))));
	else
		tmp = t * (((y - z) / (a - z)) + ((x * (t_2 + t_1)) / t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[Or[LessEqual[x, -1e-26], N[Not[LessEqual[x, 5.5e-72]], $MachinePrecision]], N[(x * N[(t$95$2 + N[(t$95$1 - N[(N[(t / x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + N[(N[(x * N[(t$95$2 + t$95$1), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y}{z - a}\\
t_2 := \frac{z}{a - z} + 1\\
\mathbf{if}\;x \leq -1 \cdot 10^{-26} \lor \neg \left(x \leq 5.5 \cdot 10^{-72}\right):\\
\;\;\;\;x \cdot \left(t\_2 + \left(t\_1 - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{y - z}{a - z} + \frac{x \cdot \left(t\_2 + t\_1\right)}{t}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1e-26 or 5.49999999999999994e-72 < x

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in66.8%

        \[\leadsto \color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right)} \]
      4. +-commutative66.8%

        \[\leadsto \left(\color{blue}{\left(\frac{y}{a - z} + -1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)} - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      5. mul-1-neg66.8%

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg66.8%

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

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

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

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

    if -1e-26 < x < 5.49999999999999994e-72

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in67.4%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg67.4%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(t \cdot \left(-1 \cdot \frac{y - z}{a - z} + \frac{x \cdot \left(\frac{y}{a - z} - \left(1 + \frac{z}{a - z}\right)\right)}{t}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification89.0%

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

Alternative 2: 90.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + x \cdot \frac{\left(y + \frac{a \cdot t}{x}\right) - \left(a + t \cdot \frac{y}{x}\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-241)
       t_2
       (if (<= t_2 0.0)
         (+ t (* x (/ (- (+ y (/ (* a t) x)) (+ a (* t (/ y x)))) z)))
         (if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z));
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z));
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / ((a - z) / (t - x)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-241:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z))
	elif t_2 <= 2e+275:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(x * Float64(Float64(Float64(y + Float64(Float64(a * t) / x)) - Float64(a + Float64(t * Float64(y / x)))) / z)));
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / ((a - z) / (t - x)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + (x * (((y + ((a * t) / x)) - (a + (t * (y / x)))) / z));
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-241], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(x * N[(N[(N[(y + N[(N[(a * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(a + N[(t * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + x \cdot \frac{\left(y + \frac{a \cdot t}{x}\right) - \left(a + t \cdot \frac{y}{x}\right)}{z}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 42.6%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275

    1. Initial program 94.5%

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

    if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in50.4%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg50.4%

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

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

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

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

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

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

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

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

Alternative 3: 90.6% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{-1}{z}\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-241)
       t_2
       (if (<= t_2 0.0)
         (+ t (* (- t x) (* (- y a) (/ -1.0 z))))
         (if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + ((t - x) * ((y - a) * (-1.0 / z)));
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + ((t - x) * ((y - a) * (-1.0 / z)));
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / ((a - z) / (t - x)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-241:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + ((t - x) * ((y - a) * (-1.0 / z)))
	elif t_2 <= 2e+275:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(t - x) * Float64(Float64(y - a) * Float64(-1.0 / z))));
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / ((a - z) / (t - x)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + ((t - x) * ((y - a) * (-1.0 / z)));
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-241], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(t - x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{-1}{z}\right)\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 42.6%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275

    1. Initial program 94.5%

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

    if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg98.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub98.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg98.8%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg98.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--98.8%

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

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

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

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

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

      \[\leadsto t - \color{blue}{\left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{1}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -\infty:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -2 \cdot 10^{-241}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0:\\ \;\;\;\;t + \left(t - x\right) \cdot \left(\left(y - a\right) \cdot \frac{-1}{z}\right)\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 90.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (- y z) (/ (- a z) (- t x)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-241)
       t_2
       (if (<= t_2 0.0)
         (+ t (/ (* (- t x) (- a y)) z))
         (if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) / ((a - z) / (t - x)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) / ((a - z) / (t - x)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-241:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + (((t - x) * (a - y)) / z)
	elif t_2 <= 2e+275:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) / ((a - z) / (t - x)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + (((t - x) * (a - y)) / z);
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-241], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{y - z}{\frac{a - z}{t - x}}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 42.6%

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275

    1. Initial program 94.5%

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

    if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg98.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub98.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg98.8%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg98.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--98.8%

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -\infty:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -2 \cdot 10^{-241}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 90.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z)))))
        (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -2e-241)
       t_2
       (if (<= t_2 0.0)
         (+ t (/ (* (- t x) (- a y)) z))
         (if (<= t_2 2e+275) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -2e-241) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = t + (((t - x) * (a - y)) / z);
	} else if (t_2 <= 2e+275) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	t_2 = x + (((y - z) * (t - x)) / (a - z))
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -2e-241:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = t + (((t - x) * (a - y)) / z)
	elif t_2 <= 2e+275:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z));
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((y - z) * ((t - x) / (a - z)));
	t_2 = x + (((y - z) * (t - x)) / (a - z));
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -2e-241)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = t + (((t - x) * (a - y)) / z);
	elseif (t_2 <= 2e+275)
		tmp = t_2;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-241], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+275], t$95$2, t$95$1]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-241}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 1.99999999999999992e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 42.6%

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1.9999999999999999e-241 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.99999999999999992e275

    1. Initial program 94.5%

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

    if -1.9999999999999999e-241 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg98.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub98.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg98.8%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg98.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--98.8%

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

      \[\leadsto \color{blue}{t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -\infty:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq -2 \cdot 10^{-241}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 0:\\ \;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\ \mathbf{elif}\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 87.9% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x \cdot \left(\left(\frac{z}{a - z} + 1\right) + \left(\frac{y}{z - a} - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\ \mathbf{if}\;x \leq -1.25 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{-278}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-72}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1
         (*
          x
          (+
           (+ (/ z (- a z)) 1.0)
           (- (/ y (- z a)) (* (/ t x) (/ (- y z) (- z a))))))))
   (if (<= x -1.25e-59)
     t_1
     (if (<= x -4.1e-278)
       (+ x (* (- y z) (/ (- t x) (- a z))))
       (if (<= x 7.8e-72) (+ x (* t (/ (- y z) (- a z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))));
	double tmp;
	if (x <= -1.25e-59) {
		tmp = t_1;
	} else if (x <= -4.1e-278) {
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	} else if (x <= 7.8e-72) {
		tmp = x + (t * ((y - z) / (a - z)));
	} else {
		tmp = 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 = x * (((z / (a - z)) + 1.0d0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))))
    if (x <= (-1.25d-59)) then
        tmp = t_1
    else if (x <= (-4.1d-278)) then
        tmp = x + ((y - z) * ((t - x) / (a - z)))
    else if (x <= 7.8d-72) then
        tmp = x + (t * ((y - z) / (a - z)))
    else
        tmp = 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 = x * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))));
	double tmp;
	if (x <= -1.25e-59) {
		tmp = t_1;
	} else if (x <= -4.1e-278) {
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	} else if (x <= 7.8e-72) {
		tmp = x + (t * ((y - z) / (a - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))))
	tmp = 0
	if x <= -1.25e-59:
		tmp = t_1
	elif x <= -4.1e-278:
		tmp = x + ((y - z) * ((t - x) / (a - z)))
	elif x <= 7.8e-72:
		tmp = x + (t * ((y - z) / (a - z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x * Float64(Float64(Float64(z / Float64(a - z)) + 1.0) + Float64(Float64(y / Float64(z - a)) - Float64(Float64(t / x) * Float64(Float64(y - z) / Float64(z - a))))))
	tmp = 0.0
	if (x <= -1.25e-59)
		tmp = t_1;
	elseif (x <= -4.1e-278)
		tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))));
	elseif (x <= 7.8e-72)
		tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x * (((z / (a - z)) + 1.0) + ((y / (z - a)) - ((t / x) * ((y - z) / (z - a)))));
	tmp = 0.0;
	if (x <= -1.25e-59)
		tmp = t_1;
	elseif (x <= -4.1e-278)
		tmp = x + ((y - z) * ((t - x) / (a - z)));
	elseif (x <= 7.8e-72)
		tmp = x + (t * ((y - z) / (a - z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] - N[(N[(t / x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.25e-59], t$95$1, If[LessEqual[x, -4.1e-278], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-72], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;x \leq -4.1 \cdot 10^{-278}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

\mathbf{elif}\;x \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.25e-59 or 7.8e-72 < x

    1. Initial program 58.5%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in67.7%

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

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

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

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

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

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

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

    if -1.25e-59 < x < -4.10000000000000001e-278

    1. Initial program 73.8%

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

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

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

    if -4.10000000000000001e-278 < x < 7.8e-72

    1. Initial program 83.5%

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

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{y - z}{a - z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification88.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.25 \cdot 10^{-59}:\\ \;\;\;\;x \cdot \left(\left(\frac{z}{a - z} + 1\right) + \left(\frac{y}{z - a} - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\ \mathbf{elif}\;x \leq -4.1 \cdot 10^{-278}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x \leq 7.8 \cdot 10^{-72}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\left(\frac{z}{a - z} + 1\right) + \left(\frac{y}{z - a} - \frac{t}{x} \cdot \frac{y - z}{z - a}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 83.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{-182} \lor \neg \left(a \leq 1.25 \cdot 10^{-164}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.79999999999999974e-182 or 1.2499999999999999e-164 < a

    1. Initial program 69.8%

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

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

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

    if -5.79999999999999974e-182 < a < 1.2499999999999999e-164

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--77.9%

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

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

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

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

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification81.7%

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

Alternative 8: 76.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-44} \lor \neg \left(a \leq 3.3 \cdot 10^{-50}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.40000000000000016e-44 or 3.2999999999999998e-50 < a

    1. Initial program 72.4%

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

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

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

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

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

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

    if -3.40000000000000016e-44 < a < 3.2999999999999998e-50

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub69.4%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg69.4%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg69.4%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--69.4%

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

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

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

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    10. Simplified73.6%

      \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification75.9%

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

Alternative 9: 69.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+50} \lor \neg \left(z \leq 1.15 \cdot 10^{+83}\right):\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -9.2e+50) (not (<= z 1.15e+83)))
   (+ t (* y (/ (- x t) z)))
   (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -9.2e+50) || !(z <= 1.15e+83)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + ((t - x) * (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 <= (-9.2d+50)) .or. (.not. (z <= 1.15d+83))) then
        tmp = t + (y * ((x - t) / z))
    else
        tmp = x + ((t - x) * (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 <= -9.2e+50) || !(z <= 1.15e+83)) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + ((t - x) * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -9.2e+50) or not (z <= 1.15e+83):
		tmp = t + (y * ((x - t) / z))
	else:
		tmp = x + ((t - x) * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -9.2e+50) || !(z <= 1.15e+83))
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	else
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -9.2e+50) || ~((z <= 1.15e+83)))
		tmp = t + (y * ((x - t) / z));
	else
		tmp = x + ((t - x) * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.2e+50], N[Not[LessEqual[z, 1.15e+83]], $MachinePrecision]], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+50} \lor \neg \left(z \leq 1.15 \cdot 10^{+83}\right):\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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


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

    1. Initial program 39.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg56.8%

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \frac{\color{blue}{-a \cdot \left(t - x\right)}}{z}\right) \]
      5. div-sub56.8%

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg56.8%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg56.8%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--56.8%

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

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

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

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    10. Simplified65.7%

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

    if -9.19999999999999987e50 < z < 1.14999999999999997e83

    1. Initial program 83.3%

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    7. Taylor expanded in z around 0 67.2%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
    8. Step-by-step derivation
      1. *-commutative67.2%

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

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

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

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

      \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.6%

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

Alternative 10: 59.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-44} \lor \neg \left(a \leq 1.15 \cdot 10^{-44}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.05000000000000001e-44 or 1.14999999999999999e-44 < a

    1. Initial program 72.4%

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

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

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

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

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

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

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

    if -1.05000000000000001e-44 < a < 1.14999999999999999e-44

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in63.7%

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

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

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} - \color{blue}{\frac{t}{x} \cdot \frac{y - z}{a - z}}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      8. +-commutative82.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{z} - -1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot z}\right) \]
      3. distribute-lft-out--47.1%

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

        \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{y - z}{x \cdot z}}\right)\right) \]
    10. Simplified50.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    12. Step-by-step derivation
      1. mul-1-neg36.3%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
    13. Simplified53.3%

      \[\leadsto \color{blue}{-t \cdot \frac{y - z}{z}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.3%

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

Alternative 11: 67.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{-28}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-46}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -6.8e-28)
   (+ x (* z (/ t (- z a))))
   (if (<= a 5.5e-46) (+ t (* y (/ (- x t) z))) (+ x (* t (/ (- y z) a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -6.8e-28) {
		tmp = x + (z * (t / (z - a)));
	} else if (a <= 5.5e-46) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + (t * ((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 (a <= (-6.8d-28)) then
        tmp = x + (z * (t / (z - a)))
    else if (a <= 5.5d-46) then
        tmp = t + (y * ((x - t) / z))
    else
        tmp = x + (t * ((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 (a <= -6.8e-28) {
		tmp = x + (z * (t / (z - a)));
	} else if (a <= 5.5e-46) {
		tmp = t + (y * ((x - t) / z));
	} else {
		tmp = x + (t * ((y - z) / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -6.8e-28:
		tmp = x + (z * (t / (z - a)))
	elif a <= 5.5e-46:
		tmp = t + (y * ((x - t) / z))
	else:
		tmp = x + (t * ((y - z) / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -6.8e-28)
		tmp = Float64(x + Float64(z * Float64(t / Float64(z - a))));
	elseif (a <= 5.5e-46)
		tmp = Float64(t + Float64(y * Float64(Float64(x - t) / z)));
	else
		tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -6.8e-28)
		tmp = x + (z * (t / (z - a)));
	elseif (a <= 5.5e-46)
		tmp = t + (y * ((x - t) / z));
	else
		tmp = x + (t * ((y - z) / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e-28], N[(x + N[(z * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e-46], N[(t + N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-28}:\\
\;\;\;\;x + z \cdot \frac{t}{z - a}\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{-46}:\\
\;\;\;\;t + y \cdot \frac{x - t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.8000000000000001e-28

    1. Initial program 75.8%

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

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

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

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

      \[\leadsto x + \color{blue}{\left(-1 \cdot z\right)} \cdot \frac{t}{a - z} \]
    7. Step-by-step derivation
      1. neg-mul-165.7%

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

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

    if -6.8000000000000001e-28 < a < 5.49999999999999983e-46

    1. Initial program 56.5%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define72.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--69.3%

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

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

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

        \[\leadsto t - \color{blue}{y \cdot \frac{t - x}{z}} \]
    10. Simplified73.4%

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

    if 5.49999999999999983e-46 < a

    1. Initial program 69.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{-28}:\\ \;\;\;\;x + z \cdot \frac{t}{z - a}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{-46}:\\ \;\;\;\;t + y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y - z}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 62.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+81}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+83}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.9e+81)
   (- t (/ (* x a) z))
   (if (<= z 2.1e+83) (+ x (* (- t x) (/ y a))) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e+81) {
		tmp = t - ((x * a) / z);
	} else if (z <= 2.1e+83) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t * ((z - y) / z);
	}
	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 <= (-2.9d+81)) then
        tmp = t - ((x * a) / z)
    else if (z <= 2.1d+83) then
        tmp = x + ((t - x) * (y / a))
    else
        tmp = t * ((z - y) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.9e+81) {
		tmp = t - ((x * a) / z);
	} else if (z <= 2.1e+83) {
		tmp = x + ((t - x) * (y / a));
	} else {
		tmp = t * ((z - y) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.9e+81:
		tmp = t - ((x * a) / z)
	elif z <= 2.1e+83:
		tmp = x + ((t - x) * (y / a))
	else:
		tmp = t * ((z - y) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.9e+81)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	elseif (z <= 2.1e+83)
		tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a)));
	else
		tmp = Float64(t * Float64(Float64(z - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2.9e+81)
		tmp = t - ((x * a) / z);
	elseif (z <= 2.1e+83)
		tmp = x + ((t - x) * (y / a));
	else
		tmp = t * ((z - y) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.9e+81], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+83], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{+81}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{+83}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\


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

    1. Initial program 39.1%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define64.5%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg54.0%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg54.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--54.0%

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative44.3%

        \[\leadsto t - \frac{\color{blue}{x \cdot a}}{z} \]
    13. Simplified44.3%

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

    if -2.9e81 < z < 2.10000000000000002e83

    1. Initial program 80.9%

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

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

      \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num84.2%

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t - x}}} \]
    7. Taylor expanded in z around 0 65.4%

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
    8. Step-by-step derivation
      1. *-commutative65.4%

        \[\leadsto x + \frac{\color{blue}{\left(t - x\right) \cdot y}}{a} \]
      2. *-lft-identity65.4%

        \[\leadsto x + \frac{\left(t - x\right) \cdot y}{\color{blue}{1 \cdot a}} \]
      3. times-frac70.6%

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

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

      \[\leadsto x + \color{blue}{\left(t - x\right) \cdot \frac{y}{a}} \]

    if 2.10000000000000002e83 < z

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in44.4%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg44.4%

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

        \[\leadsto \left(\left(\frac{y}{a - z} - \color{blue}{\frac{t}{x} \cdot \frac{y - z}{a - z}}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      8. +-commutative71.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{z} - -1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot z}\right) \]
      3. distribute-lft-out--32.9%

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

        \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{y - z}{x \cdot z}}\right)\right) \]
    10. Simplified38.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    12. Step-by-step derivation
      1. mul-1-neg33.3%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
    13. Simplified61.8%

      \[\leadsto \color{blue}{-t \cdot \frac{y - z}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+81}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+83}:\\ \;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+83}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.2e+81)
   (- t (/ (* x a) z))
   (if (<= z 1.35e+83) (+ x (* y (/ (- t x) a))) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e+81) {
		tmp = t - ((x * a) / z);
	} else if (z <= 1.35e+83) {
		tmp = x + (y * ((t - x) / a));
	} else {
		tmp = t * ((z - y) / z);
	}
	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.2d+81)) then
        tmp = t - ((x * a) / z)
    else if (z <= 1.35d+83) then
        tmp = x + (y * ((t - x) / a))
    else
        tmp = t * ((z - y) / z)
    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.2e+81) {
		tmp = t - ((x * a) / z);
	} else if (z <= 1.35e+83) {
		tmp = x + (y * ((t - x) / a));
	} else {
		tmp = t * ((z - y) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.2e+81:
		tmp = t - ((x * a) / z)
	elif z <= 1.35e+83:
		tmp = x + (y * ((t - x) / a))
	else:
		tmp = t * ((z - y) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.2e+81)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	elseif (z <= 1.35e+83)
		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a)));
	else
		tmp = Float64(t * Float64(Float64(z - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.2e+81)
		tmp = t - ((x * a) / z);
	elseif (z <= 1.35e+83)
		tmp = x + (y * ((t - x) / a));
	else
		tmp = t * ((z - y) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+81], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e+83], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{+83}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\


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

    1. Initial program 39.1%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define64.5%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg54.0%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg54.0%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--54.0%

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative44.3%

        \[\leadsto t - \frac{\color{blue}{x \cdot a}}{z} \]
    13. Simplified44.3%

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

    if -3.2e81 < z < 1.35000000000000003e83

    1. Initial program 80.9%

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t - x}{a}} \]
    7. Simplified66.9%

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

    if 1.35000000000000003e83 < z

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in44.4%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg44.4%

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

        \[\leadsto \left(\left(\frac{y}{a - z} - \color{blue}{\frac{t}{x} \cdot \frac{y - z}{a - z}}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      8. +-commutative71.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{z} - -1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot z}\right) \]
      3. distribute-lft-out--32.9%

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

        \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{y - z}{x \cdot z}}\right)\right) \]
    10. Simplified38.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    12. Step-by-step derivation
      1. mul-1-neg33.3%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
    13. Simplified61.8%

      \[\leadsto \color{blue}{-t \cdot \frac{y - z}{z}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{+83}:\\ \;\;\;\;x + y \cdot \frac{t - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 59.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+90}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+83}:\\ \;\;\;\;x + \frac{y}{a - z} \cdot t\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3e+90)
   (- t (/ (* x a) z))
   (if (<= z 1.75e+83) (+ x (* (/ y (- a z)) t)) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3e+90) {
		tmp = t - ((x * a) / z);
	} else if (z <= 1.75e+83) {
		tmp = x + ((y / (a - z)) * t);
	} else {
		tmp = t * ((z - y) / z);
	}
	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 <= (-3d+90)) then
        tmp = t - ((x * a) / z)
    else if (z <= 1.75d+83) then
        tmp = x + ((y / (a - z)) * t)
    else
        tmp = t * ((z - y) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3e+90) {
		tmp = t - ((x * a) / z);
	} else if (z <= 1.75e+83) {
		tmp = x + ((y / (a - z)) * t);
	} else {
		tmp = t * ((z - y) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3e+90:
		tmp = t - ((x * a) / z)
	elif z <= 1.75e+83:
		tmp = x + ((y / (a - z)) * t)
	else:
		tmp = t * ((z - y) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3e+90)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	elseif (z <= 1.75e+83)
		tmp = Float64(x + Float64(Float64(y / Float64(a - z)) * t));
	else
		tmp = Float64(t * Float64(Float64(z - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3e+90)
		tmp = t - ((x * a) / z);
	elseif (z <= 1.75e+83)
		tmp = x + ((y / (a - z)) * t);
	else
		tmp = t * ((z - y) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e+90], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+83], N[(x + N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+90}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{elif}\;z \leq 1.75 \cdot 10^{+83}:\\
\;\;\;\;x + \frac{y}{a - z} \cdot t\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\


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

    1. Initial program 38.7%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define65.1%

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg52.1%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg52.1%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--52.1%

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

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

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

        \[\leadsto t - \frac{\left(t - x\right) \cdot \color{blue}{\left(-a\right)}}{z} \]
    10. Simplified39.8%

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative46.0%

        \[\leadsto t - \frac{\color{blue}{x \cdot a}}{z} \]
    13. Simplified46.0%

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

    if -2.99999999999999979e90 < z < 1.74999999999999989e83

    1. Initial program 80.5%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. associate-/l*61.0%

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

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

    if 1.74999999999999989e83 < z

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in44.4%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg44.4%

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

        \[\leadsto \left(\left(\frac{y}{a - z} - \color{blue}{\frac{t}{x} \cdot \frac{y - z}{a - z}}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      8. +-commutative71.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{z} - -1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot z}\right) \]
      3. distribute-lft-out--32.9%

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

        \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{y - z}{x \cdot z}}\right)\right) \]
    10. Simplified38.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    12. Step-by-step derivation
      1. mul-1-neg33.3%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
    13. Simplified61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{+90}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{+83}:\\ \;\;\;\;x + \frac{y}{a - z} \cdot t\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 54.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-57} \lor \neg \left(z \leq 4 \cdot 10^{+77}\right):\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3500000000000001e-57 or 3.99999999999999993e77 < z

    1. Initial program 42.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \left(\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right)}{z} - \color{blue}{\frac{-1 \cdot \left(a \cdot \left(t - x\right)\right)}{z}}\right) \]
      4. mul-1-neg55.6%

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg55.5%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg55.5%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--55.6%

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

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

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

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

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative45.8%

        \[\leadsto t - \frac{\color{blue}{x \cdot a}}{z} \]
    13. Simplified45.8%

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

    if -1.3500000000000001e-57 < z < 3.99999999999999993e77

    1. Initial program 90.0%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*62.9%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified62.9%

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

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

Alternative 16: 54.4% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+83}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.35e-57)
   (- t (/ (* x a) z))
   (if (<= z 1.6e+83) (+ x (* t (/ y a))) (* t (/ (- z y) z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.35e-57) {
		tmp = t - ((x * a) / z);
	} else if (z <= 1.6e+83) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t * ((z - y) / z);
	}
	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 <= (-1.35d-57)) then
        tmp = t - ((x * a) / z)
    else if (z <= 1.6d+83) then
        tmp = x + (t * (y / a))
    else
        tmp = t * ((z - y) / z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.35e-57) {
		tmp = t - ((x * a) / z);
	} else if (z <= 1.6e+83) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t * ((z - y) / z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.35e-57:
		tmp = t - ((x * a) / z)
	elif z <= 1.6e+83:
		tmp = x + (t * (y / a))
	else:
		tmp = t * ((z - y) / z)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.35e-57)
		tmp = Float64(t - Float64(Float64(x * a) / z));
	elseif (z <= 1.6e+83)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = Float64(t * Float64(Float64(z - y) / z));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.35e-57)
		tmp = t - ((x * a) / z);
	elseif (z <= 1.6e+83)
		tmp = x + (t * (y / a));
	else
		tmp = t * ((z - y) / z);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-57], N[(t - N[(N[(x * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+83], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\
\;\;\;\;t - \frac{x \cdot a}{z}\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+83}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\


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

    1. Initial program 44.7%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define67.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--52.4%

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

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

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

        \[\leadsto t - \frac{\left(t - x\right) \cdot \color{blue}{\left(-a\right)}}{z} \]
    10. Simplified36.6%

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

      \[\leadsto t - \frac{\color{blue}{a \cdot x}}{z} \]
    12. Step-by-step derivation
      1. *-commutative41.2%

        \[\leadsto t - \frac{\color{blue}{x \cdot a}}{z} \]
    13. Simplified41.2%

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

    if -1.3500000000000001e-57 < z < 1.5999999999999999e83

    1. Initial program 89.4%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*62.7%

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

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

    if 1.5999999999999999e83 < z

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in44.4%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg44.4%

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

        \[\leadsto \left(\left(\frac{y}{a - z} - \color{blue}{\frac{t}{x} \cdot \frac{y - z}{a - z}}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      8. +-commutative71.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(-x\right)} \cdot \left(-1 \cdot \frac{y}{z} - -1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot z}\right) \]
      3. distribute-lft-out--32.9%

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

        \[\leadsto \left(-x\right) \cdot \left(-1 \cdot \left(\frac{y}{z} - \color{blue}{t \cdot \frac{y - z}{x \cdot z}}\right)\right) \]
    10. Simplified38.4%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot \left(y - z\right)}{z}} \]
    12. Step-by-step derivation
      1. mul-1-neg33.3%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y - z}{z}} \]
    13. Simplified61.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-57}:\\ \;\;\;\;t - \frac{x \cdot a}{z}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+83}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z - y}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 54.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 2.35 \cdot 10^{+83}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.2e+81) t (if (<= z 2.35e+83) (+ x (* t (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e+81) {
		tmp = t;
	} else if (z <= 2.35e+83) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	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.2d+81)) then
        tmp = t
    else if (z <= 2.35d+83) then
        tmp = x + (t * (y / a))
    else
        tmp = t
    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.2e+81) {
		tmp = t;
	} else if (z <= 2.35e+83) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.2e+81:
		tmp = t
	elif z <= 2.35e+83:
		tmp = x + (t * (y / a))
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.2e+81)
		tmp = t;
	elseif (z <= 2.35e+83)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.2e+81)
		tmp = t;
	elseif (z <= 2.35e+83)
		tmp = x + (t * (y / a));
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+81], t, If[LessEqual[z, 2.35e+83], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+81}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 2.35 \cdot 10^{+83}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\

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


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

    1. Initial program 38.0%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define65.6%

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in49.0%

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

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

        \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      6. unsub-neg49.0%

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

        \[\leadsto \left(\left(\frac{y}{a - z} - \color{blue}{\frac{t}{x} \cdot \frac{y - z}{a - z}}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
      8. +-commutative73.4%

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

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

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

    if -3.2e81 < z < 2.3499999999999999e83

    1. Initial program 80.9%

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{t \cdot y}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*55.9%

        \[\leadsto x + \color{blue}{t \cdot \frac{y}{a}} \]
    8. Simplified55.9%

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

Alternative 18: 39.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{-39}:\\ \;\;\;\;t + a \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.5e+99) x (if (<= a 6.2e-39) (+ t (* a (/ t z))) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+99) {
		tmp = x;
	} else if (a <= 6.2e-39) {
		tmp = t + (a * (t / z));
	} 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 <= (-2.5d+99)) then
        tmp = x
    else if (a <= 6.2d-39) then
        tmp = t + (a * (t / z))
    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 <= -2.5e+99) {
		tmp = x;
	} else if (a <= 6.2e-39) {
		tmp = t + (a * (t / z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.5e+99:
		tmp = x
	elif a <= 6.2e-39:
		tmp = t + (a * (t / z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.5e+99)
		tmp = x;
	elseif (a <= 6.2e-39)
		tmp = Float64(t + Float64(a * Float64(t / z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.5e+99)
		tmp = x;
	elseif (a <= 6.2e-39)
		tmp = t + (a * (t / z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+99], x, If[LessEqual[a, 6.2e-39], N[(t + N[(a * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{-39}:\\
\;\;\;\;t + a \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.50000000000000004e99 or 6.1999999999999994e-39 < a

    1. Initial program 71.0%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define86.6%

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

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

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

    if -2.50000000000000004e99 < a < 6.1999999999999994e-39

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg63.6%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg63.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--63.6%

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

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

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

        \[\leadsto t - \frac{\left(t - x\right) \cdot \color{blue}{\left(-a\right)}}{z} \]
    10. Simplified38.4%

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

      \[\leadsto \color{blue}{t - -1 \cdot \frac{a \cdot t}{z}} \]
    12. Step-by-step derivation
      1. sub-neg34.1%

        \[\leadsto \color{blue}{t + \left(--1 \cdot \frac{a \cdot t}{z}\right)} \]
      2. mul-1-neg34.1%

        \[\leadsto t + \left(-\color{blue}{\left(-\frac{a \cdot t}{z}\right)}\right) \]
      3. remove-double-neg34.1%

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

        \[\leadsto t + \color{blue}{a \cdot \frac{t}{z}} \]
    13. Simplified37.9%

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

Alternative 19: 38.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+86}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-58}:\\ \;\;\;\;x \cdot \frac{y - a}{z}\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.5e+86)
   t
   (if (<= z -7.2e-58) (* x (/ (- y a) z)) (if (<= z 1.85e+83) x t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.5e+86) {
		tmp = t;
	} else if (z <= -7.2e-58) {
		tmp = x * ((y - a) / z);
	} else if (z <= 1.85e+83) {
		tmp = x;
	} else {
		tmp = t;
	}
	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 <= (-6.5d+86)) then
        tmp = t
    else if (z <= (-7.2d-58)) then
        tmp = x * ((y - a) / z)
    else if (z <= 1.85d+83) then
        tmp = x
    else
        tmp = t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.5e+86) {
		tmp = t;
	} else if (z <= -7.2e-58) {
		tmp = x * ((y - a) / z);
	} else if (z <= 1.85e+83) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -6.5e+86:
		tmp = t
	elif z <= -7.2e-58:
		tmp = x * ((y - a) / z)
	elif z <= 1.85e+83:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.5e+86)
		tmp = t;
	elseif (z <= -7.2e-58)
		tmp = Float64(x * Float64(Float64(y - a) / z));
	elseif (z <= 1.85e+83)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -6.5e+86)
		tmp = t;
	elseif (z <= -7.2e-58)
		tmp = x * ((y - a) / z);
	elseif (z <= 1.85e+83)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+86], t, If[LessEqual[z, -7.2e-58], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+83], x, t]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+86}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+83}:\\
\;\;\;\;x\\

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


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

    1. Initial program 37.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999996e86 < z < -7.20000000000000019e-58

    1. Initial program 53.2%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define71.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--51.5%

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

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

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

        \[\leadsto \color{blue}{x \cdot \frac{y - a}{z}} \]
    10. Simplified36.6%

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

    if -7.20000000000000019e-58 < z < 1.8500000000000001e83

    1. Initial program 89.3%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define93.8%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 20: 38.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.4 \cdot 10^{-40}:\\ \;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= a -2.5e+99) x (if (<= a 6.4e-40) (* t (+ 1.0 (/ a z))) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (a <= -2.5e+99) {
		tmp = x;
	} else if (a <= 6.4e-40) {
		tmp = t * (1.0 + (a / z));
	} 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 <= (-2.5d+99)) then
        tmp = x
    else if (a <= 6.4d-40) then
        tmp = t * (1.0d0 + (a / z))
    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 <= -2.5e+99) {
		tmp = x;
	} else if (a <= 6.4e-40) {
		tmp = t * (1.0 + (a / z));
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if a <= -2.5e+99:
		tmp = x
	elif a <= 6.4e-40:
		tmp = t * (1.0 + (a / z))
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (a <= -2.5e+99)
		tmp = x;
	elseif (a <= 6.4e-40)
		tmp = Float64(t * Float64(1.0 + Float64(a / z)));
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (a <= -2.5e+99)
		tmp = x;
	elseif (a <= 6.4e-40)
		tmp = t * (1.0 + (a / z));
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e+99], x, If[LessEqual[a, 6.4e-40], N[(t * N[(1.0 + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+99}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.4 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \left(1 + \frac{a}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.50000000000000004e99 or 6.40000000000000004e-40 < a

    1. Initial program 71.0%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define86.6%

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

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

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

    if -2.50000000000000004e99 < a < 6.40000000000000004e-40

    1. Initial program 60.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t + \color{blue}{\frac{-1 \cdot \left(y \cdot \left(t - x\right)\right) - \left(-a \cdot \left(t - x\right)\right)}{z}} \]
      6. mul-1-neg63.6%

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

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

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

        \[\leadsto t + \color{blue}{\left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)} \]
      10. unsub-neg63.6%

        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
      11. distribute-rgt-out--63.6%

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

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

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

        \[\leadsto t - \frac{\left(t - x\right) \cdot \color{blue}{\left(-a\right)}}{z} \]
    10. Simplified38.4%

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

      \[\leadsto \color{blue}{t \cdot \left(1 - -1 \cdot \frac{a}{z}\right)} \]
    12. Step-by-step derivation
      1. sub-neg34.7%

        \[\leadsto t \cdot \color{blue}{\left(1 + \left(--1 \cdot \frac{a}{z}\right)\right)} \]
      2. neg-mul-134.7%

        \[\leadsto t \cdot \left(1 + \left(-\color{blue}{\left(-\frac{a}{z}\right)}\right)\right) \]
      3. remove-double-neg34.7%

        \[\leadsto t \cdot \left(1 + \color{blue}{\frac{a}{z}}\right) \]
    13. Simplified34.7%

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

Alternative 21: 38.5% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-57}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{+83}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.4e-57) t (if (<= z 1.8e+83) x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.4e-57) {
		tmp = t;
	} else if (z <= 1.8e+83) {
		tmp = x;
	} else {
		tmp = t;
	}
	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.4d-57)) then
        tmp = t
    else if (z <= 1.8d+83) then
        tmp = x
    else
        tmp = t
    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.4e-57) {
		tmp = t;
	} else if (z <= 1.8e+83) {
		tmp = x;
	} else {
		tmp = t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.4e-57:
		tmp = t
	elif z <= 1.8e+83:
		tmp = x
	else:
		tmp = t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.4e-57)
		tmp = t;
	elseif (z <= 1.8e+83)
		tmp = x;
	else
		tmp = t;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.4e-57)
		tmp = t;
	elseif (z <= 1.8e+83)
		tmp = x;
	else
		tmp = t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.4e-57], t, If[LessEqual[z, 1.8e+83], x, t]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-57}:\\
\;\;\;\;t\\

\mathbf{elif}\;z \leq 1.8 \cdot 10^{+83}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.40000000000000016e-57 or 1.7999999999999999e83 < z

    1. Initial program 41.6%

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
      3. distribute-rgt-neg-in50.3%

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

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

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

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

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

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

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

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

    if -3.40000000000000016e-57 < z < 1.7999999999999999e83

    1. Initial program 89.4%

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

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

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

        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
      4. fma-define93.8%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 22: 25.9% accurate, 13.0× speedup?

\[\begin{array}{l} \\ t \end{array} \]
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
	return t;
}
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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
	return t;
}
def code(x, y, z, t, a):
	return t
function code(x, y, z, t, a)
	return t
end
function tmp = code(x, y, z, t, a)
	tmp = t;
end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}

\\
t
\end{array}
Derivation
  1. Initial program 65.3%

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

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

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

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

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

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

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

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

      \[\leadsto -\color{blue}{\left(\left(-1 \cdot \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)} + \frac{y}{a - z}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot x} \]
    3. distribute-rgt-neg-in67.0%

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

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

      \[\leadsto \left(\left(\frac{y}{a - z} + \color{blue}{\left(-\frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)}\right) - \left(1 + \frac{z}{a - z}\right)\right) \cdot \left(-x\right) \]
    6. unsub-neg67.0%

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  9. Add Preprocessing

Developer Target 1: 84.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* (/ y z) (- t x)))))
   (if (< z -1.2536131056095036e+188)
     t_1
     (if (< z 4.446702369113811e+64)
       (+ x (/ (- y z) (/ (- a z) (- t x))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = 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 = t - ((y / z) * (t - x))
    if (z < (-1.2536131056095036d+188)) then
        tmp = t_1
    else if (z < 4.446702369113811d+64) then
        tmp = x + ((y - z) / ((a - z) / (t - x)))
    else
        tmp = 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 = t - ((y / z) * (t - x));
	double tmp;
	if (z < -1.2536131056095036e+188) {
		tmp = t_1;
	} else if (z < 4.446702369113811e+64) {
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - ((y / z) * (t - x))
	tmp = 0
	if z < -1.2536131056095036e+188:
		tmp = t_1
	elif z < 4.446702369113811e+64:
		tmp = x + ((y - z) / ((a - z) / (t - x)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
	tmp = 0.0
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - ((y / z) * (t - x));
	tmp = 0.0;
	if (z < -1.2536131056095036e+188)
		tmp = t_1;
	elseif (z < 4.446702369113811e+64)
		tmp = x + ((y - z) / ((a - z) / (t - x)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
\mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024132 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))

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