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

Percentage Accurate: 69.1% → 90.7%
Time: 4.5s
Alternatives: 15
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 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: 69.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
	return x + (((y - z) * (t - x)) / (a - z));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 90.7% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+302}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 45.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999979e-234

    1. Initial program 96.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\mathsf{fma}\left(-x, y - z, \left(y - z\right) \cdot t\right)}{a - z} \]
      8. lift--.f6496.6

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

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

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

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.0000000000000001e302

    1. Initial program 97.8%

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

Alternative 2: 90.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-234}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 10^{+302}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.00000000000000023e279 or 1.0000000000000001e302 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000023e279 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999979e-234 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.0000000000000001e302

    1. Initial program 97.2%

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

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

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 86.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-234} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}, -1, t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -5e-234) (not (<= t_1 0.0)))
     (fma (- y z) (/ (- t x) (- a z)) x)
     (fma (/ (* (- t x) (- y a)) z) -1.0 t))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -5e-234) || !(t_1 <= 0.0)) {
		tmp = fma((y - z), ((t - x) / (a - z)), x);
	} else {
		tmp = fma((((t - x) * (y - a)) / z), -1.0, t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -5e-234) || !(t_1 <= 0.0))
		tmp = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x);
	else
		tmp = fma(Float64(Float64(Float64(t - x) * Float64(y - a)) / z), -1.0, t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-234], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * -1.0 + t), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}, -1, t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999979e-234 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 84.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-234} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ (* (- y z) (- t x)) (- a z)))))
   (if (or (<= t_1 -5e-234) (not (<= t_1 0.0)))
     (fma (- y z) (/ (- t x) (- a z)) x)
     (fma (- y) (/ (- x) z) t))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if ((t_1 <= -5e-234) || !(t_1 <= 0.0)) {
		tmp = fma((y - z), ((t - x) / (a - z)), x);
	} else {
		tmp = fma(-y, (-x / z), t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
	tmp = 0.0
	if ((t_1 <= -5e-234) || !(t_1 <= 0.0))
		tmp = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x);
	else
		tmp = fma(Float64(-y), Float64(Float64(-x) / z), t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-234], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[((-y) * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.99999999999999979e-234 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 13.3%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
      6. lift--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
      8. lift--.f6413.4

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
    5. Applied rewrites13.4%

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
      8. lift--.f6486.0

        \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
    8. Applied rewrites86.0%

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

      \[\leadsto \mathsf{fma}\left(-y, \frac{-1 \cdot x}{z}, t\right) \]
    10. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(-y, \frac{\mathsf{neg}\left(x\right)}{z}, t\right) \]
      2. lift-neg.f6486.0

        \[\leadsto \mathsf{fma}\left(-y, \frac{-x}{z}, t\right) \]
    11. Applied rewrites86.0%

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

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

Alternative 5: 86.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{-50} \lor \neg \left(t \leq 7.6 \cdot 10^{-84}\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left(\mathsf{fma}\left(\frac{\frac{\left(y - z\right) \cdot t}{x}}{a - z}, -1, \frac{y}{a - z}\right) - \left(\frac{z}{a - z} - -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.02e-50) (not (<= t 7.6e-84)))
   (fma (- y z) (/ (- t x) (- a z)) x)
   (*
    (- x)
    (-
     (fma (/ (/ (* (- y z) t) x) (- a z)) -1.0 (/ y (- a z)))
     (- (/ z (- a z)) -1.0)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.02e-50) || !(t <= 7.6e-84)) {
		tmp = fma((y - z), ((t - x) / (a - z)), x);
	} else {
		tmp = -x * (fma(((((y - z) * t) / x) / (a - z)), -1.0, (y / (a - z))) - ((z / (a - z)) - -1.0));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.02e-50) || !(t <= 7.6e-84))
		tmp = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x);
	else
		tmp = Float64(Float64(-x) * Float64(fma(Float64(Float64(Float64(Float64(y - z) * t) / x) / Float64(a - z)), -1.0, Float64(y / Float64(a - z))) - Float64(Float64(z / Float64(a - z)) - -1.0)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.02e-50], N[Not[LessEqual[t, 7.6e-84]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[((-x) * N[(N[(N[(N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * -1.0 + N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{-50} \lor \neg \left(t \leq 7.6 \cdot 10^{-84}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \left(\mathsf{fma}\left(\frac{\frac{\left(y - z\right) \cdot t}{x}}{a - z}, -1, \frac{y}{a - z}\right) - \left(\frac{z}{a - z} - -1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.0199999999999999e-50 or 7.59999999999999971e-84 < t

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0199999999999999e-50 < t < 7.59999999999999971e-84

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{-50} \lor \neg \left(t \leq 7.6 \cdot 10^{-84}\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left(\mathsf{fma}\left(\frac{\frac{\left(y - z\right) \cdot t}{x}}{a - z}, -1, \frac{y}{a - z}\right) - \left(\frac{z}{a - z} - -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 55.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -14.5:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.8e119 or 3200 < a

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
    5. Applied rewrites73.3%

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

    if -4.8e119 < a < -14.5

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{y}{z} - \frac{a}{z}\right) \cdot x \]
      3. sub-divN/A

        \[\leadsto \frac{y - a}{z} \cdot x \]
      4. lower-/.f64N/A

        \[\leadsto \frac{y - a}{z} \cdot x \]
      5. lift--.f6450.7

        \[\leadsto \frac{y - a}{z} \cdot x \]
    8. Applied rewrites50.7%

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

    if -14.5 < a < 3200

    1. Initial program 70.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
      6. lift--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
      8. lift--.f6462.2

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

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

      \[\leadsto -1 \cdot \color{blue}{\left(t \cdot \left(\frac{y}{z} - 1\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

        \[\leadsto \left(\mathsf{neg}\left(t\right)\right) \cdot \left(\frac{y}{z} - 1\right) \]
      3. lower-*.f64N/A

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

        \[\leadsto \left(-t\right) \cdot \left(\frac{y}{z} - 1\right) \]
      5. lower--.f64N/A

        \[\leadsto \left(-t\right) \cdot \left(\frac{y}{z} - 1\right) \]
      6. lower-/.f6455.9

        \[\leadsto \left(-t\right) \cdot \left(\frac{y}{z} - 1\right) \]
    8. Applied rewrites55.9%

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

Alternative 7: 55.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -0.48:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\

\mathbf{elif}\;a \leq 3200:\\
\;\;\;\;\mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -4.8e119 or 3200 < a

    1. Initial program 77.5%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
    5. Applied rewrites73.3%

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

    if -4.8e119 < a < -0.47999999999999998

    1. Initial program 51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{y}{z} - \frac{a}{z}\right) \cdot x \]
      3. sub-divN/A

        \[\leadsto \frac{y - a}{z} \cdot x \]
      4. lower-/.f64N/A

        \[\leadsto \frac{y - a}{z} \cdot x \]
      5. lift--.f6450.7

        \[\leadsto \frac{y - a}{z} \cdot x \]
    8. Applied rewrites50.7%

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

    if -0.47999999999999998 < a < 3200

    1. Initial program 70.6%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
      6. lift--.f64N/A

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

        \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
      8. lift--.f6462.2

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
      8. lift--.f6478.8

        \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
    8. Applied rewrites78.8%

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

      \[\leadsto \mathsf{fma}\left(-y, \frac{t}{z}, t\right) \]
    10. Step-by-step derivation
      1. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-y, \frac{t}{z}, t\right) \]
    11. Recombined 3 regimes into one program.
    12. Add Preprocessing

    Alternative 8: 46.4% accurate, 0.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -9.5 \cdot 10^{+117}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -0.48:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{+92}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= a -9.5e+117)
       x
       (if (<= a -0.48)
         (* (/ (- y a) z) x)
         (if (<= a 2.45e+92) (fma (- y) (/ t z) t) x))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (a <= -9.5e+117) {
    		tmp = x;
    	} else if (a <= -0.48) {
    		tmp = ((y - a) / z) * x;
    	} else if (a <= 2.45e+92) {
    		tmp = fma(-y, (t / z), t);
    	} else {
    		tmp = x;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (a <= -9.5e+117)
    		tmp = x;
    	elseif (a <= -0.48)
    		tmp = Float64(Float64(Float64(y - a) / z) * x);
    	elseif (a <= 2.45e+92)
    		tmp = fma(Float64(-y), Float64(t / z), t);
    	else
    		tmp = x;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+117], x, If[LessEqual[a, -0.48], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 2.45e+92], N[((-y) * N[(t / z), $MachinePrecision] + t), $MachinePrecision], x]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq -9.5 \cdot 10^{+117}:\\
    \;\;\;\;x\\
    
    \mathbf{elif}\;a \leq -0.48:\\
    \;\;\;\;\frac{y - a}{z} \cdot x\\
    
    \mathbf{elif}\;a \leq 2.45 \cdot 10^{+92}:\\
    \;\;\;\;\mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -9.50000000000000041e117 or 2.4500000000000001e92 < a

      1. Initial program 77.7%

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

        \[\leadsto \color{blue}{x} \]
      4. Step-by-step derivation
        1. Applied rewrites56.8%

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

        if -9.50000000000000041e117 < a < -0.47999999999999998

        1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{y}{z} - \frac{a}{z}\right) \cdot x \]
          3. sub-divN/A

            \[\leadsto \frac{y - a}{z} \cdot x \]
          4. lower-/.f64N/A

            \[\leadsto \frac{y - a}{z} \cdot x \]
          5. lift--.f6453.2

            \[\leadsto \frac{y - a}{z} \cdot x \]
        8. Applied rewrites53.2%

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

        if -0.47999999999999998 < a < 2.4500000000000001e92

        1. Initial program 71.4%

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
          6. lift--.f64N/A

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

            \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
          8. lift--.f6460.6

            \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
        5. Applied rewrites60.6%

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
          8. lift--.f6475.4

            \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
        8. Applied rewrites75.4%

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

          \[\leadsto \mathsf{fma}\left(-y, \frac{t}{z}, t\right) \]
        10. Step-by-step derivation
          1. Applied rewrites51.4%

            \[\leadsto \mathsf{fma}\left(-y, \frac{t}{z}, t\right) \]
        11. Recombined 3 regimes into one program.
        12. Add Preprocessing

        Alternative 9: 74.3% accurate, 0.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-93} \lor \neg \left(a \leq 4.5 \cdot 10^{-46}\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (if (or (<= a -1.05e-93) (not (<= a 4.5e-46)))
           (fma (- y z) (/ t (- a z)) x)
           (fma (- y) (/ (- t x) z) t)))
        double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if ((a <= -1.05e-93) || !(a <= 4.5e-46)) {
        		tmp = fma((y - z), (t / (a - z)), x);
        	} else {
        		tmp = fma(-y, ((t - x) / z), t);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a)
        	tmp = 0.0
        	if ((a <= -1.05e-93) || !(a <= 4.5e-46))
        		tmp = fma(Float64(y - z), Float64(t / Float64(a - z)), x);
        	else
        		tmp = fma(Float64(-y), Float64(Float64(t - x) / z), t);
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.05e-93], N[Not[LessEqual[a, 4.5e-46]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[((-y) * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -1.05 \cdot 10^{-93} \lor \neg \left(a \leq 4.5 \cdot 10^{-46}\right):\\
        \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -1.05e-93 or 4.50000000000000001e-46 < a

          1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(y - z, \frac{\color{blue}{t}}{a - z}, x\right) \]
          6. Step-by-step derivation
            1. Applied rewrites74.6%

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

            if -1.05e-93 < a < 4.50000000000000001e-46

            1. Initial program 69.8%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              6. lift--.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              8. lift--.f6468.3

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
            5. Applied rewrites68.3%

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
              8. lift--.f6485.0

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
            8. Applied rewrites85.0%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.05 \cdot 10^{-93} \lor \neg \left(a \leq 4.5 \cdot 10^{-46}\right):\\ \;\;\;\;\mathsf{fma}\left(y - z, \frac{t}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 10: 66.0% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -4.8 \cdot 10^{+119} \lor \neg \left(a \leq 1.8 \cdot 10^{+77}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (or (<= a -4.8e+119) (not (<= a 1.8e+77)))
             (fma y (/ (- t x) a) x)
             (fma (- y) (/ (- t x) z) t)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if ((a <= -4.8e+119) || !(a <= 1.8e+77)) {
          		tmp = fma(y, ((t - x) / a), x);
          	} else {
          		tmp = fma(-y, ((t - x) / z), t);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if ((a <= -4.8e+119) || !(a <= 1.8e+77))
          		tmp = fma(y, Float64(Float64(t - x) / a), x);
          	else
          		tmp = fma(Float64(-y), Float64(Float64(t - x) / z), t);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.8e+119], N[Not[LessEqual[a, 1.8e+77]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[((-y) * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -4.8 \cdot 10^{+119} \lor \neg \left(a \leq 1.8 \cdot 10^{+77}\right):\\
          \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -4.8e119 or 1.7999999999999999e77 < a

            1. Initial program 78.2%

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

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

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

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

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

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

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

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

            if -4.8e119 < a < 1.7999999999999999e77

            1. Initial program 68.5%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              6. lift--.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              8. lift--.f6456.7

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
            5. Applied rewrites56.7%

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
              8. lift--.f6470.9

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
            8. Applied rewrites70.9%

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

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

          Alternative 11: 69.0% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.75 \cdot 10^{-90}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+77}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= a -1.75e-90)
             (fma (- t x) (/ (- y z) a) x)
             (if (<= a 1.8e+77) (fma (- y) (/ (- t x) z) t) (fma y (/ (- t x) a) x))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (a <= -1.75e-90) {
          		tmp = fma((t - x), ((y - z) / a), x);
          	} else if (a <= 1.8e+77) {
          		tmp = fma(-y, ((t - x) / z), t);
          	} else {
          		tmp = fma(y, ((t - x) / a), x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (a <= -1.75e-90)
          		tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x);
          	elseif (a <= 1.8e+77)
          		tmp = fma(Float64(-y), Float64(Float64(t - x) / z), t);
          	else
          		tmp = fma(y, Float64(Float64(t - x) / a), x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.75e-90], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.8e+77], N[((-y) * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -1.75 \cdot 10^{-90}:\\
          \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
          
          \mathbf{elif}\;a \leq 1.8 \cdot 10^{+77}:\\
          \;\;\;\;\mathsf{fma}\left(-y, \frac{t - x}{z}, t\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if a < -1.7499999999999999e-90

            1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

            if -1.7499999999999999e-90 < a < 1.7999999999999999e77

            1. Initial program 70.9%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              6. lift--.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              8. lift--.f6464.3

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
            5. Applied rewrites64.3%

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
              8. lift--.f6479.0

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
            8. Applied rewrites79.0%

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

            if 1.7999999999999999e77 < a

            1. Initial program 82.0%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
            5. Applied rewrites84.3%

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

          Alternative 12: 59.9% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6.5 \cdot 10^{-104} \lor \neg \left(a \leq 1.72 \cdot 10^{+77}\right):\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (or (<= a -6.5e-104) (not (<= a 1.72e+77)))
             (fma y (/ (- t x) a) x)
             (fma (- y) (/ (- x) z) t)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if ((a <= -6.5e-104) || !(a <= 1.72e+77)) {
          		tmp = fma(y, ((t - x) / a), x);
          	} else {
          		tmp = fma(-y, (-x / z), t);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if ((a <= -6.5e-104) || !(a <= 1.72e+77))
          		tmp = fma(y, Float64(Float64(t - x) / a), x);
          	else
          		tmp = fma(Float64(-y), Float64(Float64(-x) / z), t);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.5e-104], N[Not[LessEqual[a, 1.72e+77]], $MachinePrecision]], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], N[((-y) * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -6.5 \cdot 10^{-104} \lor \neg \left(a \leq 1.72 \cdot 10^{+77}\right):\\
          \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-y, \frac{-x}{z}, t\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -6.49999999999999991e-104 or 1.71999999999999991e77 < a

            1. Initial program 73.3%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
            5. Applied rewrites67.4%

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

            if -6.49999999999999991e-104 < a < 1.71999999999999991e77

            1. Initial program 70.5%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              6. lift--.f64N/A

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

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              8. lift--.f6463.7

                \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
            5. Applied rewrites63.7%

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
              8. lift--.f6478.7

                \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
            8. Applied rewrites78.7%

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

              \[\leadsto \mathsf{fma}\left(-y, \frac{-1 \cdot x}{z}, t\right) \]
            10. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{fma}\left(-y, \frac{\mathsf{neg}\left(x\right)}{z}, t\right) \]
              2. lift-neg.f6465.6

                \[\leadsto \mathsf{fma}\left(-y, \frac{-x}{z}, t\right) \]
            11. Applied rewrites65.6%

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

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

          Alternative 13: 46.7% accurate, 0.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.35 \cdot 10^{+148} \lor \neg \left(a \leq 2.45 \cdot 10^{+92}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (or (<= a -2.35e+148) (not (<= a 2.45e+92))) x (fma (- y) (/ t z) t)))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if ((a <= -2.35e+148) || !(a <= 2.45e+92)) {
          		tmp = x;
          	} else {
          		tmp = fma(-y, (t / z), t);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if ((a <= -2.35e+148) || !(a <= 2.45e+92))
          		tmp = x;
          	else
          		tmp = fma(Float64(-y), Float64(t / z), t);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.35e+148], N[Not[LessEqual[a, 2.45e+92]], $MachinePrecision]], x, N[((-y) * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -2.35 \cdot 10^{+148} \lor \neg \left(a \leq 2.45 \cdot 10^{+92}\right):\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -2.3499999999999999e148 or 2.4500000000000001e92 < a

            1. Initial program 77.5%

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

              \[\leadsto \color{blue}{x} \]
            4. Step-by-step derivation
              1. Applied rewrites60.0%

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

              if -2.3499999999999999e148 < a < 2.4500000000000001e92

              1. Initial program 69.2%

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
                6. lift--.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
                8. lift--.f6455.7

                  \[\leadsto \mathsf{fma}\left(\left(t - x\right) \cdot \frac{y - z}{z}, -1, x\right) \]
              5. Applied rewrites55.7%

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(-y, \frac{t - x}{z}, t\right) \]
                8. lift--.f6469.4

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

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

                \[\leadsto \mathsf{fma}\left(-y, \frac{t}{z}, t\right) \]
              10. Step-by-step derivation
                1. Applied rewrites47.0%

                  \[\leadsto \mathsf{fma}\left(-y, \frac{t}{z}, t\right) \]
              11. Recombined 2 regimes into one program.
              12. Final simplification51.2%

                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.35 \cdot 10^{+148} \lor \neg \left(a \leq 2.45 \cdot 10^{+92}\right):\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-y, \frac{t}{z}, t\right)\\ \end{array} \]
              13. Add Preprocessing

              Alternative 14: 37.6% accurate, 2.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1650000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+63}:\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= a -1650000.0) x (if (<= a 1.5e+63) t x)))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (a <= -1650000.0) {
              		tmp = x;
              	} else if (a <= 1.5e+63) {
              		tmp = t;
              	} else {
              		tmp = x;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: tmp
                  if (a <= (-1650000.0d0)) then
                      tmp = x
                  else if (a <= 1.5d+63) then
                      tmp = t
                  else
                      tmp = x
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (a <= -1650000.0) {
              		tmp = x;
              	} else if (a <= 1.5e+63) {
              		tmp = t;
              	} else {
              		tmp = x;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if a <= -1650000.0:
              		tmp = x
              	elif a <= 1.5e+63:
              		tmp = t
              	else:
              		tmp = x
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (a <= -1650000.0)
              		tmp = x;
              	elseif (a <= 1.5e+63)
              		tmp = t;
              	else
              		tmp = x;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (a <= -1650000.0)
              		tmp = x;
              	elseif (a <= 1.5e+63)
              		tmp = t;
              	else
              		tmp = x;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1650000.0], x, If[LessEqual[a, 1.5e+63], t, x]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;a \leq -1650000:\\
              \;\;\;\;x\\
              
              \mathbf{elif}\;a \leq 1.5 \cdot 10^{+63}:\\
              \;\;\;\;t\\
              
              \mathbf{else}:\\
              \;\;\;\;x\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if a < -1.65e6 or 1.5e63 < a

                1. Initial program 73.7%

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

                  \[\leadsto \color{blue}{x} \]
                4. Step-by-step derivation
                  1. Applied rewrites49.2%

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

                  if -1.65e6 < a < 1.5e63

                  1. Initial program 70.7%

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

                    \[\leadsto \color{blue}{t} \]
                  4. Step-by-step derivation
                    1. Applied rewrites35.7%

                      \[\leadsto \color{blue}{t} \]
                  5. Recombined 2 regimes into one program.
                  6. Add Preprocessing

                  Alternative 15: 24.2% accurate, 29.0× speedup?

                  \[\begin{array}{l} \\ t \end{array} \]
                  (FPCore (x y z t a) :precision binary64 t)
                  double code(double x, double y, double z, double t, double a) {
                  	return t;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      code = t
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a) {
                  	return t;
                  }
                  
                  def code(x, y, z, t, a):
                  	return t
                  
                  function code(x, y, z, t, a)
                  	return t
                  end
                  
                  function tmp = code(x, y, z, t, a)
                  	tmp = t;
                  end
                  
                  code[x_, y_, z_, t_, a_] := t
                  
                  \begin{array}{l}
                  
                  \\
                  t
                  \end{array}
                  
                  Derivation
                  1. Initial program 71.9%

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

                    \[\leadsto \color{blue}{t} \]
                  4. Step-by-step derivation
                    1. Applied rewrites23.6%

                      \[\leadsto \color{blue}{t} \]
                    2. Add Preprocessing

                    Developer Target 1: 83.8% accurate, 0.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (let* ((t_1 (- t (* (/ y z) (- t x)))))
                       (if (< z -1.2536131056095036e+188)
                         t_1
                         (if (< z 4.446702369113811e+64)
                           (+ x (/ (- y z) (/ (- a z) (- t x))))
                           t_1))))
                    double code(double x, double y, double z, double t, double a) {
                    	double t_1 = t - ((y / z) * (t - x));
                    	double tmp;
                    	if (z < -1.2536131056095036e+188) {
                    		tmp = t_1;
                    	} else if (z < 4.446702369113811e+64) {
                    		tmp = x + ((y - z) / ((a - z) / (t - x)));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8) :: t_1
                        real(8) :: tmp
                        t_1 = t - ((y / z) * (t - x))
                        if (z < (-1.2536131056095036d+188)) then
                            tmp = t_1
                        else if (z < 4.446702369113811d+64) then
                            tmp = x + ((y - z) / ((a - z) / (t - x)))
                        else
                            tmp = t_1
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	double t_1 = t - ((y / z) * (t - x));
                    	double tmp;
                    	if (z < -1.2536131056095036e+188) {
                    		tmp = t_1;
                    	} else if (z < 4.446702369113811e+64) {
                    		tmp = x + ((y - z) / ((a - z) / (t - x)));
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	t_1 = t - ((y / z) * (t - x))
                    	tmp = 0
                    	if z < -1.2536131056095036e+188:
                    		tmp = t_1
                    	elif z < 4.446702369113811e+64:
                    		tmp = x + ((y - z) / ((a - z) / (t - x)))
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
                    	tmp = 0.0
                    	if (z < -1.2536131056095036e+188)
                    		tmp = t_1;
                    	elseif (z < 4.446702369113811e+64)
                    		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	t_1 = t - ((y / z) * (t - x));
                    	tmp = 0.0;
                    	if (z < -1.2536131056095036e+188)
                    		tmp = t_1;
                    	elseif (z < 4.446702369113811e+64)
                    		tmp = x + ((y - z) / ((a - z) / (t - x)));
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
                    \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
                    \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    \end{array}
                    

                    Reproduce

                    ?
                    herbie shell --seed 2025051 
                    (FPCore (x y z t a)
                      :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                      :precision binary64
                    
                      :alt
                      (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
                    
                      (+ x (/ (* (- y z) (- t x)) (- a z))))