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

Percentage Accurate: 67.9% → 88.6%
Time: 12.3s
Alternatives: 21
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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.9% 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: 88.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2000000000000001e204 or 4.60000000000000006e200 < t

    1. Initial program 22.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{z - t}{\color{blue}{\left(\frac{a}{t} - 1\right) \cdot t}}, y - x, x\right) \]
    8. 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}} \]
    9. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
      2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000001e204 < t < 4.60000000000000006e200

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.0% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.49999999999999949e121 or 4.99999999999999991e66 < t

    1. Initial program 38.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{z - t}{\color{blue}{\left(\frac{a}{t} - 1\right) \cdot t}}, y - x, x\right) \]
    8. 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}} \]
    9. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
      2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.49999999999999949e121 < t < -8.50000000000000038e-14

    1. Initial program 88.1%

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

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

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

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

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

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

    if -8.50000000000000038e-14 < t < 4.99999999999999991e66

    1. Initial program 90.8%

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

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

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

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

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

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

Alternative 3: 76.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.1e49 or 4.99999999999999991e66 < t

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{z - t}{\color{blue}{\left(\frac{a}{t} - 1\right) \cdot t}}, y - x, x\right) \]
    8. 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}} \]
    9. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
      2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.1e49 < t < 4.99999999999999991e66

    1. Initial program 89.7%

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

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

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

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

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

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

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

Alternative 4: 74.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-29} \lor \neg \left(a \leq 2.9 \cdot 10^{-51}\right):\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y - x}{a}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.99999999999999989e-29 or 2.89999999999999973e-51 < a

    1. Initial program 75.5%

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999989e-29 < a < 2.89999999999999973e-51

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\frac{z - t}{\color{blue}{\left(\frac{a}{t} - 1\right) \cdot t}}, y - x, x\right) \]
    8. 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}} \]
    9. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
      2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 45.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.6000000000000002e102 or 9.20000000000000009e142 < t

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
    6. Step-by-step derivation
      1. Applied rewrites38.2%

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

      if -3.6000000000000002e102 < t < -1.04999999999999998e-254

      1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

        if -1.04999999999999998e-254 < t < 9.20000000000000009e142

        1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot z}{a}} \]
        7. Step-by-step derivation
          1. Applied rewrites52.9%

            \[\leadsto \mathsf{fma}\left(-x, \color{blue}{\frac{z}{a}}, x\right) \]
        8. Recombined 3 regimes into one program.
        9. Final simplification51.9%

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+102}:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-254}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, z, x\right)\\ \mathbf{elif}\;t \leq 9.2 \cdot 10^{+142}:\\ \;\;\;\;\mathsf{fma}\left(-x, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \end{array} \]
        10. Add Preprocessing

        Alternative 6: 74.7% accurate, 0.8× speedup?

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

          1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

          if -1.99999999999999989e-29 < a < 4.80000000000000005e-42

          1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{z - t}{\color{blue}{\left(\frac{a}{t} - 1\right) \cdot t}}, y - x, x\right) \]
          8. 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}} \]
          9. Step-by-step derivation
            1. fp-cancel-sub-sign-invN/A

              \[\leadsto \color{blue}{\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) + \left(\mathsf{neg}\left(-1\right)\right) \cdot \frac{a \cdot \left(y - x\right)}{t}} \]
            2. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 4.80000000000000005e-42 < a

          1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 67.5% accurate, 0.8× speedup?

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

          1. Initial program 75.7%

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

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

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

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

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

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

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

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

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

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

          if -2.50000000000000001e-42 < a < 1.14999999999999997e-52

          1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto y \cdot \color{blue}{\frac{z - t}{a - t}} \]
          9. Recombined 2 regimes into one program.
          10. Final simplification73.5%

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

          Alternative 8: 34.0% accurate, 0.8× speedup?

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

            1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x + \color{blue}{\frac{t \cdot x}{a - t}} \]
            7. Step-by-step derivation
              1. Applied rewrites44.7%

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

                \[\leadsto \mathsf{fma}\left(t, \frac{x}{a}, x\right) \]
              3. Step-by-step derivation
                1. Applied rewrites44.5%

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

                if -4.1e15 < a < 3.69999999999999991e-202

                1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot z}{a - t}} \]
                7. Step-by-step derivation
                  1. Applied rewrites33.3%

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

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

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

                    if 3.69999999999999991e-202 < a < 3.19999999999999986e-5

                    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                    7. Step-by-step derivation
                      1. Applied rewrites34.0%

                        \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification37.6%

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

                    Alternative 9: 66.7% accurate, 0.8× speedup?

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

                      1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -5.5000000000000001e45 < t < 8.7999999999999999e30

                        1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                        6. Step-by-step derivation
                          1. lower-/.f6476.3

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

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

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

                      Alternative 10: 29.8% accurate, 0.8× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{if}\;t \leq -0.23:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-126}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+176}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (let* ((t_1 (fma 1.0 (- y x) x)))
                         (if (<= t -0.23)
                           t_1
                           (if (<= t 2.9e-126)
                             (* y (/ z a))
                             (if (<= t 1.65e+176) (* x (/ z t)) t_1)))))
                      double code(double x, double y, double z, double t, double a) {
                      	double t_1 = fma(1.0, (y - x), x);
                      	double tmp;
                      	if (t <= -0.23) {
                      		tmp = t_1;
                      	} else if (t <= 2.9e-126) {
                      		tmp = y * (z / a);
                      	} else if (t <= 1.65e+176) {
                      		tmp = x * (z / t);
                      	} else {
                      		tmp = t_1;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	t_1 = fma(1.0, Float64(y - x), x)
                      	tmp = 0.0
                      	if (t <= -0.23)
                      		tmp = t_1;
                      	elseif (t <= 2.9e-126)
                      		tmp = Float64(y * Float64(z / a));
                      	elseif (t <= 1.65e+176)
                      		tmp = Float64(x * Float64(z / t));
                      	else
                      		tmp = t_1;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -0.23], t$95$1, If[LessEqual[t, 2.9e-126], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+176], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      t_1 := \mathsf{fma}\left(1, y - x, x\right)\\
                      \mathbf{if}\;t \leq -0.23:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;t \leq 2.9 \cdot 10^{-126}:\\
                      \;\;\;\;y \cdot \frac{z}{a}\\
                      
                      \mathbf{elif}\;t \leq 1.65 \cdot 10^{+176}:\\
                      \;\;\;\;x \cdot \frac{z}{t}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_1\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if t < -0.23000000000000001 or 1.65000000000000012e176 < t

                        1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                        6. Step-by-step derivation
                          1. Applied rewrites36.3%

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

                          if -0.23000000000000001 < t < 2.89999999999999988e-126

                          1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                          9. Step-by-step derivation
                            1. Applied rewrites35.2%

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

                            if 2.89999999999999988e-126 < t < 1.65000000000000012e176

                            1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot z}{a - t}} \]
                            7. Step-by-step derivation
                              1. Applied rewrites30.6%

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

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

                                  \[\leadsto x \cdot \frac{z}{\color{blue}{t}} \]
                              4. Recombined 3 regimes into one program.
                              5. Final simplification32.4%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.23:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-126}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+176}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 11: 28.5% accurate, 0.8× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{if}\;t \leq -0.23:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-126}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+176}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (let* ((t_1 (fma 1.0 (- y x) x)))
                                 (if (<= t -0.23)
                                   t_1
                                   (if (<= t 2.9e-126)
                                     (/ (* y z) a)
                                     (if (<= t 1.65e+176) (* x (/ z t)) t_1)))))
                              double code(double x, double y, double z, double t, double a) {
                              	double t_1 = fma(1.0, (y - x), x);
                              	double tmp;
                              	if (t <= -0.23) {
                              		tmp = t_1;
                              	} else if (t <= 2.9e-126) {
                              		tmp = (y * z) / a;
                              	} else if (t <= 1.65e+176) {
                              		tmp = x * (z / t);
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              function code(x, y, z, t, a)
                              	t_1 = fma(1.0, Float64(y - x), x)
                              	tmp = 0.0
                              	if (t <= -0.23)
                              		tmp = t_1;
                              	elseif (t <= 2.9e-126)
                              		tmp = Float64(Float64(y * z) / a);
                              	elseif (t <= 1.65e+176)
                              		tmp = Float64(x * Float64(z / t));
                              	else
                              		tmp = t_1;
                              	end
                              	return tmp
                              end
                              
                              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -0.23], t$95$1, If[LessEqual[t, 2.9e-126], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.65e+176], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              t_1 := \mathsf{fma}\left(1, y - x, x\right)\\
                              \mathbf{if}\;t \leq -0.23:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;t \leq 2.9 \cdot 10^{-126}:\\
                              \;\;\;\;\frac{y \cdot z}{a}\\
                              
                              \mathbf{elif}\;t \leq 1.65 \cdot 10^{+176}:\\
                              \;\;\;\;x \cdot \frac{z}{t}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_1\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if t < -0.23000000000000001 or 1.65000000000000012e176 < t

                                1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                6. Step-by-step derivation
                                  1. Applied rewrites36.3%

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

                                  if -0.23000000000000001 < t < 2.89999999999999988e-126

                                  1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{y \cdot z}{\color{blue}{a}} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites31.3%

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

                                    if 2.89999999999999988e-126 < t < 1.65000000000000012e176

                                    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot z}{a - t}} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites30.6%

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

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

                                          \[\leadsto x \cdot \frac{z}{\color{blue}{t}} \]
                                      4. Recombined 3 regimes into one program.
                                      5. Final simplification30.8%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.23:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-126}:\\ \;\;\;\;\frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{+176}:\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 12: 63.0% accurate, 0.9× speedup?

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

                                        1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(z - t\right)}{t}} \]
                                        9. Step-by-step derivation
                                          1. Applied rewrites55.8%

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

                                          if -4.2999999999999999e49 < t < 5.20000000000000024e66

                                          1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                                          6. Step-by-step derivation
                                            1. lower-/.f6473.9

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

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

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

                                        Alternative 13: 58.2% accurate, 0.9× speedup?

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

                                          1. Initial program 47.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot y}{a - t}} \]
                                          9. Step-by-step derivation
                                            1. Applied rewrites43.4%

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

                                            if -2.9e49 < t < 3.10000000000000004e141

                                            1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                                            6. Step-by-step derivation
                                              1. lower-/.f6471.3

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

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

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

                                          Alternative 14: 55.0% accurate, 0.9× speedup?

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

                                            1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                                            6. Step-by-step derivation
                                              1. lower-/.f6465.9

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

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

                                            if -4.2e-175 < a < 6.09999999999999971e-93

                                            1. Initial program 66.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(-z\right) \cdot \color{blue}{\frac{y - x}{t}} \]
                                            10. Recombined 2 regimes into one program.
                                            11. Final simplification62.2%

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

                                            Alternative 15: 62.9% accurate, 0.9× speedup?

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

                                              1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

                                              if -5.5000000000000001e45 < t < 5.20000000000000024e66

                                              1. Initial program 89.7%

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                                              6. Step-by-step derivation
                                                1. lower-/.f6474.3

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

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

                                              if 5.20000000000000024e66 < t

                                              1. Initial program 34.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto -1 \cdot \color{blue}{\frac{y \cdot \left(z - t\right)}{t}} \]
                                              9. Step-by-step derivation
                                                1. Applied rewrites49.8%

                                                  \[\leadsto \left(-y\right) \cdot \color{blue}{\frac{z - t}{t}} \]
                                              10. Recombined 3 regimes into one program.
                                              11. Final simplification67.8%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+45}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{+66}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-y\right) \cdot \frac{z - t}{t}\\ \end{array} \]
                                              12. Add Preprocessing

                                              Alternative 16: 56.0% accurate, 0.9× speedup?

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

                                                1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                                6. Step-by-step derivation
                                                  1. Applied rewrites40.0%

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

                                                  if -3.04999999999999989e134 < t < 9.50000000000000001e142

                                                  1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y - x, x\right) \]
                                                  6. Step-by-step derivation
                                                    1. lower-/.f6466.5

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

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

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

                                                Alternative 17: 55.0% accurate, 0.9× speedup?

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

                                                  1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                                  6. Step-by-step derivation
                                                    1. Applied rewrites40.0%

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

                                                    if -3.04999999999999989e134 < t < 9.50000000000000001e142

                                                    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 18: 47.4% accurate, 1.0× speedup?

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

                                                    1. Initial program 42.4%

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites38.2%

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

                                                      if -3.6000000000000002e102 < t < 9.50000000000000001e142

                                                      1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \mathsf{fma}\left(\frac{y}{a}, z, x\right) \]
                                                      8. Recombined 2 regimes into one program.
                                                      9. Final simplification49.9%

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

                                                      Alternative 19: 27.3% accurate, 1.0× speedup?

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

                                                        1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot z}{a - t}} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites36.7%

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

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

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

                                                            if -3.79999999999999996e-12 < z < 2.49999999999999991e-65

                                                            1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                                            6. Step-by-step derivation
                                                              1. Applied rewrites27.3%

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

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-12} \lor \neg \left(z \leq 2.5 \cdot 10^{-65}\right):\\ \;\;\;\;x \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(1, y - x, x\right)\\ \end{array} \]
                                                            9. Add Preprocessing

                                                            Alternative 20: 19.7% accurate, 2.9× speedup?

                                                            \[\begin{array}{l} \\ \mathsf{fma}\left(1, y - x, x\right) \end{array} \]
                                                            (FPCore (x y z t a) :precision binary64 (fma 1.0 (- y x) x))
                                                            double code(double x, double y, double z, double t, double a) {
                                                            	return fma(1.0, (y - x), x);
                                                            }
                                                            
                                                            function code(x, y, z, t, a)
                                                            	return fma(1.0, Float64(y - x), x)
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_] := N[(1.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \mathsf{fma}\left(1, y - x, x\right)
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Initial program 73.7%

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \mathsf{fma}\left(\color{blue}{1}, y - x, x\right) \]
                                                              2. Add Preprocessing

                                                              Alternative 21: 2.8% accurate, 29.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto x + \color{blue}{-1 \cdot x} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites2.9%

                                                                  \[\leadsto 0 \cdot \color{blue}{x} \]
                                                                2. Taylor expanded in x around 0

                                                                  \[\leadsto 0 \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites2.9%

                                                                    \[\leadsto 0 \]
                                                                  2. Final simplification2.9%

                                                                    \[\leadsto 0 \]
                                                                  3. Add Preprocessing

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

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

                                                                  Reproduce

                                                                  ?
                                                                  herbie shell --seed 2024364 
                                                                  (FPCore (x y z t a)
                                                                    :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                                    :precision binary64
                                                                  
                                                                    :alt
                                                                    (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                                                  
                                                                    (+ x (/ (* (- y x) (- z t)) (- a t))))