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

Percentage Accurate: 68.2% → 89.1%
Time: 12.0s
Alternatives: 17
Speedup: 0.8×

Specification

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

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

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

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

Alternative 1: 89.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 15.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6493.0

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

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

    if -2e145 < t < 4.0999999999999997e118

    1. Initial program 81.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
      7. clear-numN/A

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      8. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      9. lower-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      10. lower-/.f6492.0

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

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

    if 4.0999999999999997e118 < t

    1. Initial program 29.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6490.8

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

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      2. lift-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      3. lift--.f64N/A

        \[\leadsto y - \frac{y - x}{t} \cdot \color{blue}{\left(z - a\right)} \]
      4. *-commutativeN/A

        \[\leadsto y - \color{blue}{\left(z - a\right) \cdot \frac{y - x}{t}} \]
      5. lift-/.f64N/A

        \[\leadsto y - \left(z - a\right) \cdot \color{blue}{\frac{y - x}{t}} \]
      6. clear-numN/A

        \[\leadsto y - \left(z - a\right) \cdot \color{blue}{\frac{1}{\frac{t}{y - x}}} \]
      7. un-div-invN/A

        \[\leadsto y - \color{blue}{\frac{z - a}{\frac{t}{y - x}}} \]
      8. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{z - a}{\frac{t}{y - x}}} \]
      9. lower-/.f6490.9

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

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

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

Alternative 2: 57.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ t_2 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{-303}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-215}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, -x, x\right)\\ \mathbf{elif}\;t \leq 10^{+118}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma y (/ (- z t) a) x)) (t_2 (fma a (/ (- y x) t) y)))
   (if (<= t -4.5e+75)
     t_2
     (if (<= t 6.5e-303)
       t_1
       (if (<= t 1.15e-215)
         (fma (/ z a) (- x) x)
         (if (<= t 1e+118) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(y, ((z - t) / a), x);
	double t_2 = fma(a, ((y - x) / t), y);
	double tmp;
	if (t <= -4.5e+75) {
		tmp = t_2;
	} else if (t <= 6.5e-303) {
		tmp = t_1;
	} else if (t <= 1.15e-215) {
		tmp = fma((z / a), -x, x);
	} else if (t <= 1e+118) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(y, Float64(Float64(z - t) / a), x)
	t_2 = fma(a, Float64(Float64(y - x) / t), y)
	tmp = 0.0
	if (t <= -4.5e+75)
		tmp = t_2;
	elseif (t <= 6.5e-303)
		tmp = t_1;
	elseif (t <= 1.15e-215)
		tmp = fma(Float64(z / a), Float64(-x), x);
	elseif (t <= 1e+118)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4.5e+75], t$95$2, If[LessEqual[t, 6.5e-303], t$95$1, If[LessEqual[t, 1.15e-215], N[(N[(z / a), $MachinePrecision] * (-x) + x), $MachinePrecision], If[LessEqual[t, 1e+118], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\
t_2 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+75}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 6.5 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-215}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, -x, x\right)\\

\mathbf{elif}\;t \leq 10^{+118}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.5000000000000004e75 or 9.99999999999999967e117 < t

    1. Initial program 28.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6488.5

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

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

      \[\leadsto \color{blue}{y - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{y + \left(\mathsf{neg}\left(-1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)\right)} \]
      2. mul-1-negN/A

        \[\leadsto y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{a \cdot \left(y - x\right)}{t}\right)\right)}\right)\right) \]
      3. remove-double-negN/A

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

        \[\leadsto \color{blue}{\frac{a \cdot \left(y - x\right)}{t} + y} \]
      5. associate-/l*N/A

        \[\leadsto \color{blue}{a \cdot \frac{y - x}{t}} + y \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{y - x}{t}}, y\right) \]
      8. lower--.f6463.1

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

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

    if -4.5000000000000004e75 < t < 6.50000000000000028e-303 or 1.15e-215 < t < 9.99999999999999967e117

    1. Initial program 83.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lower-*.f64N/A

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

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

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} \]
    9. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a} + x} \]
      5. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} + x \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} + x \]
      9. lower-fma.f64N/A

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

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

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

    if 6.50000000000000028e-303 < t < 1.15e-215

    1. Initial program 88.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y - x}{a}}, x\right) \]
      5. lower--.f6483.0

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
    6. Taylor expanded in y around 0

      \[\leadsto \color{blue}{x + -1 \cdot \frac{x \cdot z}{a}} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{x \cdot z}{a} + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{x \cdot z}{a}\right)\right)} + x \]
      3. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot \frac{z}{a}}\right)\right) + x \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(\frac{z}{a}\right)\right)} + x \]
      5. mul-1-negN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot \frac{z}{a}\right)} + x \]
      6. *-rgt-identityN/A

        \[\leadsto x \cdot \left(-1 \cdot \frac{z}{a}\right) + \color{blue}{x \cdot 1} \]
      7. distribute-lft-inN/A

        \[\leadsto \color{blue}{x \cdot \left(-1 \cdot \frac{z}{a} + 1\right)} \]
      8. distribute-rgt-inN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \frac{z}{a}\right) \cdot x + 1 \cdot x} \]
      9. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{z}{a} \cdot -1\right)} \cdot x + 1 \cdot x \]
      10. associate-*l*N/A

        \[\leadsto \color{blue}{\frac{z}{a} \cdot \left(-1 \cdot x\right)} + 1 \cdot x \]
      11. mul-1-negN/A

        \[\leadsto \frac{z}{a} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} + 1 \cdot x \]
      12. *-lft-identityN/A

        \[\leadsto \frac{z}{a} \cdot \left(\mathsf{neg}\left(x\right)\right) + \color{blue}{x} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{a}, \mathsf{neg}\left(x\right), x\right)} \]
      14. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, \mathsf{neg}\left(x\right), x\right) \]
      15. lower-neg.f6473.2

        \[\leadsto \mathsf{fma}\left(\frac{z}{a}, \color{blue}{-x}, x\right) \]
    8. Applied rewrites73.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{a}, -x, x\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 3: 88.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+89}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z - a}{\frac{t}{x - y}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= t -3e+89)
   (+ y (* (/ (- y x) t) (- a z)))
   (if (<= t 4.1e+118)
     (fma (/ (- z t) (- a t)) (- y x) x)
     (+ y (/ (- z a) (/ t (- x y)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (t <= -3e+89) {
		tmp = y + (((y - x) / t) * (a - z));
	} else if (t <= 4.1e+118) {
		tmp = fma(((z - t) / (a - t)), (y - x), x);
	} else {
		tmp = y + ((z - a) / (t / (x - y)));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (t <= -3e+89)
		tmp = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z)));
	elseif (t <= 4.1e+118)
		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
	else
		tmp = Float64(y + Float64(Float64(z - a) / Float64(t / Float64(x - y))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+89], N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e+118], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(y + N[(N[(z - a), $MachinePrecision] / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.00000000000000013e89

    1. Initial program 24.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6485.3

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

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

    if -3.00000000000000013e89 < t < 4.0999999999999997e118

    1. Initial program 84.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. remove-double-negN/A

        \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - x\right) \cdot \left(z - t\right)\right)\right)\right)}}{a - t} \]
      5. lift--.f64N/A

        \[\leadsto x + \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - x\right) \cdot \left(z - t\right)\right)\right)\right)}{\color{blue}{a - t}} \]
      6. remove-double-negN/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      7. lift-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} \]
      8. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} + x \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      12. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
      14. lower-/.f6493.4

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

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

    if 4.0999999999999997e118 < t

    1. Initial program 29.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6490.8

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

      \[\leadsto \color{blue}{y - \frac{y - x}{t} \cdot \left(z - a\right)} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      2. lift-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      3. lift--.f64N/A

        \[\leadsto y - \frac{y - x}{t} \cdot \color{blue}{\left(z - a\right)} \]
      4. *-commutativeN/A

        \[\leadsto y - \color{blue}{\left(z - a\right) \cdot \frac{y - x}{t}} \]
      5. lift-/.f64N/A

        \[\leadsto y - \left(z - a\right) \cdot \color{blue}{\frac{y - x}{t}} \]
      6. clear-numN/A

        \[\leadsto y - \left(z - a\right) \cdot \color{blue}{\frac{1}{\frac{t}{y - x}}} \]
      7. un-div-invN/A

        \[\leadsto y - \color{blue}{\frac{z - a}{\frac{t}{y - x}}} \]
      8. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{z - a}{\frac{t}{y - x}}} \]
      9. lower-/.f6490.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+89}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{z - a}{\frac{t}{x - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 71.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-215}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
   (if (<= t -5.8e+72)
     t_1
     (if (<= t 1.5e-215)
       (+ x (* z (/ (- y x) a)))
       (if (<= t 1.15e+46) (fma y (/ (- z t) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - y), ((z - a) / t), y);
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_1;
	} else if (t <= 1.5e-215) {
		tmp = x + (z * ((y - x) / a));
	} else if (t <= 1.15e+46) {
		tmp = fma(y, ((z - t) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y)
	tmp = 0.0
	if (t <= -5.8e+72)
		tmp = t_1;
	elseif (t <= 1.5e-215)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a)));
	elseif (t <= 1.15e+46)
		tmp = fma(y, Float64(Float64(z - t) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -5.8e+72], t$95$1, If[LessEqual[t, 1.5e-215], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+46], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.80000000000000034e72 or 1.15e46 < t

    1. Initial program 33.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} + y \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t}\right)\right) + y \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - a}{t}}\right)\right) + y \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - a}{t}} + y \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - a}{t} + y \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - a}{t}, y\right)} \]
    5. Applied rewrites80.2%

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

    if -5.80000000000000034e72 < t < 1.50000000000000013e-215

    1. Initial program 85.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
      7. clear-numN/A

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      8. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      9. lower-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      10. lower-/.f6493.1

        \[\leadsto x + \frac{y - x}{\color{blue}{\frac{a - t}{z - t}}} \]
    4. Applied rewrites93.1%

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
      2. div-subN/A

        \[\leadsto x + z \cdot \color{blue}{\left(\frac{y}{a} - \frac{x}{a}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{z \cdot \left(\frac{y}{a} - \frac{x}{a}\right)} \]
      4. div-subN/A

        \[\leadsto x + z \cdot \color{blue}{\frac{y - x}{a}} \]
      5. lower-/.f64N/A

        \[\leadsto x + z \cdot \color{blue}{\frac{y - x}{a}} \]
      6. lower--.f6476.1

        \[\leadsto x + z \cdot \frac{\color{blue}{y - x}}{a} \]
    7. Applied rewrites76.1%

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

    if 1.50000000000000013e-215 < t < 1.15e46

    1. Initial program 87.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lower-*.f64N/A

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

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

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} \]
    9. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a} + x} \]
      5. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} + x \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} + x \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
      10. lower-/.f6478.2

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

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

Alternative 5: 68.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-215}:\\ \;\;\;\;x + z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x y) (/ z t) y)))
   (if (<= t -5.8e+72)
     t_1
     (if (<= t 1.5e-215)
       (+ x (* z (/ (- y x) a)))
       (if (<= t 1.15e+46) (fma y (/ (- z t) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - y), (z / t), y);
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_1;
	} else if (t <= 1.5e-215) {
		tmp = x + (z * ((y - x) / a));
	} else if (t <= 1.15e+46) {
		tmp = fma(y, ((z - t) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - y), Float64(z / t), y)
	tmp = 0.0
	if (t <= -5.8e+72)
		tmp = t_1;
	elseif (t <= 1.5e-215)
		tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a)));
	elseif (t <= 1.15e+46)
		tmp = fma(y, Float64(Float64(z - t) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -5.8e+72], t$95$1, If[LessEqual[t, 1.5e-215], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+46], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.80000000000000034e72 or 1.15e46 < t

    1. Initial program 33.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6484.8

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

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

      \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{y + \left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right)}{t}\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right)}{t}\right)\right) + y} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(y - x\right) \cdot z}}{t}\right)\right) + y \]
      4. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z}{t}}\right)\right) + y \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z}{t}} + y \]
      6. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z}{t} + y \]
      7. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z}{t}, y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(y - x\right)\right)}, \frac{z}{t}, y\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)}\right), \frac{z}{t}, y\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y + \color{blue}{-1 \cdot x}\right)\right), \frac{z}{t}, y\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(-1 \cdot x + y\right)}\right), \frac{z}{t}, y\right) \]
      12. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(-1 \cdot x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, \frac{z}{t}, y\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(-1 \cdot x\right)\right) - y}, \frac{z}{t}, y\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right) - y, \frac{z}{t}, y\right) \]
      15. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x} - y, \frac{z}{t}, y\right) \]
      16. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - y}, \frac{z}{t}, y\right) \]
      17. lower-/.f6472.3

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

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

    if -5.80000000000000034e72 < t < 1.50000000000000013e-215

    1. Initial program 85.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

        \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} \]
      7. clear-numN/A

        \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\frac{1}{\frac{a - t}{z - t}}} \]
      8. un-div-invN/A

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      9. lower-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{y - x}{\frac{a - t}{z - t}}} \]
      10. lower-/.f6493.1

        \[\leadsto x + \frac{y - x}{\color{blue}{\frac{a - t}{z - t}}} \]
    4. Applied rewrites93.1%

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

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

        \[\leadsto x + \color{blue}{z \cdot \frac{y - x}{a}} \]
      2. div-subN/A

        \[\leadsto x + z \cdot \color{blue}{\left(\frac{y}{a} - \frac{x}{a}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{z \cdot \left(\frac{y}{a} - \frac{x}{a}\right)} \]
      4. div-subN/A

        \[\leadsto x + z \cdot \color{blue}{\frac{y - x}{a}} \]
      5. lower-/.f64N/A

        \[\leadsto x + z \cdot \color{blue}{\frac{y - x}{a}} \]
      6. lower--.f6476.1

        \[\leadsto x + z \cdot \frac{\color{blue}{y - x}}{a} \]
    7. Applied rewrites76.1%

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

    if 1.50000000000000013e-215 < t < 1.15e46

    1. Initial program 87.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lower-*.f64N/A

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

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

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} \]
    9. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a} + x} \]
      5. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} + x \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} + x \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
      10. lower-/.f6478.2

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

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

Alternative 6: 68.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\ \mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-215}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x y) (/ z t) y)))
   (if (<= t -5.8e+72)
     t_1
     (if (<= t 1.5e-215)
       (fma z (/ (- y x) a) x)
       (if (<= t 1.15e+46) (fma y (/ (- z t) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - y), (z / t), y);
	double tmp;
	if (t <= -5.8e+72) {
		tmp = t_1;
	} else if (t <= 1.5e-215) {
		tmp = fma(z, ((y - x) / a), x);
	} else if (t <= 1.15e+46) {
		tmp = fma(y, ((z - t) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - y), Float64(z / t), y)
	tmp = 0.0
	if (t <= -5.8e+72)
		tmp = t_1;
	elseif (t <= 1.5e-215)
		tmp = fma(z, Float64(Float64(y - x) / a), x);
	elseif (t <= 1.15e+46)
		tmp = fma(y, Float64(Float64(z - t) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -5.8e+72], t$95$1, If[LessEqual[t, 1.5e-215], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1.15e+46], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z}{t}, y\right)\\
\mathbf{if}\;t \leq -5.8 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-215}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.80000000000000034e72 or 1.15e46 < t

    1. Initial program 33.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6484.8

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

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

      \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{y + \left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right)}{t}\right)\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right)}{t}\right)\right) + y} \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(y - x\right) \cdot z}}{t}\right)\right) + y \]
      4. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z}{t}}\right)\right) + y \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z}{t}} + y \]
      6. neg-mul-1N/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z}{t} + y \]
      7. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z}{t}, y\right)} \]
      8. neg-mul-1N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\mathsf{neg}\left(\left(y - x\right)\right)}, \frac{z}{t}, y\right) \]
      9. sub-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(y + \left(\mathsf{neg}\left(x\right)\right)\right)}\right), \frac{z}{t}, y\right) \]
      10. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\left(y + \color{blue}{-1 \cdot x}\right)\right), \frac{z}{t}, y\right) \]
      11. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(\color{blue}{\left(-1 \cdot x + y\right)}\right), \frac{z}{t}, y\right) \]
      12. distribute-neg-inN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(-1 \cdot x\right)\right) + \left(\mathsf{neg}\left(y\right)\right)}, \frac{z}{t}, y\right) \]
      13. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(-1 \cdot x\right)\right) - y}, \frac{z}{t}, y\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right)\right) - y, \frac{z}{t}, y\right) \]
      15. remove-double-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x} - y, \frac{z}{t}, y\right) \]
      16. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x - y}, \frac{z}{t}, y\right) \]
      17. lower-/.f6472.3

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

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

    if -5.80000000000000034e72 < t < 1.50000000000000013e-215

    1. Initial program 85.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y - x}{a}}, x\right) \]
      5. lower--.f6476.1

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

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

    if 1.50000000000000013e-215 < t < 1.15e46

    1. Initial program 87.8%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lower-*.f64N/A

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

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

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} \]
    9. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a} + x} \]
      5. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} + x \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} + x \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
      10. lower-/.f6478.2

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

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

Alternative 7: 62.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \mathbf{if}\;t \leq -4.5 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.5 \cdot 10^{-215}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{elif}\;t \leq 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma a (/ (- y x) t) y)))
   (if (<= t -4.5e+75)
     t_1
     (if (<= t 1.5e-215)
       (fma z (/ (- y x) a) x)
       (if (<= t 1e+118) (fma y (/ (- z t) a) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(a, ((y - x) / t), y);
	double tmp;
	if (t <= -4.5e+75) {
		tmp = t_1;
	} else if (t <= 1.5e-215) {
		tmp = fma(z, ((y - x) / a), x);
	} else if (t <= 1e+118) {
		tmp = fma(y, ((z - t) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(a, Float64(Float64(y - x) / t), y)
	tmp = 0.0
	if (t <= -4.5e+75)
		tmp = t_1;
	elseif (t <= 1.5e-215)
		tmp = fma(z, Float64(Float64(y - x) / a), x);
	elseif (t <= 1e+118)
		tmp = fma(y, Float64(Float64(z - t) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4.5e+75], t$95$1, If[LessEqual[t, 1.5e-215], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 1e+118], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.5 \cdot 10^{-215}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\

\mathbf{elif}\;t \leq 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.5000000000000004e75 or 9.99999999999999967e117 < t

    1. Initial program 28.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6488.5

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

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

      \[\leadsto \color{blue}{y - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{y + \left(\mathsf{neg}\left(-1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)\right)} \]
      2. mul-1-negN/A

        \[\leadsto y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{a \cdot \left(y - x\right)}{t}\right)\right)}\right)\right) \]
      3. remove-double-negN/A

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

        \[\leadsto \color{blue}{\frac{a \cdot \left(y - x\right)}{t} + y} \]
      5. associate-/l*N/A

        \[\leadsto \color{blue}{a \cdot \frac{y - x}{t}} + y \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{y - x}{t}}, y\right) \]
      8. lower--.f6463.1

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

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

    if -4.5000000000000004e75 < t < 1.50000000000000013e-215

    1. Initial program 85.0%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y - x}{a}}, x\right) \]
      5. lower--.f6476.1

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

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

    if 1.50000000000000013e-215 < t < 9.99999999999999967e117

    1. Initial program 83.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lower-*.f64N/A

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

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

      \[\leadsto x + \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} \]
    9. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto x + \frac{\color{blue}{\left(z - t\right) \cdot y}}{a} \]
      3. lift-/.f64N/A

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

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a} + x} \]
      5. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(z - t\right) \cdot y}{a}} + x \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} + x \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
      10. lower-/.f6469.8

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

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

Alternative 8: 88.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{if}\;t \leq -3 \cdot 10^{+89}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (* (/ (- y x) t) (- a z)))))
   (if (<= t -3e+89)
     t_1
     (if (<= t 4.1e+118) (fma (/ (- z t) (- a t)) (- y x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (((y - x) / t) * (a - z));
	double tmp;
	if (t <= -3e+89) {
		tmp = t_1;
	} else if (t <= 4.1e+118) {
		tmp = fma(((z - t) / (a - t)), (y - x), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(Float64(Float64(y - x) / t) * Float64(a - z)))
	tmp = 0.0
	if (t <= -3e+89)
		tmp = t_1;
	elseif (t <= 4.1e+118)
		tmp = fma(Float64(Float64(z - t) / Float64(a - t)), Float64(y - x), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+89], t$95$1, If[LessEqual[t, 4.1e+118], N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.00000000000000013e89 or 4.0999999999999997e118 < t

    1. Initial program 26.6%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6488.2

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

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

    if -3.00000000000000013e89 < t < 4.0999999999999997e118

    1. Initial program 84.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. remove-double-negN/A

        \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - x\right) \cdot \left(z - t\right)\right)\right)\right)}}{a - t} \]
      5. lift--.f64N/A

        \[\leadsto x + \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(y - x\right) \cdot \left(z - t\right)\right)\right)\right)}{\color{blue}{a - t}} \]
      6. remove-double-negN/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      7. lift-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} \]
      8. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} + x} \]
      9. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}} + x \]
      10. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z - t}{a - t}} + x \]
      12. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} + x \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
      14. lower-/.f6493.4

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification91.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{+89}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \mathbf{elif}\;t \leq 4.1 \cdot 10^{+118}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - t}{a - t}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{y - x}{t} \cdot \left(a - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 74.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1000000000000001e73 or 1.15e46 < t

    1. Initial program 33.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6484.8

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

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

    if -2.1000000000000001e73 < t < 1.15e46

    1. Initial program 85.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

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

Alternative 10: 74.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
   (if (<= t -2.1e+73)
     t_1
     (if (<= t 1.15e+46) (+ x (* (- z t) (/ (- y x) a))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - y), ((z - a) / t), y);
	double tmp;
	if (t <= -2.1e+73) {
		tmp = t_1;
	} else if (t <= 1.15e+46) {
		tmp = x + ((z - t) * ((y - x) / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y)
	tmp = 0.0
	if (t <= -2.1e+73)
		tmp = t_1;
	elseif (t <= 1.15e+46)
		tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / a)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.1e+73], t$95$1, If[LessEqual[t, 1.15e+46], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1000000000000001e73 or 1.15e46 < t

    1. Initial program 33.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} + y \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t}\right)\right) + y \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - a}{t}}\right)\right) + y \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - a}{t}} + y \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - a}{t} + y \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - a}{t}, y\right)} \]
    5. Applied rewrites80.2%

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

    if -2.1000000000000001e73 < t < 1.15e46

    1. Initial program 85.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      3. lower-*.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right) \cdot \frac{y - x}{a}} \]
      4. lower--.f64N/A

        \[\leadsto x + \color{blue}{\left(z - t\right)} \cdot \frac{y - x}{a} \]
      5. lower-/.f64N/A

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

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

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

Alternative 11: 74.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{+73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x y) (/ (- z a) t) y)))
   (if (<= t -2.1e+73)
     t_1
     (if (<= t 1.15e+46) (fma (- z t) (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - y), ((z - a) / t), y);
	double tmp;
	if (t <= -2.1e+73) {
		tmp = t_1;
	} else if (t <= 1.15e+46) {
		tmp = fma((z - t), ((y - x) / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - y), Float64(Float64(z - a) / t), y)
	tmp = 0.0
	if (t <= -2.1e+73)
		tmp = t_1;
	elseif (t <= 1.15e+46)
		tmp = fma(Float64(z - t), Float64(Float64(y - x) / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.1e+73], t$95$1, If[LessEqual[t, 1.15e+46], N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - y, \frac{z - a}{t}, y\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{+46}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.1000000000000001e73 or 1.15e46 < t

    1. Initial program 33.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

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

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} + y \]
      6. distribute-rgt-out--N/A

        \[\leadsto \left(\mathsf{neg}\left(\frac{\color{blue}{\left(y - x\right) \cdot \left(z - a\right)}}{t}\right)\right) + y \]
      7. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y - x\right) \cdot \frac{z - a}{t}}\right)\right) + y \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y - x\right)\right)\right) \cdot \frac{z - a}{t}} + y \]
      9. mul-1-negN/A

        \[\leadsto \color{blue}{\left(-1 \cdot \left(y - x\right)\right)} \cdot \frac{z - a}{t} + y \]
      10. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1 \cdot \left(y - x\right), \frac{z - a}{t}, y\right)} \]
    5. Applied rewrites80.2%

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

    if -2.1000000000000001e73 < t < 1.15e46

    1. Initial program 85.9%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \frac{y - x}{a}, x\right) \]
      6. lower-/.f64N/A

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

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

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

Alternative 12: 55.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\ \mathbf{if}\;t \leq -4 \cdot 10^{+75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma a (/ (- y x) t) y)))
   (if (<= t -4e+75) t_1 (if (<= t 9.6e+117) (fma z (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma(a, ((y - x) / t), y);
	double tmp;
	if (t <= -4e+75) {
		tmp = t_1;
	} else if (t <= 9.6e+117) {
		tmp = fma(z, (y / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(a, Float64(Float64(y - x) / t), y)
	tmp = 0.0
	if (t <= -4e+75)
		tmp = t_1;
	elseif (t <= 9.6e+117)
		tmp = fma(z, Float64(y / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -4e+75], t$95$1, If[LessEqual[t, 9.6e+117], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{y - x}{t}, y\right)\\
\mathbf{if}\;t \leq -4 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.99999999999999971e75 or 9.5999999999999996e117 < t

    1. Initial program 28.4%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right)} \cdot \left(z - t\right)}{a - t} \]
      2. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \color{blue}{\left(z - t\right)}}{a - t} \]
      3. lift-*.f64N/A

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \left(z - t\right)}}{a - t} \]
      4. lift--.f64N/A

        \[\leadsto x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto x + \color{blue}{\frac{z - t}{a - t} \cdot \left(y - x\right)} \]
      8. lift--.f64N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\left(y - x\right)} \]
      9. flip--N/A

        \[\leadsto x + \frac{z - t}{a - t} \cdot \color{blue}{\frac{y \cdot y - x \cdot x}{y + x}} \]
      10. associate-*r/N/A

        \[\leadsto x + \color{blue}{\frac{\frac{z - t}{a - t} \cdot \left(y \cdot y - x \cdot x\right)}{y + x}} \]
      11. lower-/.f64N/A

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

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

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

        \[\leadsto \color{blue}{y + \left(-1 \cdot \frac{z \cdot \left(y - x\right)}{t} - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      2. distribute-lft-out--N/A

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

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

        \[\leadsto y + \color{blue}{\left(\mathsf{neg}\left(\frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\right)\right)} \]
      5. unsub-negN/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      6. lower--.f64N/A

        \[\leadsto \color{blue}{y - \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}} \]
      7. div-subN/A

        \[\leadsto y - \color{blue}{\left(\frac{z \cdot \left(y - x\right)}{t} - \frac{a \cdot \left(y - x\right)}{t}\right)} \]
      8. associate-/l*N/A

        \[\leadsto y - \left(\color{blue}{z \cdot \frac{y - x}{t}} - \frac{a \cdot \left(y - x\right)}{t}\right) \]
      9. associate-/l*N/A

        \[\leadsto y - \left(z \cdot \frac{y - x}{t} - \color{blue}{a \cdot \frac{y - x}{t}}\right) \]
      10. distribute-rgt-out--N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      11. lower-*.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t} \cdot \left(z - a\right)} \]
      12. lower-/.f64N/A

        \[\leadsto y - \color{blue}{\frac{y - x}{t}} \cdot \left(z - a\right) \]
      13. lower--.f64N/A

        \[\leadsto y - \frac{\color{blue}{y - x}}{t} \cdot \left(z - a\right) \]
      14. lower--.f6488.5

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

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

      \[\leadsto \color{blue}{y - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
    9. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \color{blue}{y + \left(\mathsf{neg}\left(-1 \cdot \frac{a \cdot \left(y - x\right)}{t}\right)\right)} \]
      2. mul-1-negN/A

        \[\leadsto y + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{a \cdot \left(y - x\right)}{t}\right)\right)}\right)\right) \]
      3. remove-double-negN/A

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

        \[\leadsto \color{blue}{\frac{a \cdot \left(y - x\right)}{t} + y} \]
      5. associate-/l*N/A

        \[\leadsto \color{blue}{a \cdot \frac{y - x}{t}} + y \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, \frac{y - x}{t}, y\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{y - x}{t}}, y\right) \]
      8. lower--.f6463.1

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

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

    if -3.99999999999999971e75 < t < 9.5999999999999996e117

    1. Initial program 84.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y - x}{a}}, x\right) \]
      5. lower--.f6470.7

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
    6. Taylor expanded in y around inf

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{a}}, x\right) \]
    7. Step-by-step derivation
      1. lower-/.f6457.4

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{a}}, x\right) \]
    8. Applied rewrites57.4%

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{a}}, x\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 51.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y + \left(x - x\right)\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+143}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ y (- x x))))
   (if (<= t -2.8e+143) t_1 (if (<= t 9.6e+117) (fma z (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y + (x - x);
	double tmp;
	if (t <= -2.8e+143) {
		tmp = t_1;
	} else if (t <= 9.6e+117) {
		tmp = fma(z, (y / a), x);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(y + Float64(x - x))
	tmp = 0.0
	if (t <= -2.8e+143)
		tmp = t_1;
	elseif (t <= 9.6e+117)
		tmp = fma(z, Float64(y / a), x);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x - x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+143], t$95$1, If[LessEqual[t, 9.6e+117], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y + \left(x - x\right)\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.79999999999999998e143 or 9.5999999999999996e117 < t

    1. Initial program 23.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6435.8

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    5. Applied rewrites35.8%

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y - x\right) + x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(y - x\right)} + x \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      6. lower--.f6456.5

        \[\leadsto y - \color{blue}{\left(x - x\right)} \]
    7. Applied rewrites56.5%

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]

    if -2.79999999999999998e143 < t < 9.5999999999999996e117

    1. Initial program 82.3%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y - x}{a}}, x\right) \]
      5. lower--.f6468.1

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
    6. Taylor expanded in y around inf

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{a}}, x\right) \]
    7. Step-by-step derivation
      1. lower-/.f6455.8

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{a}}, x\right) \]
    8. Applied rewrites55.8%

      \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y}{a}}, x\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+143}:\\ \;\;\;\;y + \left(x - x\right)\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{+117}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \left(x - x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 35.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := y + \left(x - x\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.45 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000008e79 or 1.4499999999999999e48 < t

    1. Initial program 31.1%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6432.4

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    5. Applied rewrites32.4%

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(y - x\right) + x} \]
      3. lift--.f64N/A

        \[\leadsto \color{blue}{\left(y - x\right)} + x \]
      4. associate-+l-N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \color{blue}{y - \left(x - x\right)} \]
      6. lower--.f6450.0

        \[\leadsto y - \color{blue}{\left(x - x\right)} \]
    7. Applied rewrites50.0%

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]

    if -2.10000000000000008e79 < t < 1.4499999999999999e48

    1. Initial program 86.2%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \color{blue}{x + \frac{z \cdot \left(y - x\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{z \cdot \frac{y - x}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\frac{y - x}{a}}, x\right) \]
      5. lower--.f6471.9

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)} \]
    6. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{y \cdot z}{a}} \]
    7. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      3. lower-/.f6428.7

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

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

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

Alternative 15: 25.0% accurate, 4.1× speedup?

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

\\
y + \left(x - x\right)
\end{array}
Derivation
  1. Initial program 66.2%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  4. Step-by-step derivation
    1. lower--.f6417.4

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  5. Applied rewrites17.4%

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  6. Step-by-step derivation
    1. lift--.f64N/A

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{\left(y - x\right) + x} \]
    3. lift--.f64N/A

      \[\leadsto \color{blue}{\left(y - x\right)} + x \]
    4. associate-+l-N/A

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    5. lower--.f64N/A

      \[\leadsto \color{blue}{y - \left(x - x\right)} \]
    6. lower--.f6424.1

      \[\leadsto y - \color{blue}{\left(x - x\right)} \]
  7. Applied rewrites24.1%

    \[\leadsto \color{blue}{y - \left(x - x\right)} \]
  8. Final simplification24.1%

    \[\leadsto y + \left(x - x\right) \]
  9. Add Preprocessing

Alternative 16: 19.4% accurate, 4.1× speedup?

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

\\
x + \left(y - x\right)
\end{array}
Derivation
  1. Initial program 66.2%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  4. Step-by-step derivation
    1. lower--.f6417.4

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  5. Applied rewrites17.4%

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  6. Add Preprocessing

Alternative 17: 2.8% accurate, 29.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
	return 0.0;
}
def code(x, y, z, t, a):
	return 0.0
function code(x, y, z, t, a)
	return 0.0
end
function tmp = code(x, y, z, t, a)
	tmp = 0.0;
end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 66.2%

    \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  4. Step-by-step derivation
    1. lower--.f6417.4

      \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  5. Applied rewrites17.4%

    \[\leadsto x + \color{blue}{\left(y - x\right)} \]
  6. Taylor expanded in y around 0

    \[\leadsto x + \color{blue}{-1 \cdot x} \]
  7. Step-by-step derivation
    1. mul-1-negN/A

      \[\leadsto x + \color{blue}{\left(\mathsf{neg}\left(x\right)\right)} \]
    2. lower-neg.f642.8

      \[\leadsto x + \color{blue}{\left(-x\right)} \]
  8. Applied rewrites2.8%

    \[\leadsto x + \color{blue}{\left(-x\right)} \]
  9. Step-by-step derivation
    1. unsub-negN/A

      \[\leadsto \color{blue}{x - x} \]
    2. +-inverses2.8

      \[\leadsto \color{blue}{0} \]
  10. Applied rewrites2.8%

    \[\leadsto \color{blue}{0} \]
  11. Add Preprocessing

Developer Target 1: 86.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024219 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))

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