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

Percentage Accurate: 67.8% → 90.6%
Time: 4.5s
Alternatives: 18
Speedup: 0.8×

Specification

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

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

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 18 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 67.8% accurate, 1.0× speedup?

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

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

Alternative 1: 90.6% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 9.2%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.6% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 9.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 73.5% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.00000000000000005e32 or 4.80000000000000035e38 < a

    1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

    if -1.00000000000000005e32 < a < 4.80000000000000035e38

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.8000000000000001e43 or 2.9000000000000002e-12 < z

    1. Initial program 69.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
      7. lift--.f6458.3

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      7. sub-divN/A

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

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      10. frac-2negN/A

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

        \[\leadsto \frac{-1 \cdot \left(y - x\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      12. negate-sub2N/A

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{t - a} \cdot z \]
      17. negate-sub2N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      18. frac-2negN/A

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      20. lift--.f64N/A

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      21. lift--.f6470.2

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
    6. Applied rewrites70.2%

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

    if -7.8000000000000001e43 < z < 2.9000000000000002e-12

    1. Initial program 66.5%

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

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

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

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

        \[\leadsto x + \frac{\mathsf{neg}\left(t \cdot \left(y - x\right)\right)}{\mathsf{neg}\left(\left(t - a\right)\right)} \]
      4. frac-2neg-revN/A

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

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

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

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot t}{t - a} \]
      9. lower--.f6453.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.8000000000000001e43 or 2.9000000000000002e-12 < z

    1. Initial program 69.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
      7. lift--.f6458.3

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      7. sub-divN/A

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

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      10. frac-2negN/A

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

        \[\leadsto \frac{-1 \cdot \left(y - x\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      12. negate-sub2N/A

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{t - a} \cdot z \]
      17. negate-sub2N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      18. frac-2negN/A

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      20. lift--.f64N/A

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      21. lift--.f6470.2

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
    6. Applied rewrites70.2%

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

    if -7.8000000000000001e43 < z < 2.9000000000000002e-12

    1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{t \cdot \left(y - x\right)}{t - a} \]
      2. negate-sub2N/A

        \[\leadsto x + \frac{t \cdot \left(y - x\right)}{t - a} \]
      3. negate-sub2N/A

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.2% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq -2.6 \cdot 10^{-60}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.0999999999999999e86 or 2.9000000000000002e-12 < z

    1. Initial program 69.5%

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
      7. lift--.f6458.9

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      7. sub-divN/A

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

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      10. frac-2negN/A

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

        \[\leadsto \frac{-1 \cdot \left(y - x\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      12. negate-sub2N/A

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{t - a} \cdot z \]
      17. negate-sub2N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      18. frac-2negN/A

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      20. lift--.f64N/A

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      21. lift--.f6471.2

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
    6. Applied rewrites71.2%

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

    if -2.0999999999999999e86 < z < -2.5999999999999998e-60

    1. Initial program 71.0%

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y - x}{a}, x\right) \]
    4. Applied rewrites47.9%

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

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

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

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

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

        \[\leadsto y \cdot \frac{z - t}{\color{blue}{a} - t} \]
      5. lift--.f6449.6

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

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

    if -2.5999999999999998e-60 < z < 2.9000000000000002e-12

    1. Initial program 65.5%

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

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

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

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

        \[\leadsto x + \frac{\mathsf{neg}\left(t \cdot \left(y - x\right)\right)}{\mathsf{neg}\left(\left(t - a\right)\right)} \]
      4. frac-2neg-revN/A

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

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

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

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

        \[\leadsto x + \frac{\left(y - x\right) \cdot t}{t - a} \]
      9. lower--.f6455.1

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

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

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

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

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

        \[\leadsto x + t \cdot \frac{y}{t - \color{blue}{a}} \]
      4. lift--.f6462.8

        \[\leadsto x + t \cdot \frac{y}{t - a} \]
    7. Applied rewrites62.8%

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

Alternative 7: 65.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -28000000:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8e7 or 3.8000000000000001e71 < t

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{z - t}{\color{blue}{a} - t} \]
      5. lift--.f6461.0

        \[\leadsto y \cdot \frac{z - t}{a - \color{blue}{t}} \]
    7. Applied rewrites61.0%

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

    if -2.8e7 < t < 3.6000000000000001e-184

    1. Initial program 89.9%

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

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

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

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

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

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

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

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

    if 3.6000000000000001e-184 < t < 3.8000000000000001e71

    1. Initial program 83.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
      7. lift--.f6445.3

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

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

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

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

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

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

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

        \[\leadsto z \cdot \color{blue}{\frac{y - x}{a - t}} \]
      7. sub-divN/A

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

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      10. frac-2negN/A

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

        \[\leadsto \frac{-1 \cdot \left(y - x\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      12. negate-sub2N/A

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

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

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

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

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{t - a} \cdot z \]
      17. negate-sub2N/A

        \[\leadsto \frac{\mathsf{neg}\left(\left(y - x\right)\right)}{\mathsf{neg}\left(\left(a - t\right)\right)} \cdot z \]
      18. frac-2negN/A

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

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      20. lift--.f64N/A

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
      21. lift--.f6447.8

        \[\leadsto \frac{y - x}{a - t} \cdot z \]
    6. Applied rewrites47.8%

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

Alternative 8: 64.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -28000000:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8e7 or 3.8000000000000001e71 < t

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{z - t}{\color{blue}{a} - t} \]
      5. lift--.f6461.0

        \[\leadsto y \cdot \frac{z - t}{a - \color{blue}{t}} \]
    7. Applied rewrites61.0%

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

    if -2.8e7 < t < 6.0000000000000003e-70

    1. Initial program 89.7%

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

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

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

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

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

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

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

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

    if 6.0000000000000003e-70 < t < 3.8000000000000001e71

    1. Initial program 79.2%

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
      7. lift--.f6442.0

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 63.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -28000000:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8e7 or 1.75e52 < t

    1. Initial program 43.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \frac{z - t}{\color{blue}{a} - t} \]
      5. lift--.f6460.7

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

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

    if -2.8e7 < t < 1.75e52

    1. Initial program 88.1%

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

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

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

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

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

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

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

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

Alternative 10: 58.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+176}:\\
\;\;\;\;y\\

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

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.59999999999999992e176 or 5.00000000000000008e99 < t

    1. Initial program 32.1%

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

      \[\leadsto \color{blue}{y} \]
    3. Step-by-step derivation
      1. Applied rewrites53.1%

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

      if -4.59999999999999992e176 < t < 5.00000000000000008e99

      1. Initial program 81.3%

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

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

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

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

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

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

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

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

    Alternative 11: 50.6% accurate, 0.8× speedup?

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

      1. Initial program 35.0%

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

        \[\leadsto \color{blue}{y} \]
      3. Step-by-step derivation
        1. Applied rewrites50.9%

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

        if -4.59999999999999992e176 < t < 3e-68

        1. Initial program 82.3%

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

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

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

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

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

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

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

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

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

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

          if 3e-68 < t < 3.8000000000000001e71

          1. Initial program 78.9%

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

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

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

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

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

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

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

              \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
            7. lift--.f6441.6

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

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

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

              \[\leadsto \frac{\left(y - x\right) \cdot z}{\mathsf{neg}\left(t\right)} \]
            2. lower-neg.f6430.8

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

            \[\leadsto \frac{\left(y - x\right) \cdot z}{-t} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 12: 49.6% accurate, 0.8× speedup?

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

          1. Initial program 35.0%

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

            \[\leadsto \color{blue}{y} \]
          3. Step-by-step derivation
            1. Applied rewrites50.9%

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

            if -4.59999999999999992e176 < t < 2.29999999999999998e-44

            1. Initial program 82.4%

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(z, \frac{y - x}{a}, x\right) \]
            4. Applied rewrites63.3%

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

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

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

              if 2.29999999999999998e-44 < t < 3.8000000000000001e71

              1. Initial program 77.5%

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

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

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

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

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

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

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

                  \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
                7. lift--.f6440.1

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

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

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

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

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

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

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

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

                  \[\leadsto \left(y \cdot \frac{z}{x \cdot \left(a - t\right)} + \frac{\mathsf{neg}\left(z\right)}{a - t}\right) \cdot x \]
                7. negate-sub2N/A

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(y, \frac{z}{\left(a - t\right) \cdot x}, \frac{z}{t - a}\right) \cdot x \]
                15. lift--.f6436.7

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

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

                \[\leadsto \frac{z}{t - a} \cdot x \]
              9. Step-by-step derivation
                1. lift-/.f64N/A

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

                  \[\leadsto \frac{z}{t - a} \cdot x \]
              10. Applied rewrites24.5%

                \[\leadsto \frac{z}{t - a} \cdot x \]
            7. Recombined 3 regimes into one program.
            8. Add Preprocessing

            Alternative 13: 49.5% accurate, 1.1× speedup?

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

              1. Initial program 38.0%

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

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

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

                if -4.59999999999999992e176 < t < 7.40000000000000017e34

                1. Initial program 82.4%

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(z, \frac{y - x}{a}, x\right) \]
                4. Applied rewrites61.9%

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

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

                    \[\leadsto \mathsf{fma}\left(z, \frac{y}{a}, x\right) \]
                7. Recombined 2 regimes into one program.
                8. Add Preprocessing

                Alternative 14: 37.1% accurate, 0.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+112}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-272}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-70}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+71}:\\ \;\;\;\;\frac{z}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (<= t -4.4e+112)
                   y
                   (if (<= t 1.85e-272)
                     (/ (* y z) a)
                     (if (<= t 1.35e-70) x (if (<= t 3.8e+71) (* (/ z t) x) y)))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (t <= -4.4e+112) {
                		tmp = y;
                	} else if (t <= 1.85e-272) {
                		tmp = (y * z) / a;
                	} else if (t <= 1.35e-70) {
                		tmp = x;
                	} else if (t <= 3.8e+71) {
                		tmp = (z / t) * x;
                	} else {
                		tmp = y;
                	}
                	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 (t <= (-4.4d+112)) then
                        tmp = y
                    else if (t <= 1.85d-272) then
                        tmp = (y * z) / a
                    else if (t <= 1.35d-70) then
                        tmp = x
                    else if (t <= 3.8d+71) then
                        tmp = (z / t) * x
                    else
                        tmp = y
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (t <= -4.4e+112) {
                		tmp = y;
                	} else if (t <= 1.85e-272) {
                		tmp = (y * z) / a;
                	} else if (t <= 1.35e-70) {
                		tmp = x;
                	} else if (t <= 3.8e+71) {
                		tmp = (z / t) * x;
                	} else {
                		tmp = y;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	tmp = 0
                	if t <= -4.4e+112:
                		tmp = y
                	elif t <= 1.85e-272:
                		tmp = (y * z) / a
                	elif t <= 1.35e-70:
                		tmp = x
                	elif t <= 3.8e+71:
                		tmp = (z / t) * x
                	else:
                		tmp = y
                	return tmp
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if (t <= -4.4e+112)
                		tmp = y;
                	elseif (t <= 1.85e-272)
                		tmp = Float64(Float64(y * z) / a);
                	elseif (t <= 1.35e-70)
                		tmp = x;
                	elseif (t <= 3.8e+71)
                		tmp = Float64(Float64(z / t) * x);
                	else
                		tmp = y;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	tmp = 0.0;
                	if (t <= -4.4e+112)
                		tmp = y;
                	elseif (t <= 1.85e-272)
                		tmp = (y * z) / a;
                	elseif (t <= 1.35e-70)
                		tmp = x;
                	elseif (t <= 3.8e+71)
                		tmp = (z / t) * x;
                	else
                		tmp = y;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+112], y, If[LessEqual[t, 1.85e-272], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.35e-70], x, If[LessEqual[t, 3.8e+71], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], y]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t \leq -4.4 \cdot 10^{+112}:\\
                \;\;\;\;y\\
                
                \mathbf{elif}\;t \leq 1.85 \cdot 10^{-272}:\\
                \;\;\;\;\frac{y \cdot z}{a}\\
                
                \mathbf{elif}\;t \leq 1.35 \cdot 10^{-70}:\\
                \;\;\;\;x\\
                
                \mathbf{elif}\;t \leq 3.8 \cdot 10^{+71}:\\
                \;\;\;\;\frac{z}{t} \cdot x\\
                
                \mathbf{else}:\\
                \;\;\;\;y\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if t < -4.3999999999999999e112 or 3.8000000000000001e71 < t

                  1. Initial program 36.4%

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

                    \[\leadsto \color{blue}{y} \]
                  3. Step-by-step derivation
                    1. Applied rewrites49.1%

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

                    if -4.3999999999999999e112 < t < 1.8499999999999998e-272

                    1. Initial program 84.1%

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, \frac{y - x}{a}, x\right) \]
                    4. Applied rewrites63.9%

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

                      \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                    6. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto \frac{y \cdot z}{a} \]
                      2. lower-*.f6422.6

                        \[\leadsto \frac{y \cdot z}{a} \]
                    7. Applied rewrites22.6%

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

                    if 1.8499999999999998e-272 < t < 1.3500000000000001e-70

                    1. Initial program 90.6%

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

                      \[\leadsto \color{blue}{x} \]
                    3. Step-by-step derivation
                      1. Applied rewrites36.5%

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

                      if 1.3500000000000001e-70 < t < 3.8000000000000001e71

                      1. Initial program 79.3%

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

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

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

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

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

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

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

                          \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
                        7. lift--.f6442.1

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

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

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

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

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

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

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

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

                          \[\leadsto \left(y \cdot \frac{z}{x \cdot \left(a - t\right)} + \frac{\mathsf{neg}\left(z\right)}{a - t}\right) \cdot x \]
                        7. negate-sub2N/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{z}{t - a} \cdot x \]
                      9. Step-by-step derivation
                        1. lift-/.f64N/A

                          \[\leadsto \frac{z}{t - a} \cdot x \]
                        2. lift--.f6424.9

                          \[\leadsto \frac{z}{t - a} \cdot x \]
                      10. Applied rewrites24.9%

                        \[\leadsto \frac{z}{t - a} \cdot x \]
                      11. Taylor expanded in t around inf

                        \[\leadsto \frac{z}{t} \cdot x \]
                      12. Step-by-step derivation
                        1. Applied rewrites19.9%

                          \[\leadsto \frac{z}{t} \cdot x \]
                      13. Recombined 4 regimes into one program.
                      14. Add Preprocessing

                      Alternative 15: 35.1% accurate, 1.0× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+112}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-101}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 3.8 \cdot 10^{+71}:\\ \;\;\;\;\frac{z}{t} \cdot x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (<= t -4.4e+112)
                         y
                         (if (<= t 4.4e-101) (* y (/ z a)) (if (<= t 3.8e+71) (* (/ z t) x) y))))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (t <= -4.4e+112) {
                      		tmp = y;
                      	} else if (t <= 4.4e-101) {
                      		tmp = y * (z / a);
                      	} else if (t <= 3.8e+71) {
                      		tmp = (z / t) * x;
                      	} else {
                      		tmp = y;
                      	}
                      	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 (t <= (-4.4d+112)) then
                              tmp = y
                          else if (t <= 4.4d-101) then
                              tmp = y * (z / a)
                          else if (t <= 3.8d+71) then
                              tmp = (z / t) * x
                          else
                              tmp = y
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if (t <= -4.4e+112) {
                      		tmp = y;
                      	} else if (t <= 4.4e-101) {
                      		tmp = y * (z / a);
                      	} else if (t <= 3.8e+71) {
                      		tmp = (z / t) * x;
                      	} else {
                      		tmp = y;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a):
                      	tmp = 0
                      	if t <= -4.4e+112:
                      		tmp = y
                      	elif t <= 4.4e-101:
                      		tmp = y * (z / a)
                      	elif t <= 3.8e+71:
                      		tmp = (z / t) * x
                      	else:
                      		tmp = y
                      	return tmp
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if (t <= -4.4e+112)
                      		tmp = y;
                      	elseif (t <= 4.4e-101)
                      		tmp = Float64(y * Float64(z / a));
                      	elseif (t <= 3.8e+71)
                      		tmp = Float64(Float64(z / t) * x);
                      	else
                      		tmp = y;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a)
                      	tmp = 0.0;
                      	if (t <= -4.4e+112)
                      		tmp = y;
                      	elseif (t <= 4.4e-101)
                      		tmp = y * (z / a);
                      	elseif (t <= 3.8e+71)
                      		tmp = (z / t) * x;
                      	else
                      		tmp = y;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+112], y, If[LessEqual[t, 4.4e-101], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e+71], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], y]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;t \leq -4.4 \cdot 10^{+112}:\\
                      \;\;\;\;y\\
                      
                      \mathbf{elif}\;t \leq 4.4 \cdot 10^{-101}:\\
                      \;\;\;\;y \cdot \frac{z}{a}\\
                      
                      \mathbf{elif}\;t \leq 3.8 \cdot 10^{+71}:\\
                      \;\;\;\;\frac{z}{t} \cdot x\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;y\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if t < -4.3999999999999999e112 or 3.8000000000000001e71 < t

                        1. Initial program 36.4%

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

                          \[\leadsto \color{blue}{y} \]
                        3. Step-by-step derivation
                          1. Applied rewrites49.1%

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

                          if -4.3999999999999999e112 < t < 4.3999999999999998e-101

                          1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto y \cdot \frac{z - t}{\color{blue}{a} - t} \]
                            5. lift--.f6444.5

                              \[\leadsto y \cdot \frac{z - t}{a - \color{blue}{t}} \]
                          7. Applied rewrites44.5%

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

                            \[\leadsto y \cdot \frac{z}{\color{blue}{a}} \]
                          9. Step-by-step derivation
                            1. lower-/.f6427.5

                              \[\leadsto y \cdot \frac{z}{a} \]
                          10. Applied rewrites27.5%

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

                          if 4.3999999999999998e-101 < t < 3.8000000000000001e71

                          1. Initial program 80.6%

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

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

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

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

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

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

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

                              \[\leadsto \frac{\left(y - x\right) \cdot z}{a - t} \]
                            7. lift--.f6443.5

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

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

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

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

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

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

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

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

                              \[\leadsto \left(y \cdot \frac{z}{x \cdot \left(a - t\right)} + \frac{\mathsf{neg}\left(z\right)}{a - t}\right) \cdot x \]
                            7. negate-sub2N/A

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(y, \frac{z}{\left(a - t\right) \cdot x}, \frac{z}{t - a}\right) \cdot x \]
                            15. lift--.f6438.9

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

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

                            \[\leadsto \frac{z}{t - a} \cdot x \]
                          9. Step-by-step derivation
                            1. lift-/.f64N/A

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

                              \[\leadsto \frac{z}{t - a} \cdot x \]
                          10. Applied rewrites25.5%

                            \[\leadsto \frac{z}{t - a} \cdot x \]
                          11. Taylor expanded in t around inf

                            \[\leadsto \frac{z}{t} \cdot x \]
                          12. Step-by-step derivation
                            1. Applied rewrites20.4%

                              \[\leadsto \frac{z}{t} \cdot x \]
                          13. Recombined 3 regimes into one program.
                          14. Add Preprocessing

                          Alternative 16: 34.1% accurate, 1.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+112}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-272}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (if (<= t -4.4e+112)
                             y
                             (if (<= t 1.85e-272) (/ (* y z) a) (if (<= t 7.8e+33) x y))))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (t <= -4.4e+112) {
                          		tmp = y;
                          	} else if (t <= 1.85e-272) {
                          		tmp = (y * z) / a;
                          	} else if (t <= 7.8e+33) {
                          		tmp = x;
                          	} else {
                          		tmp = y;
                          	}
                          	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 (t <= (-4.4d+112)) then
                                  tmp = y
                              else if (t <= 1.85d-272) then
                                  tmp = (y * z) / a
                              else if (t <= 7.8d+33) then
                                  tmp = x
                              else
                                  tmp = y
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if (t <= -4.4e+112) {
                          		tmp = y;
                          	} else if (t <= 1.85e-272) {
                          		tmp = (y * z) / a;
                          	} else if (t <= 7.8e+33) {
                          		tmp = x;
                          	} else {
                          		tmp = y;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	tmp = 0
                          	if t <= -4.4e+112:
                          		tmp = y
                          	elif t <= 1.85e-272:
                          		tmp = (y * z) / a
                          	elif t <= 7.8e+33:
                          		tmp = x
                          	else:
                          		tmp = y
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if (t <= -4.4e+112)
                          		tmp = y;
                          	elseif (t <= 1.85e-272)
                          		tmp = Float64(Float64(y * z) / a);
                          	elseif (t <= 7.8e+33)
                          		tmp = x;
                          	else
                          		tmp = y;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	tmp = 0.0;
                          	if (t <= -4.4e+112)
                          		tmp = y;
                          	elseif (t <= 1.85e-272)
                          		tmp = (y * z) / a;
                          	elseif (t <= 7.8e+33)
                          		tmp = x;
                          	else
                          		tmp = y;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.4e+112], y, If[LessEqual[t, 1.85e-272], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 7.8e+33], x, y]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;t \leq -4.4 \cdot 10^{+112}:\\
                          \;\;\;\;y\\
                          
                          \mathbf{elif}\;t \leq 1.85 \cdot 10^{-272}:\\
                          \;\;\;\;\frac{y \cdot z}{a}\\
                          
                          \mathbf{elif}\;t \leq 7.8 \cdot 10^{+33}:\\
                          \;\;\;\;x\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;y\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if t < -4.3999999999999999e112 or 7.8000000000000004e33 < t

                            1. Initial program 38.9%

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

                              \[\leadsto \color{blue}{y} \]
                            3. Step-by-step derivation
                              1. Applied rewrites47.7%

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

                              if -4.3999999999999999e112 < t < 1.8499999999999998e-272

                              1. Initial program 84.1%

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(z, \frac{y - x}{a}, x\right) \]
                              4. Applied rewrites63.9%

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

                                \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                              6. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto \frac{y \cdot z}{a} \]
                                2. lower-*.f6422.6

                                  \[\leadsto \frac{y \cdot z}{a} \]
                              7. Applied rewrites22.6%

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

                              if 1.8499999999999998e-272 < t < 7.8000000000000004e33

                              1. Initial program 88.3%

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

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

                                  \[\leadsto \color{blue}{x} \]
                              4. Recombined 3 regimes into one program.
                              5. Add Preprocessing

                              Alternative 17: 33.9% accurate, 2.1× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.6 \cdot 10^{+176}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (<= t -4.6e+176) y (if (<= t 7.8e+33) x y)))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (t <= -4.6e+176) {
                              		tmp = y;
                              	} else if (t <= 7.8e+33) {
                              		tmp = x;
                              	} else {
                              		tmp = y;
                              	}
                              	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 (t <= (-4.6d+176)) then
                                      tmp = y
                                  else if (t <= 7.8d+33) then
                                      tmp = x
                                  else
                                      tmp = y
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (t <= -4.6e+176) {
                              		tmp = y;
                              	} else if (t <= 7.8e+33) {
                              		tmp = x;
                              	} else {
                              		tmp = y;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	tmp = 0
                              	if t <= -4.6e+176:
                              		tmp = y
                              	elif t <= 7.8e+33:
                              		tmp = x
                              	else:
                              		tmp = y
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if (t <= -4.6e+176)
                              		tmp = y;
                              	elseif (t <= 7.8e+33)
                              		tmp = x;
                              	else
                              		tmp = y;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a)
                              	tmp = 0.0;
                              	if (t <= -4.6e+176)
                              		tmp = y;
                              	elseif (t <= 7.8e+33)
                              		tmp = x;
                              	else
                              		tmp = y;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.6e+176], y, If[LessEqual[t, 7.8e+33], x, y]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;t \leq -4.6 \cdot 10^{+176}:\\
                              \;\;\;\;y\\
                              
                              \mathbf{elif}\;t \leq 7.8 \cdot 10^{+33}:\\
                              \;\;\;\;x\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;y\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if t < -4.59999999999999992e176 or 7.8000000000000004e33 < t

                                1. Initial program 38.0%

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

                                  \[\leadsto \color{blue}{y} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites49.1%

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

                                  if -4.59999999999999992e176 < t < 7.8000000000000004e33

                                  1. Initial program 82.4%

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

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

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

                                  Alternative 18: 24.9% accurate, 17.9× speedup?

                                  \[\begin{array}{l} \\ x \end{array} \]
                                  (FPCore (x y z t a) :precision binary64 x)
                                  double code(double x, double y, double z, double t, double a) {
                                  	return x;
                                  }
                                  
                                  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
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a) {
                                  	return x;
                                  }
                                  
                                  def code(x, y, z, t, a):
                                  	return x
                                  
                                  function code(x, y, z, t, a)
                                  	return x
                                  end
                                  
                                  function tmp = code(x, y, z, t, a)
                                  	tmp = x;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := x
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  x
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 67.8%

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

                                    \[\leadsto \color{blue}{x} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites24.9%

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

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025110 
                                    (FPCore (x y z t a)
                                      :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                      :precision binary64
                                      (+ x (/ (* (- y x) (- z t)) (- a t))))