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

Percentage Accurate: 67.6% → 91.5%
Time: 31.5s
Alternatives: 25
Speedup: 0.8×

Specification

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

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

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

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 25 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.6% accurate, 1.0× speedup?

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

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

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

Alternative 1: 91.5% accurate, 0.4× speedup?

\[\begin{array}{l} \mathbf{if}\;t \leq -1200000000000000010626946991786816693270672485690848906838016:\\ \;\;\;\;x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\ \mathbf{elif}\;t \leq \frac{7926335344172073}{288230376151711744}:\\ \;\;\;\;x \cdot \left(-1 \cdot \frac{a - y}{z - a} + \frac{t \cdot \left(z - y\right)}{x \cdot \left(z - a\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), \left(z - y\right), \left(x - t\right), \left(z - a\right), x\right)\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (if (<=
     t
     -1200000000000000010626946991786816693270672485690848906838016)
  (- x (* (/ (- z y) (- a z)) (- t x)))
  (if (<= t 7926335344172073/288230376151711744)
    (*
     x
     (+ (* -1 (/ (- a y) (- z a))) (/ (* t (- z y)) (* x (- z a)))))
    (134-z0z1z2z3z4 (/ -1 (- z a)) (- z y) (- x t) (- z a) x))))
\begin{array}{l}
\mathbf{if}\;t \leq -1200000000000000010626946991786816693270672485690848906838016:\\
\;\;\;\;x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\

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

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


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

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\left(y - z\right) \cdot \frac{1}{a - z}\right)\right) \cdot \left(t - x\right)} \]
      10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

    if -1.2e60 < t < 0.0275

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      11. sub-negate-revN/A

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right) \cdot \left(x - t\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      15. sub-negate-revN/A

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

        \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{1}{a - z}\right), \left(z - y\right), \left(x - t\right), \left(\mathsf{neg}\left(\left(a - z\right)\right)\right), x\right)} \]
    3. Applied rewrites84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0275 < t

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      11. sub-negate-revN/A

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right) \cdot \left(x - t\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      15. sub-negate-revN/A

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

        \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{1}{a - z}\right), \left(z - y\right), \left(x - t\right), \left(\mathsf{neg}\left(\left(a - z\right)\right)\right), x\right)} \]
    3. Applied rewrites84.5%

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

Alternative 2: 91.3% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), \left(z - y\right), \left(x - t\right), \left(z - a\right), x\right)\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq \frac{-5617791046444737}{11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (134-z0z1z2z3z4 (/ -1 (- z a)) (- z y) (- x t) (- z a) x))
       (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
  (if (<=
       t_2
       -5617791046444737/11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576)
    t_1
    (if (<= t_2 0)
      (+ t (* -1 (/ (- (* y (- t x)) (* a (- t x))) z)))
      t_1))))
\begin{array}{l}
t_1 := \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), \left(z - y\right), \left(x - t\right), \left(z - a\right), x\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq \frac{-5617791046444737}{11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      11. sub-negate-revN/A

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right) \cdot \left(x - t\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      15. sub-negate-revN/A

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

        \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{1}{a - z}\right), \left(z - y\right), \left(x - t\right), \left(\mathsf{neg}\left(\left(a - z\right)\right)\right), x\right)} \]
    3. Applied rewrites84.5%

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

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

    1. Initial program 67.6%

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    3. Step-by-step derivation
      1. lower--.f6420.0%

        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
    4. Applied rewrites20.0%

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

      \[\leadsto x + -1 \cdot \color{blue}{x} \]
    6. Step-by-step derivation
      1. lower-*.f642.8%

        \[\leadsto x + -1 \cdot x \]
    7. Applied rewrites2.8%

      \[\leadsto x + -1 \cdot \color{blue}{x} \]
    8. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.7% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_1 \leq \frac{-5617791046444737}{11235582092889474423308157442431404585112356118389416079589380072358292237843810195794279832650471001320007117491962084853674360550901038905802964414967132773610493339054092829768888725077880882465817684505312860552384417646403930092119569408801702322709406917786643639996702871154982269052209770601514008576}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.6%

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

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

    1. Initial program 67.6%

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    3. Step-by-step derivation
      1. lower--.f6420.0%

        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
    4. Applied rewrites20.0%

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

      \[\leadsto x + -1 \cdot \color{blue}{x} \]
    6. Step-by-step derivation
      1. lower-*.f642.8%

        \[\leadsto x + -1 \cdot x \]
    7. Applied rewrites2.8%

      \[\leadsto x + -1 \cdot \color{blue}{x} \]
    8. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\left(y - z\right) \cdot \frac{1}{a - z}\right)\right) \cdot \left(t - x\right)} \]
      10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{a - z}} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      7. sub-negate-revN/A

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

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

        \[\leadsto x - \left(\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      10. sub-negate-revN/A

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

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

        \[\leadsto x - \left(\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{a - z}} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      13. metadata-eval83.5%

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

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

Alternative 4: 87.3% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_2 \leq \frac{-2291112313477997}{57277807836949922408837567867349676981443478344341305058882899404622128010705808318690568531649256750858719018437999440148793721514146753400890052083129159241025748615958424204533602522957957552490080016463490494951861107213475167230717574212948590592}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 50000000000000003960719125422883827062840959584985546704194967116721787948758551386272267278602882264876081416647209031203419106557526049419390978660438178426771560410745940876447333535260291112887354734608898565252528592034690824272687386622186778733613155375371021108230826846322688:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -4.0000000000000002e-236 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000004e283

    1. Initial program 67.6%

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

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

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      11. sub-negate-revN/A

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

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

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

        \[\leadsto \frac{1}{a - z} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right) \cdot \left(x - t\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
      15. sub-negate-revN/A

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

        \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{1}{a - z}\right), \left(z - y\right), \left(x - t\right), \left(\mathsf{neg}\left(\left(a - z\right)\right)\right), x\right)} \]
    3. Applied rewrites84.5%

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{x \cdot \left(a - y\right)}{z - a} \]
      5. lower--.f6439.0%

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

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

Alternative 5: 84.4% accurate, 0.7× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.35e165

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\left(y - z\right) \cdot \frac{1}{a - z}\right)\right) \cdot \left(t - x\right)} \]
      10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{a - z}} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      7. sub-negate-revN/A

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

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

        \[\leadsto x - \left(\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      10. sub-negate-revN/A

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

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

        \[\leadsto x - \left(\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{a - z}} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      13. metadata-eval83.5%

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

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

    if 1.35e165 < z

    1. Initial program 67.6%

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    3. Step-by-step derivation
      1. lower--.f6420.0%

        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
    4. Applied rewrites20.0%

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

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

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

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

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

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

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

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

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

Alternative 6: 83.7% accurate, 0.7× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 1.35e165

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\left(y - z\right) \cdot \frac{1}{a - z}\right)\right) \cdot \left(t - x\right)} \]
      10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(\frac{\mathsf{neg}\left(-1\right)}{\color{blue}{a - z}} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      7. sub-negate-revN/A

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

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

        \[\leadsto x - \left(\frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      10. sub-negate-revN/A

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

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

        \[\leadsto x - \left(\color{blue}{\frac{\mathsf{neg}\left(-1\right)}{a - z}} \cdot \left(z - y\right)\right) \cdot \left(t - x\right) \]
      13. metadata-eval83.5%

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

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

    if 1.35e165 < z

    1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
        2. lower--.f6430.6%

          \[\leadsto t \cdot \frac{z}{z - a} \]
      9. Applied rewrites30.6%

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

    Alternative 7: 83.6% accurate, 0.8× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq 1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056:\\ \;\;\;\;x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (if (<=
         z
         1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056)
      (- x (* (/ (- z y) (- a z)) (- t x)))
      (* t (/ z (- z a)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= 1.35e+165) {
    		tmp = x - (((z - y) / (a - z)) * (t - x));
    	} else {
    		tmp = t * (z / (z - a));
    	}
    	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 (z <= 1.35d+165) then
            tmp = x - (((z - y) / (a - z)) * (t - x))
        else
            tmp = t * (z / (z - a))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= 1.35e+165) {
    		tmp = x - (((z - y) / (a - z)) * (t - x));
    	} else {
    		tmp = t * (z / (z - a));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= 1.35e+165:
    		tmp = x - (((z - y) / (a - z)) * (t - x))
    	else:
    		tmp = t * (z / (z - a))
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= 1.35e+165)
    		tmp = Float64(x - Float64(Float64(Float64(z - y) / Float64(a - z)) * Float64(t - x)));
    	else
    		tmp = Float64(t * Float64(z / Float64(z - a)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= 1.35e+165)
    		tmp = x - (((z - y) / (a - z)) * (t - x));
    	else
    		tmp = t * (z / (z - a));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, 1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056], N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq 1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056:\\
    \;\;\;\;x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t \cdot \frac{z}{z - a}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < 1.35e165

      1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\left(y - z\right) \cdot \frac{1}{a - z}\right)\right) \cdot \left(t - x\right)} \]
        10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

      if 1.35e165 < z

      1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
          2. lower--.f6430.6%

            \[\leadsto t \cdot \frac{z}{z - a} \]
        9. Applied rewrites30.6%

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

      Alternative 8: 80.6% accurate, 0.8× speedup?

      \[\begin{array}{l} \mathbf{if}\;z \leq 1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056:\\ \;\;\;\;x + \frac{x - t}{z - a} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
      (FPCore (x y z t a)
        :precision binary64
        (if (<=
           z
           1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056)
        (+ x (* (/ (- x t) (- z a)) (- y z)))
        (* t (/ z (- z a)))))
      double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (z <= 1.35e+165) {
      		tmp = x + (((x - t) / (z - a)) * (y - z));
      	} else {
      		tmp = t * (z / (z - a));
      	}
      	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 (z <= 1.35d+165) then
              tmp = x + (((x - t) / (z - a)) * (y - z))
          else
              tmp = t * (z / (z - a))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double tmp;
      	if (z <= 1.35e+165) {
      		tmp = x + (((x - t) / (z - a)) * (y - z));
      	} else {
      		tmp = t * (z / (z - a));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	tmp = 0
      	if z <= 1.35e+165:
      		tmp = x + (((x - t) / (z - a)) * (y - z))
      	else:
      		tmp = t * (z / (z - a))
      	return tmp
      
      function code(x, y, z, t, a)
      	tmp = 0.0
      	if (z <= 1.35e+165)
      		tmp = Float64(x + Float64(Float64(Float64(x - t) / Float64(z - a)) * Float64(y - z)));
      	else
      		tmp = Float64(t * Float64(z / Float64(z - a)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	tmp = 0.0;
      	if (z <= 1.35e+165)
      		tmp = x + (((x - t) / (z - a)) * (y - z));
      	else
      		tmp = t * (z / (z - a));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := If[LessEqual[z, 1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056], N[(x + N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      \mathbf{if}\;z \leq 1349999999999999976834158306405081433468564668098450424901954640185304620606950559836587471378818037322790513692856978439889183474863931657115851209179973310853677056:\\
      \;\;\;\;x + \frac{x - t}{z - a} \cdot \left(y - z\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t \cdot \frac{z}{z - a}\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < 1.35e165

        1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.35e165 < z

        1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
            2. lower--.f6430.6%

              \[\leadsto t \cdot \frac{z}{z - a} \]
          9. Applied rewrites30.6%

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

        Alternative 9: 69.9% accurate, 0.5× speedup?

        \[\begin{array}{l} t_1 := x - \frac{t}{z - a} \cdot \left(y - z\right)\\ \mathbf{if}\;z \leq -18499999999999999558625001472:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq \frac{6859310779502913}{381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\ \;\;\;\;\frac{y}{\frac{z - a}{x - t}}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
        (FPCore (x y z t a)
          :precision binary64
          (let* ((t_1 (- x (* (/ t (- z a)) (- y z)))))
          (if (<= z -18499999999999999558625001472)
            t_1
            (if (<=
                 z
                 6859310779502913/381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928)
              (+ x (/ (* y (- t x)) (- a z)))
              (if (<=
                   z
                   8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176)
                t_1
                (if (<=
                     z
                     6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864)
                  (/ y (/ (- z a) (- x t)))
                  (* t (/ z (- z a)))))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = x - ((t / (z - a)) * (y - z));
        	double tmp;
        	if (z <= -1.85e+28) {
        		tmp = t_1;
        	} else if (z <= 1.8e-125) {
        		tmp = x + ((y * (t - x)) / (a - z));
        	} else if (z <= 9e+120) {
        		tmp = t_1;
        	} else if (z <= 6.6e+165) {
        		tmp = y / ((z - a) / (x - t));
        	} else {
        		tmp = t * (z / (z - a));
        	}
        	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 - ((t / (z - a)) * (y - z))
            if (z <= (-1.85d+28)) then
                tmp = t_1
            else if (z <= 1.8d-125) then
                tmp = x + ((y * (t - x)) / (a - z))
            else if (z <= 9d+120) then
                tmp = t_1
            else if (z <= 6.6d+165) then
                tmp = y / ((z - a) / (x - t))
            else
                tmp = t * (z / (z - a))
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a) {
        	double t_1 = x - ((t / (z - a)) * (y - z));
        	double tmp;
        	if (z <= -1.85e+28) {
        		tmp = t_1;
        	} else if (z <= 1.8e-125) {
        		tmp = x + ((y * (t - x)) / (a - z));
        	} else if (z <= 9e+120) {
        		tmp = t_1;
        	} else if (z <= 6.6e+165) {
        		tmp = y / ((z - a) / (x - t));
        	} else {
        		tmp = t * (z / (z - a));
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	t_1 = x - ((t / (z - a)) * (y - z))
        	tmp = 0
        	if z <= -1.85e+28:
        		tmp = t_1
        	elif z <= 1.8e-125:
        		tmp = x + ((y * (t - x)) / (a - z))
        	elif z <= 9e+120:
        		tmp = t_1
        	elif z <= 6.6e+165:
        		tmp = y / ((z - a) / (x - t))
        	else:
        		tmp = t * (z / (z - a))
        	return tmp
        
        function code(x, y, z, t, a)
        	t_1 = Float64(x - Float64(Float64(t / Float64(z - a)) * Float64(y - z)))
        	tmp = 0.0
        	if (z <= -1.85e+28)
        		tmp = t_1;
        	elseif (z <= 1.8e-125)
        		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z)));
        	elseif (z <= 9e+120)
        		tmp = t_1;
        	elseif (z <= 6.6e+165)
        		tmp = Float64(y / Float64(Float64(z - a) / Float64(x - t)));
        	else
        		tmp = Float64(t * Float64(z / Float64(z - a)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = x - ((t / (z - a)) * (y - z));
        	tmp = 0.0;
        	if (z <= -1.85e+28)
        		tmp = t_1;
        	elseif (z <= 1.8e-125)
        		tmp = x + ((y * (t - x)) / (a - z));
        	elseif (z <= 9e+120)
        		tmp = t_1;
        	elseif (z <= 6.6e+165)
        		tmp = y / ((z - a) / (x - t));
        	else
        		tmp = t * (z / (z - a));
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -18499999999999999558625001472], t$95$1, If[LessEqual[z, 6859310779502913/381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176], t$95$1, If[LessEqual[z, 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864], N[(y / N[(N[(z - a), $MachinePrecision] / N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
        
        \begin{array}{l}
        t_1 := x - \frac{t}{z - a} \cdot \left(y - z\right)\\
        \mathbf{if}\;z \leq -18499999999999999558625001472:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq \frac{6859310779502913}{381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928}:\\
        \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
        
        \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\
        \;\;\;\;\frac{y}{\frac{z - a}{x - t}}\\
        
        \mathbf{else}:\\
        \;\;\;\;t \cdot \frac{z}{z - a}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if z < -1.85e28 or 1.8000000000000001e-125 < z < 8.9999999999999995e120

          1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.85e28 < z < 1.8000000000000001e-125

            1. Initial program 67.6%

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

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

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

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

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

            if 8.9999999999999995e120 < z < 6.5999999999999997e165

            1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y}{\frac{a - z}{\color{blue}{t} - x}} \]
              8. sub-negate-revN/A

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

                \[\leadsto \frac{y}{\frac{\mathsf{neg}\left(\left(z - a\right)\right)}{t - x}} \]
              10. sub-negate-revN/A

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

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

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

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

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

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

            if 6.5999999999999997e165 < z

            1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
                2. lower--.f6430.6%

                  \[\leadsto t \cdot \frac{z}{z - a} \]
              9. Applied rewrites30.6%

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

            Alternative 10: 69.8% accurate, 0.6× speedup?

            \[\begin{array}{l} t_1 := x - \frac{t}{z - a} \cdot \left(y - z\right)\\ \mathbf{if}\;z \leq -18499999999999999558625001472:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq \frac{6859310779502913}{381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{z}{z - a}\\ \end{array} \]
            (FPCore (x y z t a)
              :precision binary64
              (let* ((t_1 (- x (* (/ t (- z a)) (- y z)))))
              (if (<= z -18499999999999999558625001472)
                t_1
                (if (<=
                     z
                     6859310779502913/381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928)
                  (+ x (/ (* y (- t x)) (- a z)))
                  (if (<=
                       z
                       8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176)
                    t_1
                    (if (<=
                         z
                         6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864)
                      (* (/ y (- z a)) (- x t))
                      (* t (/ z (- z a)))))))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = x - ((t / (z - a)) * (y - z));
            	double tmp;
            	if (z <= -1.85e+28) {
            		tmp = t_1;
            	} else if (z <= 1.8e-125) {
            		tmp = x + ((y * (t - x)) / (a - z));
            	} else if (z <= 9e+120) {
            		tmp = t_1;
            	} else if (z <= 6.6e+165) {
            		tmp = (y / (z - a)) * (x - t);
            	} else {
            		tmp = t * (z / (z - a));
            	}
            	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 - ((t / (z - a)) * (y - z))
                if (z <= (-1.85d+28)) then
                    tmp = t_1
                else if (z <= 1.8d-125) then
                    tmp = x + ((y * (t - x)) / (a - z))
                else if (z <= 9d+120) then
                    tmp = t_1
                else if (z <= 6.6d+165) then
                    tmp = (y / (z - a)) * (x - t)
                else
                    tmp = t * (z / (z - a))
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double t_1 = x - ((t / (z - a)) * (y - z));
            	double tmp;
            	if (z <= -1.85e+28) {
            		tmp = t_1;
            	} else if (z <= 1.8e-125) {
            		tmp = x + ((y * (t - x)) / (a - z));
            	} else if (z <= 9e+120) {
            		tmp = t_1;
            	} else if (z <= 6.6e+165) {
            		tmp = (y / (z - a)) * (x - t);
            	} else {
            		tmp = t * (z / (z - a));
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	t_1 = x - ((t / (z - a)) * (y - z))
            	tmp = 0
            	if z <= -1.85e+28:
            		tmp = t_1
            	elif z <= 1.8e-125:
            		tmp = x + ((y * (t - x)) / (a - z))
            	elif z <= 9e+120:
            		tmp = t_1
            	elif z <= 6.6e+165:
            		tmp = (y / (z - a)) * (x - t)
            	else:
            		tmp = t * (z / (z - a))
            	return tmp
            
            function code(x, y, z, t, a)
            	t_1 = Float64(x - Float64(Float64(t / Float64(z - a)) * Float64(y - z)))
            	tmp = 0.0
            	if (z <= -1.85e+28)
            		tmp = t_1;
            	elseif (z <= 1.8e-125)
            		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z)));
            	elseif (z <= 9e+120)
            		tmp = t_1;
            	elseif (z <= 6.6e+165)
            		tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t));
            	else
            		tmp = Float64(t * Float64(z / Float64(z - a)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = x - ((t / (z - a)) * (y - z));
            	tmp = 0.0;
            	if (z <= -1.85e+28)
            		tmp = t_1;
            	elseif (z <= 1.8e-125)
            		tmp = x + ((y * (t - x)) / (a - z));
            	elseif (z <= 9e+120)
            		tmp = t_1;
            	elseif (z <= 6.6e+165)
            		tmp = (y / (z - a)) * (x - t);
            	else
            		tmp = t * (z / (z - a));
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -18499999999999999558625001472], t$95$1, If[LessEqual[z, 6859310779502913/381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176], t$95$1, If[LessEqual[z, 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
            
            \begin{array}{l}
            t_1 := x - \frac{t}{z - a} \cdot \left(y - z\right)\\
            \mathbf{if}\;z \leq -18499999999999999558625001472:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq \frac{6859310779502913}{381072821083495145432323880589986121307201921712032611188861933548019011086397170424842053596617672260721060927906081896416989218663120764928}:\\
            \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
            
            \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\
            \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;t \cdot \frac{z}{z - a}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if z < -1.85e28 or 1.8000000000000001e-125 < z < 8.9999999999999995e120

              1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -1.85e28 < z < 1.8000000000000001e-125

                1. Initial program 67.6%

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

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

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

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

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

                if 8.9999999999999995e120 < z < 6.5999999999999997e165

                1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{y}{a - z} \cdot \left(t - x\right) \]
                  7. sub-negate-revN/A

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

                    \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                  9. distribute-frac-neg2N/A

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

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

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

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

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

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

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

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

                if 6.5999999999999997e165 < z

                1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
                    2. lower--.f6430.6%

                      \[\leadsto t \cdot \frac{z}{z - a} \]
                  9. Applied rewrites30.6%

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

                Alternative 11: 68.2% accurate, 0.6× speedup?

                \[\begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3399999999999999750280910337709527728652288:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq \frac{4001264621376699}{190536410541747572716161940294993060653600960856016305594430966774009505543198585212421026798308836130360530463953040948208494609331560382464}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                (FPCore (x y z t a)
                  :precision binary64
                  (let* ((t_1 (* t (/ z (- z a)))))
                  (if (<= z -3399999999999999750280910337709527728652288)
                    t_1
                    (if (<=
                         z
                         4001264621376699/190536410541747572716161940294993060653600960856016305594430966774009505543198585212421026798308836130360530463953040948208494609331560382464)
                      (+ x (/ (* y (- t x)) (- a z)))
                      (if (<=
                           z
                           8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176)
                        (+ x (/ (* (- y z) t) (- a z)))
                        (if (<=
                             z
                             6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864)
                          (* (/ y (- z a)) (- x t))
                          t_1))))))
                double code(double x, double y, double z, double t, double a) {
                	double t_1 = t * (z / (z - a));
                	double tmp;
                	if (z <= -3.4e+42) {
                		tmp = t_1;
                	} else if (z <= 2.1e-125) {
                		tmp = x + ((y * (t - x)) / (a - z));
                	} else if (z <= 9e+120) {
                		tmp = x + (((y - z) * t) / (a - z));
                	} else if (z <= 6.6e+165) {
                		tmp = (y / (z - a)) * (x - 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 = t * (z / (z - a))
                    if (z <= (-3.4d+42)) then
                        tmp = t_1
                    else if (z <= 2.1d-125) then
                        tmp = x + ((y * (t - x)) / (a - z))
                    else if (z <= 9d+120) then
                        tmp = x + (((y - z) * t) / (a - z))
                    else if (z <= 6.6d+165) then
                        tmp = (y / (z - a)) * (x - 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 = t * (z / (z - a));
                	double tmp;
                	if (z <= -3.4e+42) {
                		tmp = t_1;
                	} else if (z <= 2.1e-125) {
                		tmp = x + ((y * (t - x)) / (a - z));
                	} else if (z <= 9e+120) {
                		tmp = x + (((y - z) * t) / (a - z));
                	} else if (z <= 6.6e+165) {
                		tmp = (y / (z - a)) * (x - t);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	t_1 = t * (z / (z - a))
                	tmp = 0
                	if z <= -3.4e+42:
                		tmp = t_1
                	elif z <= 2.1e-125:
                		tmp = x + ((y * (t - x)) / (a - z))
                	elif z <= 9e+120:
                		tmp = x + (((y - z) * t) / (a - z))
                	elif z <= 6.6e+165:
                		tmp = (y / (z - a)) * (x - t)
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t, a)
                	t_1 = Float64(t * Float64(z / Float64(z - a)))
                	tmp = 0.0
                	if (z <= -3.4e+42)
                		tmp = t_1;
                	elseif (z <= 2.1e-125)
                		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z)));
                	elseif (z <= 9e+120)
                		tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)));
                	elseif (z <= 6.6e+165)
                		tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	t_1 = t * (z / (z - a));
                	tmp = 0.0;
                	if (z <= -3.4e+42)
                		tmp = t_1;
                	elseif (z <= 2.1e-125)
                		tmp = x + ((y * (t - x)) / (a - z));
                	elseif (z <= 9e+120)
                		tmp = x + (((y - z) * t) / (a - z));
                	elseif (z <= 6.6e+165)
                		tmp = (y / (z - a)) * (x - t);
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3399999999999999750280910337709527728652288], t$95$1, If[LessEqual[z, 4001264621376699/190536410541747572716161940294993060653600960856016305594430966774009505543198585212421026798308836130360530463953040948208494609331560382464], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                
                \begin{array}{l}
                t_1 := t \cdot \frac{z}{z - a}\\
                \mathbf{if}\;z \leq -3399999999999999750280910337709527728652288:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq \frac{4001264621376699}{190536410541747572716161940294993060653600960856016305594430966774009505543198585212421026798308836130360530463953040948208494609331560382464}:\\
                \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
                
                \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\
                \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\
                
                \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\
                \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 4 regimes
                2. if z < -3.3999999999999998e42 or 6.5999999999999997e165 < z

                  1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
                      2. lower--.f6430.6%

                        \[\leadsto t \cdot \frac{z}{z - a} \]
                    9. Applied rewrites30.6%

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

                    if -3.3999999999999998e42 < z < 2.1e-125

                    1. Initial program 67.6%

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

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

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

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

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

                    if 2.1e-125 < z < 8.9999999999999995e120

                    1. Initial program 67.6%

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

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

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

                      if 8.9999999999999995e120 < z < 6.5999999999999997e165

                      1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{y}{a - z} \cdot \left(t - x\right) \]
                        7. sub-negate-revN/A

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

                          \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                        9. distribute-frac-neg2N/A

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

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

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

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

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

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

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

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

                    Alternative 12: 67.7% accurate, 0.7× speedup?

                    \[\begin{array}{l} t_1 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3399999999999999750280910337709527728652288:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                    (FPCore (x y z t a)
                      :precision binary64
                      (let* ((t_1 (* t (/ z (- z a)))))
                      (if (<= z -3399999999999999750280910337709527728652288)
                        t_1
                        (if (<=
                             z
                             8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176)
                          (+ x (/ (* y (- t x)) (- a z)))
                          (if (<=
                               z
                               6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864)
                            (* (/ y (- z a)) (- x t))
                            t_1)))))
                    double code(double x, double y, double z, double t, double a) {
                    	double t_1 = t * (z / (z - a));
                    	double tmp;
                    	if (z <= -3.4e+42) {
                    		tmp = t_1;
                    	} else if (z <= 9e+120) {
                    		tmp = x + ((y * (t - x)) / (a - z));
                    	} else if (z <= 6.6e+165) {
                    		tmp = (y / (z - a)) * (x - 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 = t * (z / (z - a))
                        if (z <= (-3.4d+42)) then
                            tmp = t_1
                        else if (z <= 9d+120) then
                            tmp = x + ((y * (t - x)) / (a - z))
                        else if (z <= 6.6d+165) then
                            tmp = (y / (z - a)) * (x - 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 = t * (z / (z - a));
                    	double tmp;
                    	if (z <= -3.4e+42) {
                    		tmp = t_1;
                    	} else if (z <= 9e+120) {
                    		tmp = x + ((y * (t - x)) / (a - z));
                    	} else if (z <= 6.6e+165) {
                    		tmp = (y / (z - a)) * (x - t);
                    	} else {
                    		tmp = t_1;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	t_1 = t * (z / (z - a))
                    	tmp = 0
                    	if z <= -3.4e+42:
                    		tmp = t_1
                    	elif z <= 9e+120:
                    		tmp = x + ((y * (t - x)) / (a - z))
                    	elif z <= 6.6e+165:
                    		tmp = (y / (z - a)) * (x - t)
                    	else:
                    		tmp = t_1
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	t_1 = Float64(t * Float64(z / Float64(z - a)))
                    	tmp = 0.0
                    	if (z <= -3.4e+42)
                    		tmp = t_1;
                    	elseif (z <= 9e+120)
                    		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z)));
                    	elseif (z <= 6.6e+165)
                    		tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t));
                    	else
                    		tmp = t_1;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	t_1 = t * (z / (z - a));
                    	tmp = 0.0;
                    	if (z <= -3.4e+42)
                    		tmp = t_1;
                    	elseif (z <= 9e+120)
                    		tmp = x + ((y * (t - x)) / (a - z));
                    	elseif (z <= 6.6e+165)
                    		tmp = (y / (z - a)) * (x - t);
                    	else
                    		tmp = t_1;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3399999999999999750280910337709527728652288], t$95$1, If[LessEqual[z, 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                    
                    \begin{array}{l}
                    t_1 := t \cdot \frac{z}{z - a}\\
                    \mathbf{if}\;z \leq -3399999999999999750280910337709527728652288:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 8999999999999999533343888127788871683666634823312209064127211160441811264448253605817745403309330949040665537863982514176:\\
                    \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
                    
                    \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\
                    \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_1\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if z < -3.3999999999999998e42 or 6.5999999999999997e165 < z

                      1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
                          2. lower--.f6430.6%

                            \[\leadsto t \cdot \frac{z}{z - a} \]
                        9. Applied rewrites30.6%

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

                        if -3.3999999999999998e42 < z < 8.9999999999999995e120

                        1. Initial program 67.6%

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

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

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

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

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

                        if 8.9999999999999995e120 < z < 6.5999999999999997e165

                        1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{y}{a - z} \cdot \left(t - x\right) \]
                          7. sub-negate-revN/A

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

                            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                          9. distribute-frac-neg2N/A

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

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

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

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

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

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

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

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

                      Alternative 13: 60.2% accurate, 0.6× speedup?

                      \[\begin{array}{l} t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\ t_2 := t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -5400000000000000067330389781411646144512:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq \frac{-5648671608315113}{20173827172553973356686868531273530268200826506478308693989526222973809547006571833044104322501076808092993531037089792}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq \frac{8418548055909837}{59285549689505892056868344324448208820874232148807968788202283012051522375647232}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
                      (FPCore (x y z t a)
                        :precision binary64
                        (let* ((t_1 (* (/ y (- z a)) (- x t))) (t_2 (* t (/ z (- z a)))))
                        (if (<= z -5400000000000000067330389781411646144512)
                          t_2
                          (if (<=
                               z
                               -5648671608315113/20173827172553973356686868531273530268200826506478308693989526222973809547006571833044104322501076808092993531037089792)
                            t_1
                            (if (<=
                                 z
                                 8418548055909837/59285549689505892056868344324448208820874232148807968788202283012051522375647232)
                              (+ x (/ (* y (- t x)) a))
                              (if (<=
                                   z
                                   6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864)
                                t_1
                                t_2))))))
                      double code(double x, double y, double z, double t, double a) {
                      	double t_1 = (y / (z - a)) * (x - t);
                      	double t_2 = t * (z / (z - a));
                      	double tmp;
                      	if (z <= -5.4e+39) {
                      		tmp = t_2;
                      	} else if (z <= -2.8e-103) {
                      		tmp = t_1;
                      	} else if (z <= 1.42e-64) {
                      		tmp = x + ((y * (t - x)) / a);
                      	} else if (z <= 6.6e+165) {
                      		tmp = t_1;
                      	} else {
                      		tmp = t_2;
                      	}
                      	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) :: t_2
                          real(8) :: tmp
                          t_1 = (y / (z - a)) * (x - t)
                          t_2 = t * (z / (z - a))
                          if (z <= (-5.4d+39)) then
                              tmp = t_2
                          else if (z <= (-2.8d-103)) then
                              tmp = t_1
                          else if (z <= 1.42d-64) then
                              tmp = x + ((y * (t - x)) / a)
                          else if (z <= 6.6d+165) then
                              tmp = t_1
                          else
                              tmp = t_2
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z, double t, double a) {
                      	double t_1 = (y / (z - a)) * (x - t);
                      	double t_2 = t * (z / (z - a));
                      	double tmp;
                      	if (z <= -5.4e+39) {
                      		tmp = t_2;
                      	} else if (z <= -2.8e-103) {
                      		tmp = t_1;
                      	} else if (z <= 1.42e-64) {
                      		tmp = x + ((y * (t - x)) / a);
                      	} else if (z <= 6.6e+165) {
                      		tmp = t_1;
                      	} else {
                      		tmp = t_2;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t, a):
                      	t_1 = (y / (z - a)) * (x - t)
                      	t_2 = t * (z / (z - a))
                      	tmp = 0
                      	if z <= -5.4e+39:
                      		tmp = t_2
                      	elif z <= -2.8e-103:
                      		tmp = t_1
                      	elif z <= 1.42e-64:
                      		tmp = x + ((y * (t - x)) / a)
                      	elif z <= 6.6e+165:
                      		tmp = t_1
                      	else:
                      		tmp = t_2
                      	return tmp
                      
                      function code(x, y, z, t, a)
                      	t_1 = Float64(Float64(y / Float64(z - a)) * Float64(x - t))
                      	t_2 = Float64(t * Float64(z / Float64(z - a)))
                      	tmp = 0.0
                      	if (z <= -5.4e+39)
                      		tmp = t_2;
                      	elseif (z <= -2.8e-103)
                      		tmp = t_1;
                      	elseif (z <= 1.42e-64)
                      		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a));
                      	elseif (z <= 6.6e+165)
                      		tmp = t_1;
                      	else
                      		tmp = t_2;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t, a)
                      	t_1 = (y / (z - a)) * (x - t);
                      	t_2 = t * (z / (z - a));
                      	tmp = 0.0;
                      	if (z <= -5.4e+39)
                      		tmp = t_2;
                      	elseif (z <= -2.8e-103)
                      		tmp = t_1;
                      	elseif (z <= 1.42e-64)
                      		tmp = x + ((y * (t - x)) / a);
                      	elseif (z <= 6.6e+165)
                      		tmp = t_1;
                      	else
                      		tmp = t_2;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5400000000000000067330389781411646144512], t$95$2, If[LessEqual[z, -5648671608315113/20173827172553973356686868531273530268200826506478308693989526222973809547006571833044104322501076808092993531037089792], t$95$1, If[LessEqual[z, 8418548055909837/59285549689505892056868344324448208820874232148807968788202283012051522375647232], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864], t$95$1, t$95$2]]]]]]
                      
                      \begin{array}{l}
                      t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\
                      t_2 := t \cdot \frac{z}{z - a}\\
                      \mathbf{if}\;z \leq -5400000000000000067330389781411646144512:\\
                      \;\;\;\;t\_2\\
                      
                      \mathbf{elif}\;z \leq \frac{-5648671608315113}{20173827172553973356686868531273530268200826506478308693989526222973809547006571833044104322501076808092993531037089792}:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{elif}\;z \leq \frac{8418548055909837}{59285549689505892056868344324448208820874232148807968788202283012051522375647232}:\\
                      \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
                      
                      \mathbf{elif}\;z \leq 6599999999999999704889740170416960896224666331392471398596109016291223173895571176082550059814524022285304048837069830656864667679330832033829908917913588779255332864:\\
                      \;\;\;\;t\_1\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_2\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -5.4000000000000001e39 or 6.5999999999999997e165 < z

                        1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto t \cdot \frac{z}{z - \color{blue}{a}} \]
                            2. lower--.f6430.6%

                              \[\leadsto t \cdot \frac{z}{z - a} \]
                          9. Applied rewrites30.6%

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

                          if -5.4000000000000001e39 < z < -2.8000000000000002e-103 or 1.4200000000000001e-64 < z < 6.5999999999999997e165

                          1. Initial program 67.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{y}{a - z} \cdot \left(t - x\right) \]
                            7. sub-negate-revN/A

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

                              \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                            9. distribute-frac-neg2N/A

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

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

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

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

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

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

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

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

                          if -2.8000000000000002e-103 < z < 1.4200000000000001e-64

                          1. Initial program 67.6%

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

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          3. Step-by-step derivation
                            1. lower--.f6420.0%

                              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                          4. Applied rewrites20.0%

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

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          6. Step-by-step derivation
                            1. lower-*.f642.8%

                              \[\leadsto x + -1 \cdot x \]
                          7. Applied rewrites2.8%

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          8. Taylor expanded in z around 0

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

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

                              \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                            3. lower--.f6443.6%

                              \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                          10. Applied rewrites43.6%

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

                        Alternative 14: 57.1% accurate, 0.8× speedup?

                        \[\begin{array}{l} \mathbf{if}\;y \leq \frac{-8330559332786147}{1461501637330902918203684832716283019655932542976}:\\ \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{elif}\;y \leq 305000000000000013664634946977792:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a - z} \cdot y\\ \end{array} \]
                        (FPCore (x y z t a)
                          :precision binary64
                          (if (<=
                             y
                             -8330559332786147/1461501637330902918203684832716283019655932542976)
                          (* (/ y (- z a)) (- x t))
                          (if (<= y 305000000000000013664634946977792)
                            (+ t x)
                            (* (/ (- t x) (- a z)) y))))
                        double code(double x, double y, double z, double t, double a) {
                        	double tmp;
                        	if (y <= -5.7e-33) {
                        		tmp = (y / (z - a)) * (x - t);
                        	} else if (y <= 3.05e+32) {
                        		tmp = t + x;
                        	} else {
                        		tmp = ((t - x) / (a - z)) * y;
                        	}
                        	return tmp;
                        }
                        
                        module fmin_fmax_functions
                            implicit none
                            private
                            public fmax
                            public fmin
                        
                            interface fmax
                                module procedure fmax88
                                module procedure fmax44
                                module procedure fmax84
                                module procedure fmax48
                            end interface
                            interface fmin
                                module procedure fmin88
                                module procedure fmin44
                                module procedure fmin84
                                module procedure fmin48
                            end interface
                        contains
                            real(8) function fmax88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmax44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmax84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmax48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                            end function
                            real(8) function fmin88(x, y) result (res)
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(4) function fmin44(x, y) result (res)
                                real(4), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                            end function
                            real(8) function fmin84(x, y) result(res)
                                real(8), intent (in) :: x
                                real(4), intent (in) :: y
                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                            end function
                            real(8) function fmin48(x, y) result(res)
                                real(4), intent (in) :: x
                                real(8), intent (in) :: y
                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                            end function
                        end module
                        
                        real(8) function code(x, y, z, t, a)
                        use fmin_fmax_functions
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            real(8), intent (in) :: z
                            real(8), intent (in) :: t
                            real(8), intent (in) :: a
                            real(8) :: tmp
                            if (y <= (-5.7d-33)) then
                                tmp = (y / (z - a)) * (x - t)
                            else if (y <= 3.05d+32) then
                                tmp = t + x
                            else
                                tmp = ((t - x) / (a - z)) * y
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a) {
                        	double tmp;
                        	if (y <= -5.7e-33) {
                        		tmp = (y / (z - a)) * (x - t);
                        	} else if (y <= 3.05e+32) {
                        		tmp = t + x;
                        	} else {
                        		tmp = ((t - x) / (a - z)) * y;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	tmp = 0
                        	if y <= -5.7e-33:
                        		tmp = (y / (z - a)) * (x - t)
                        	elif y <= 3.05e+32:
                        		tmp = t + x
                        	else:
                        		tmp = ((t - x) / (a - z)) * y
                        	return tmp
                        
                        function code(x, y, z, t, a)
                        	tmp = 0.0
                        	if (y <= -5.7e-33)
                        		tmp = Float64(Float64(y / Float64(z - a)) * Float64(x - t));
                        	elseif (y <= 3.05e+32)
                        		tmp = Float64(t + x);
                        	else
                        		tmp = Float64(Float64(Float64(t - x) / Float64(a - z)) * y);
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a)
                        	tmp = 0.0;
                        	if (y <= -5.7e-33)
                        		tmp = (y / (z - a)) * (x - t);
                        	elseif (y <= 3.05e+32)
                        		tmp = t + x;
                        	else
                        		tmp = ((t - x) / (a - z)) * y;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_] := If[LessEqual[y, -8330559332786147/1461501637330902918203684832716283019655932542976], N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 305000000000000013664634946977792], N[(t + x), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]]
                        
                        \begin{array}{l}
                        \mathbf{if}\;y \leq \frac{-8330559332786147}{1461501637330902918203684832716283019655932542976}:\\
                        \;\;\;\;\frac{y}{z - a} \cdot \left(x - t\right)\\
                        
                        \mathbf{elif}\;y \leq 305000000000000013664634946977792:\\
                        \;\;\;\;t + x\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{t - x}{a - z} \cdot y\\
                        
                        
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if y < -5.7000000000000003e-33

                          1. Initial program 67.6%

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

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

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

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

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

                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                            5. lower-/.f64N/A

                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                            6. lower--.f6441.6%

                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                          4. Applied rewrites41.6%

                            \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                          5. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            2. *-commutativeN/A

                              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                            3. lift--.f64N/A

                              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                            4. lift-/.f64N/A

                              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                            5. lift-/.f64N/A

                              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                            6. sub-divN/A

                              \[\leadsto \frac{t - x}{a - z} \cdot y \]
                            7. lift--.f64N/A

                              \[\leadsto \frac{t - x}{a - z} \cdot y \]
                            8. associate-*l/N/A

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                            9. lower-/.f64N/A

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                            10. lower-*.f6437.7%

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a} - z} \]
                          6. Applied rewrites37.7%

                            \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                          7. Step-by-step derivation
                            1. lift-/.f64N/A

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                            2. lift--.f64N/A

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
                            3. lift-*.f64N/A

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a} - z} \]
                            4. associate-/l*N/A

                              \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a - z}} \]
                            5. *-commutativeN/A

                              \[\leadsto \frac{y}{a - z} \cdot \color{blue}{\left(t - x\right)} \]
                            6. lift--.f64N/A

                              \[\leadsto \frac{y}{a - z} \cdot \left(t - x\right) \]
                            7. sub-negate-revN/A

                              \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                            8. lift--.f64N/A

                              \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                            9. distribute-frac-neg2N/A

                              \[\leadsto \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right) \cdot \left(\color{blue}{t} - x\right) \]
                            10. distribute-lft-neg-outN/A

                              \[\leadsto \mathsf{neg}\left(\frac{y}{z - a} \cdot \left(t - x\right)\right) \]
                            11. distribute-rgt-neg-outN/A

                              \[\leadsto \frac{y}{z - a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
                            12. sub-negate-revN/A

                              \[\leadsto \frac{y}{z - a} \cdot \left(x - \color{blue}{t}\right) \]
                            13. lift--.f64N/A

                              \[\leadsto \frac{y}{z - a} \cdot \left(x - \color{blue}{t}\right) \]
                            14. lower-*.f64N/A

                              \[\leadsto \frac{y}{z - a} \cdot \color{blue}{\left(x - t\right)} \]
                            15. lower-/.f6443.0%

                              \[\leadsto \frac{y}{z - a} \cdot \left(\color{blue}{x} - t\right) \]
                          8. Applied rewrites43.0%

                            \[\leadsto \frac{y}{z - a} \cdot \color{blue}{\left(x - t\right)} \]

                          if -5.7000000000000003e-33 < y < 3.0500000000000001e32

                          1. Initial program 67.6%

                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                          2. Taylor expanded in z around inf

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          3. Step-by-step derivation
                            1. lower--.f6420.0%

                              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                          4. Applied rewrites20.0%

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          5. Taylor expanded in x around inf

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          6. Step-by-step derivation
                            1. lower-*.f642.8%

                              \[\leadsto x + -1 \cdot x \]
                          7. Applied rewrites2.8%

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          8. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{x + -1 \cdot x} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                            3. lower-+.f642.8%

                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                            4. lift-*.f64N/A

                              \[\leadsto -1 \cdot x + x \]
                            5. mul-1-negN/A

                              \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                            6. lower-neg.f642.8%

                              \[\leadsto \left(-x\right) + x \]
                          9. Applied rewrites2.8%

                            \[\leadsto \color{blue}{\left(-x\right) + x} \]
                          10. Taylor expanded in x around 0

                            \[\leadsto t + x \]
                          11. Step-by-step derivation
                            1. Applied rewrites34.3%

                              \[\leadsto t + x \]

                            if 3.0500000000000001e32 < y

                            1. Initial program 67.6%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                            2. Taylor expanded in y around inf

                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              2. lower--.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                              3. lower-/.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                              4. lower--.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                              5. lower-/.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                              6. lower--.f6441.6%

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                            4. Applied rewrites41.6%

                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            5. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              2. *-commutativeN/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                              3. lower-*.f6441.6%

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                              4. lift--.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              5. lift-/.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              6. lift-/.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              7. sub-divN/A

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                              8. lift--.f64N/A

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                              9. lower-/.f6441.9%

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                            6. Applied rewrites41.9%

                              \[\leadsto \frac{t - x}{a - z} \cdot \color{blue}{y} \]
                          12. Recombined 3 regimes into one program.
                          13. Add Preprocessing

                          Alternative 15: 56.8% accurate, 0.8× speedup?

                          \[\begin{array}{l} t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\ \mathbf{if}\;y \leq \frac{-8330559332786147}{1461501637330902918203684832716283019655932542976}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 305000000000000013664634946977792:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                          (FPCore (x y z t a)
                            :precision binary64
                            (let* ((t_1 (* (/ y (- z a)) (- x t))))
                            (if (<=
                                 y
                                 -8330559332786147/1461501637330902918203684832716283019655932542976)
                              t_1
                              (if (<= y 305000000000000013664634946977792) (+ t x) t_1))))
                          double code(double x, double y, double z, double t, double a) {
                          	double t_1 = (y / (z - a)) * (x - t);
                          	double tmp;
                          	if (y <= -5.7e-33) {
                          		tmp = t_1;
                          	} else if (y <= 3.05e+32) {
                          		tmp = t + x;
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          module fmin_fmax_functions
                              implicit none
                              private
                              public fmax
                              public fmin
                          
                              interface fmax
                                  module procedure fmax88
                                  module procedure fmax44
                                  module procedure fmax84
                                  module procedure fmax48
                              end interface
                              interface fmin
                                  module procedure fmin88
                                  module procedure fmin44
                                  module procedure fmin84
                                  module procedure fmin48
                              end interface
                          contains
                              real(8) function fmax88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmax44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmax84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmax48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                              end function
                              real(8) function fmin88(x, y) result (res)
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(4) function fmin44(x, y) result (res)
                                  real(4), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                              end function
                              real(8) function fmin84(x, y) result(res)
                                  real(8), intent (in) :: x
                                  real(4), intent (in) :: y
                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                              end function
                              real(8) function fmin48(x, y) result(res)
                                  real(4), intent (in) :: x
                                  real(8), intent (in) :: y
                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                              end function
                          end module
                          
                          real(8) function code(x, y, z, t, a)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8), intent (in) :: t
                              real(8), intent (in) :: a
                              real(8) :: t_1
                              real(8) :: tmp
                              t_1 = (y / (z - a)) * (x - t)
                              if (y <= (-5.7d-33)) then
                                  tmp = t_1
                              else if (y <= 3.05d+32) then
                                  tmp = t + x
                              else
                                  tmp = t_1
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z, double t, double a) {
                          	double t_1 = (y / (z - a)) * (x - t);
                          	double tmp;
                          	if (y <= -5.7e-33) {
                          		tmp = t_1;
                          	} else if (y <= 3.05e+32) {
                          		tmp = t + x;
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	t_1 = (y / (z - a)) * (x - t)
                          	tmp = 0
                          	if y <= -5.7e-33:
                          		tmp = t_1
                          	elif y <= 3.05e+32:
                          		tmp = t + x
                          	else:
                          		tmp = t_1
                          	return tmp
                          
                          function code(x, y, z, t, a)
                          	t_1 = Float64(Float64(y / Float64(z - a)) * Float64(x - t))
                          	tmp = 0.0
                          	if (y <= -5.7e-33)
                          		tmp = t_1;
                          	elseif (y <= 3.05e+32)
                          		tmp = Float64(t + x);
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t, a)
                          	t_1 = (y / (z - a)) * (x - t);
                          	tmp = 0.0;
                          	if (y <= -5.7e-33)
                          		tmp = t_1;
                          	elseif (y <= 3.05e+32)
                          		tmp = t + x;
                          	else
                          		tmp = t_1;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8330559332786147/1461501637330902918203684832716283019655932542976], t$95$1, If[LessEqual[y, 305000000000000013664634946977792], N[(t + x), $MachinePrecision], t$95$1]]]
                          
                          \begin{array}{l}
                          t_1 := \frac{y}{z - a} \cdot \left(x - t\right)\\
                          \mathbf{if}\;y \leq \frac{-8330559332786147}{1461501637330902918203684832716283019655932542976}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;y \leq 305000000000000013664634946977792:\\
                          \;\;\;\;t + x\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if y < -5.7000000000000003e-33 or 3.0500000000000001e32 < y

                            1. Initial program 67.6%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                            2. Taylor expanded in y around inf

                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              2. lower--.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                              3. lower-/.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                              4. lower--.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                              5. lower-/.f64N/A

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                              6. lower--.f6441.6%

                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                            4. Applied rewrites41.6%

                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                            5. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                              2. *-commutativeN/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                              3. lift--.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              4. lift-/.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              5. lift-/.f64N/A

                                \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                              6. sub-divN/A

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                              7. lift--.f64N/A

                                \[\leadsto \frac{t - x}{a - z} \cdot y \]
                              8. associate-*l/N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                              9. lower-/.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                              10. lower-*.f6437.7%

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a} - z} \]
                            6. Applied rewrites37.7%

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                            7. Step-by-step derivation
                              1. lift-/.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a - z}} \]
                              2. lift--.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
                              3. lift-*.f64N/A

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{\color{blue}{a} - z} \]
                              4. associate-/l*N/A

                                \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a - z}} \]
                              5. *-commutativeN/A

                                \[\leadsto \frac{y}{a - z} \cdot \color{blue}{\left(t - x\right)} \]
                              6. lift--.f64N/A

                                \[\leadsto \frac{y}{a - z} \cdot \left(t - x\right) \]
                              7. sub-negate-revN/A

                                \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                              8. lift--.f64N/A

                                \[\leadsto \frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(t - x\right) \]
                              9. distribute-frac-neg2N/A

                                \[\leadsto \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right) \cdot \left(\color{blue}{t} - x\right) \]
                              10. distribute-lft-neg-outN/A

                                \[\leadsto \mathsf{neg}\left(\frac{y}{z - a} \cdot \left(t - x\right)\right) \]
                              11. distribute-rgt-neg-outN/A

                                \[\leadsto \frac{y}{z - a} \cdot \color{blue}{\left(\mathsf{neg}\left(\left(t - x\right)\right)\right)} \]
                              12. sub-negate-revN/A

                                \[\leadsto \frac{y}{z - a} \cdot \left(x - \color{blue}{t}\right) \]
                              13. lift--.f64N/A

                                \[\leadsto \frac{y}{z - a} \cdot \left(x - \color{blue}{t}\right) \]
                              14. lower-*.f64N/A

                                \[\leadsto \frac{y}{z - a} \cdot \color{blue}{\left(x - t\right)} \]
                              15. lower-/.f6443.0%

                                \[\leadsto \frac{y}{z - a} \cdot \left(\color{blue}{x} - t\right) \]
                            8. Applied rewrites43.0%

                              \[\leadsto \frac{y}{z - a} \cdot \color{blue}{\left(x - t\right)} \]

                            if -5.7000000000000003e-33 < y < 3.0500000000000001e32

                            1. Initial program 67.6%

                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                            2. Taylor expanded in z around inf

                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                            3. Step-by-step derivation
                              1. lower--.f6420.0%

                                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                            4. Applied rewrites20.0%

                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                            5. Taylor expanded in x around inf

                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                            6. Step-by-step derivation
                              1. lower-*.f642.8%

                                \[\leadsto x + -1 \cdot x \]
                            7. Applied rewrites2.8%

                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                            8. Step-by-step derivation
                              1. lift-+.f64N/A

                                \[\leadsto \color{blue}{x + -1 \cdot x} \]
                              2. +-commutativeN/A

                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                              3. lower-+.f642.8%

                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                              4. lift-*.f64N/A

                                \[\leadsto -1 \cdot x + x \]
                              5. mul-1-negN/A

                                \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                              6. lower-neg.f642.8%

                                \[\leadsto \left(-x\right) + x \]
                            9. Applied rewrites2.8%

                              \[\leadsto \color{blue}{\left(-x\right) + x} \]
                            10. Taylor expanded in x around 0

                              \[\leadsto t + x \]
                            11. Step-by-step derivation
                              1. Applied rewrites34.3%

                                \[\leadsto t + x \]
                            12. Recombined 2 regimes into one program.
                            13. Add Preprocessing

                            Alternative 16: 46.9% accurate, 0.8× speedup?

                            \[\begin{array}{l} \mathbf{if}\;a \leq -1320000000000000000:\\ \;\;\;\;t + x\\ \mathbf{elif}\;a \leq \frac{4282608696416015}{594806763391113225119224999259960224052504080663757783622308743726376262864161749418067325798462540235919489516077189220181834098217962283116332232440957850313188336178983949577074563933719094748095678312940574882427099482751152035262839576139463233204818042181657565129506139525873664}:\\ \;\;\;\;\frac{t \cdot \left(z - y\right)}{z - a}\\ \mathbf{elif}\;a \leq 21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
                            (FPCore (x y z t a)
                              :precision binary64
                              (if (<= a -1320000000000000000)
                              (+ t x)
                              (if (<=
                                   a
                                   4282608696416015/594806763391113225119224999259960224052504080663757783622308743726376262864161749418067325798462540235919489516077189220181834098217962283116332232440957850313188336178983949577074563933719094748095678312940574882427099482751152035262839576139463233204818042181657565129506139525873664)
                                (/ (* t (- z y)) (- z a))
                                (if (<=
                                     a
                                     21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536)
                                  (* t (- 1 (/ y z)))
                                  (+ t x)))))
                            double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if (a <= -1.32e+18) {
                            		tmp = t + x;
                            	} else if (a <= 7.2e-270) {
                            		tmp = (t * (z - y)) / (z - a);
                            	} else if (a <= 2.2e+112) {
                            		tmp = t * (1.0 - (y / z));
                            	} else {
                            		tmp = t + x;
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                real(8) :: tmp
                                if (a <= (-1.32d+18)) then
                                    tmp = t + x
                                else if (a <= 7.2d-270) then
                                    tmp = (t * (z - y)) / (z - a)
                                else if (a <= 2.2d+112) then
                                    tmp = t * (1.0d0 - (y / z))
                                else
                                    tmp = t + x
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if (a <= -1.32e+18) {
                            		tmp = t + x;
                            	} else if (a <= 7.2e-270) {
                            		tmp = (t * (z - y)) / (z - a);
                            	} else if (a <= 2.2e+112) {
                            		tmp = t * (1.0 - (y / z));
                            	} else {
                            		tmp = t + x;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	tmp = 0
                            	if a <= -1.32e+18:
                            		tmp = t + x
                            	elif a <= 7.2e-270:
                            		tmp = (t * (z - y)) / (z - a)
                            	elif a <= 2.2e+112:
                            		tmp = t * (1.0 - (y / z))
                            	else:
                            		tmp = t + x
                            	return tmp
                            
                            function code(x, y, z, t, a)
                            	tmp = 0.0
                            	if (a <= -1.32e+18)
                            		tmp = Float64(t + x);
                            	elseif (a <= 7.2e-270)
                            		tmp = Float64(Float64(t * Float64(z - y)) / Float64(z - a));
                            	elseif (a <= 2.2e+112)
                            		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
                            	else
                            		tmp = Float64(t + x);
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a)
                            	tmp = 0.0;
                            	if (a <= -1.32e+18)
                            		tmp = t + x;
                            	elseif (a <= 7.2e-270)
                            		tmp = (t * (z - y)) / (z - a);
                            	elseif (a <= 2.2e+112)
                            		tmp = t * (1.0 - (y / z));
                            	else
                            		tmp = t + x;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1320000000000000000], N[(t + x), $MachinePrecision], If[LessEqual[a, 4282608696416015/594806763391113225119224999259960224052504080663757783622308743726376262864161749418067325798462540235919489516077189220181834098217962283116332232440957850313188336178983949577074563933719094748095678312940574882427099482751152035262839576139463233204818042181657565129506139525873664], N[(N[(t * N[(z - y), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536], N[(t * N[(1 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
                            
                            \begin{array}{l}
                            \mathbf{if}\;a \leq -1320000000000000000:\\
                            \;\;\;\;t + x\\
                            
                            \mathbf{elif}\;a \leq \frac{4282608696416015}{594806763391113225119224999259960224052504080663757783622308743726376262864161749418067325798462540235919489516077189220181834098217962283116332232440957850313188336178983949577074563933719094748095678312940574882427099482751152035262839576139463233204818042181657565129506139525873664}:\\
                            \;\;\;\;\frac{t \cdot \left(z - y\right)}{z - a}\\
                            
                            \mathbf{elif}\;a \leq 21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536:\\
                            \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t + x\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if a < -1.32e18 or 2.1999999999999999e112 < a

                              1. Initial program 67.6%

                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                              2. Taylor expanded in z around inf

                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                              3. Step-by-step derivation
                                1. lower--.f6420.0%

                                  \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                              4. Applied rewrites20.0%

                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                              5. Taylor expanded in x around inf

                                \[\leadsto x + -1 \cdot \color{blue}{x} \]
                              6. Step-by-step derivation
                                1. lower-*.f642.8%

                                  \[\leadsto x + -1 \cdot x \]
                              7. Applied rewrites2.8%

                                \[\leadsto x + -1 \cdot \color{blue}{x} \]
                              8. Step-by-step derivation
                                1. lift-+.f64N/A

                                  \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                2. +-commutativeN/A

                                  \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                3. lower-+.f642.8%

                                  \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                4. lift-*.f64N/A

                                  \[\leadsto -1 \cdot x + x \]
                                5. mul-1-negN/A

                                  \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                6. lower-neg.f642.8%

                                  \[\leadsto \left(-x\right) + x \]
                              9. Applied rewrites2.8%

                                \[\leadsto \color{blue}{\left(-x\right) + x} \]
                              10. Taylor expanded in x around 0

                                \[\leadsto t + x \]
                              11. Step-by-step derivation
                                1. Applied rewrites34.3%

                                  \[\leadsto t + x \]

                                if -1.32e18 < a < 7.1999999999999996e-270

                                1. Initial program 67.6%

                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                2. Step-by-step derivation
                                  1. lift-+.f64N/A

                                    \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
                                  2. lift-/.f64N/A

                                    \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
                                  3. add-to-fractionN/A

                                    \[\leadsto \color{blue}{\frac{x \cdot \left(a - z\right) + \left(y - z\right) \cdot \left(t - x\right)}{a - z}} \]
                                  4. mult-flipN/A

                                    \[\leadsto \color{blue}{\left(x \cdot \left(a - z\right) + \left(y - z\right) \cdot \left(t - x\right)\right) \cdot \frac{1}{a - z}} \]
                                  5. *-commutativeN/A

                                    \[\leadsto \color{blue}{\frac{1}{a - z} \cdot \left(x \cdot \left(a - z\right) + \left(y - z\right) \cdot \left(t - x\right)\right)} \]
                                  6. +-commutativeN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right) + x \cdot \left(a - z\right)\right)} \]
                                  7. *-commutativeN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \left(t - x\right) + \color{blue}{\left(a - z\right) \cdot x}\right) \]
                                  8. fp-cancel-sign-sub-invN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \color{blue}{\left(\left(y - z\right) \cdot \left(t - x\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right)} \]
                                  9. lift-*.f64N/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\color{blue}{\left(y - z\right) \cdot \left(t - x\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  10. lift--.f64N/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(t - x\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  11. sub-negate-revN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\left(y - z\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\left(x - t\right)\right)\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  12. distribute-rgt-neg-outN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(y - z\right) \cdot \left(x - t\right)\right)\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  13. distribute-lft-neg-inN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\color{blue}{\left(\mathsf{neg}\left(\left(y - z\right)\right)\right) \cdot \left(x - t\right)} - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  14. lift--.f64N/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(y - z\right)}\right)\right) \cdot \left(x - t\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  15. sub-negate-revN/A

                                    \[\leadsto \frac{1}{a - z} \cdot \left(\color{blue}{\left(z - y\right)} \cdot \left(x - t\right) - \left(\mathsf{neg}\left(\left(a - z\right)\right)\right) \cdot x\right) \]
                                  16. lower-134-z0z1z2z3z4N/A

                                    \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{1}{a - z}\right), \left(z - y\right), \left(x - t\right), \left(\mathsf{neg}\left(\left(a - z\right)\right)\right), x\right)} \]
                                3. Applied rewrites84.5%

                                  \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{z - a}\right), \left(z - y\right), \left(x - t\right), \left(z - a\right), x\right)} \]
                                4. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{\frac{t \cdot \left(z - y\right)}{z - a}} \]
                                5. Step-by-step derivation
                                  1. lower-/.f64N/A

                                    \[\leadsto \frac{t \cdot \left(z - y\right)}{\color{blue}{z - a}} \]
                                  2. lower-*.f64N/A

                                    \[\leadsto \frac{t \cdot \left(z - y\right)}{\color{blue}{z} - a} \]
                                  3. lower--.f64N/A

                                    \[\leadsto \frac{t \cdot \left(z - y\right)}{z - a} \]
                                  4. lower--.f6439.9%

                                    \[\leadsto \frac{t \cdot \left(z - y\right)}{z - \color{blue}{a}} \]
                                6. Applied rewrites39.9%

                                  \[\leadsto \color{blue}{\frac{t \cdot \left(z - y\right)}{z - a}} \]

                                if 7.1999999999999996e-270 < a < 2.1999999999999999e112

                                1. Initial program 67.6%

                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites55.5%

                                    \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                  2. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot t}{a - z}} \]
                                    2. add-flipN/A

                                      \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)} \]
                                    3. sub-flipN/A

                                      \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)\right)\right)} \]
                                    4. lift-/.f64N/A

                                      \[\leadsto x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}}\right)\right)\right)\right) \]
                                    5. distribute-neg-frac2N/A

                                      \[\leadsto x + \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(a - z\right)\right)}}\right)\right) \]
                                    6. lift--.f64N/A

                                      \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}\right)\right) \]
                                    7. sub-negate-revN/A

                                      \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                    8. lift--.f64N/A

                                      \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                    9. distribute-frac-neg2N/A

                                      \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(z - a\right)\right)}} \]
                                    10. lift--.f64N/A

                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \]
                                    11. sub-negate-revN/A

                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                    12. lift--.f64N/A

                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                    13. lift-*.f64N/A

                                      \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
                                    14. associate-/l*N/A

                                      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                    15. *-commutativeN/A

                                      \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
                                    16. fp-cancel-sign-sub-invN/A

                                      \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{t}{a - z}\right)\right) \cdot \left(y - z\right)} \]
                                  3. Applied rewrites64.3%

                                    \[\leadsto \color{blue}{x - \frac{t}{z - a} \cdot \left(y - z\right)} \]
                                  4. Taylor expanded in t around inf

                                    \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                  5. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto t \cdot \color{blue}{\left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                    2. lower--.f64N/A

                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \color{blue}{\frac{y}{z - a}}\right) \]
                                    3. lower-/.f64N/A

                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{\color{blue}{y}}{z - a}\right) \]
                                    4. lower--.f64N/A

                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right) \]
                                    5. lower-/.f64N/A

                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{\color{blue}{z - a}}\right) \]
                                    6. lower--.f6452.4%

                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - \color{blue}{a}}\right) \]
                                  6. Applied rewrites52.4%

                                    \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                  7. Taylor expanded in a around 0

                                    \[\leadsto t \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
                                  8. Step-by-step derivation
                                    1. lower--.f64N/A

                                      \[\leadsto t \cdot \left(1 - \frac{y}{\color{blue}{z}}\right) \]
                                    2. lower-/.f6437.4%

                                      \[\leadsto t \cdot \left(1 - \frac{y}{z}\right) \]
                                  9. Applied rewrites37.4%

                                    \[\leadsto t \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
                                4. Recombined 3 regimes into one program.
                                5. Add Preprocessing

                                Alternative 17: 45.6% accurate, 0.9× speedup?

                                \[\begin{array}{l} \mathbf{if}\;a \leq -1320000000000000000:\\ \;\;\;\;t + x\\ \mathbf{elif}\;a \leq 21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536:\\ \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;t + x\\ \end{array} \]
                                (FPCore (x y z t a)
                                  :precision binary64
                                  (if (<= a -1320000000000000000)
                                  (+ t x)
                                  (if (<=
                                       a
                                       21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536)
                                    (* t (- 1 (/ y z)))
                                    (+ t x))))
                                double code(double x, double y, double z, double t, double a) {
                                	double tmp;
                                	if (a <= -1.32e+18) {
                                		tmp = t + x;
                                	} else if (a <= 2.2e+112) {
                                		tmp = t * (1.0 - (y / z));
                                	} else {
                                		tmp = t + x;
                                	}
                                	return tmp;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, a)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    real(8) :: tmp
                                    if (a <= (-1.32d+18)) then
                                        tmp = t + x
                                    else if (a <= 2.2d+112) then
                                        tmp = t * (1.0d0 - (y / z))
                                    else
                                        tmp = t + x
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a) {
                                	double tmp;
                                	if (a <= -1.32e+18) {
                                		tmp = t + x;
                                	} else if (a <= 2.2e+112) {
                                		tmp = t * (1.0 - (y / z));
                                	} else {
                                		tmp = t + x;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a):
                                	tmp = 0
                                	if a <= -1.32e+18:
                                		tmp = t + x
                                	elif a <= 2.2e+112:
                                		tmp = t * (1.0 - (y / z))
                                	else:
                                		tmp = t + x
                                	return tmp
                                
                                function code(x, y, z, t, a)
                                	tmp = 0.0
                                	if (a <= -1.32e+18)
                                		tmp = Float64(t + x);
                                	elseif (a <= 2.2e+112)
                                		tmp = Float64(t * Float64(1.0 - Float64(y / z)));
                                	else
                                		tmp = Float64(t + x);
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x, y, z, t, a)
                                	tmp = 0.0;
                                	if (a <= -1.32e+18)
                                		tmp = t + x;
                                	elseif (a <= 2.2e+112)
                                		tmp = t * (1.0 - (y / z));
                                	else
                                		tmp = t + x;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1320000000000000000], N[(t + x), $MachinePrecision], If[LessEqual[a, 21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536], N[(t * N[(1 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                \mathbf{if}\;a \leq -1320000000000000000:\\
                                \;\;\;\;t + x\\
                                
                                \mathbf{elif}\;a \leq 21999999999999999317033377606233706984290011770878336524836782038285013611044653717164210203423579837854736449536:\\
                                \;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t + x\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if a < -1.32e18 or 2.1999999999999999e112 < a

                                  1. Initial program 67.6%

                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                  2. Taylor expanded in z around inf

                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  3. Step-by-step derivation
                                    1. lower--.f6420.0%

                                      \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                  4. Applied rewrites20.0%

                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  5. Taylor expanded in x around inf

                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                  6. Step-by-step derivation
                                    1. lower-*.f642.8%

                                      \[\leadsto x + -1 \cdot x \]
                                  7. Applied rewrites2.8%

                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                  8. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                    3. lower-+.f642.8%

                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                    4. lift-*.f64N/A

                                      \[\leadsto -1 \cdot x + x \]
                                    5. mul-1-negN/A

                                      \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                    6. lower-neg.f642.8%

                                      \[\leadsto \left(-x\right) + x \]
                                  9. Applied rewrites2.8%

                                    \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                  10. Taylor expanded in x around 0

                                    \[\leadsto t + x \]
                                  11. Step-by-step derivation
                                    1. Applied rewrites34.3%

                                      \[\leadsto t + x \]

                                    if -1.32e18 < a < 2.1999999999999999e112

                                    1. Initial program 67.6%

                                      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                    2. Taylor expanded in x around 0

                                      \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites55.5%

                                        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                      2. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot t}{a - z}} \]
                                        2. add-flipN/A

                                          \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)} \]
                                        3. sub-flipN/A

                                          \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)\right)\right)} \]
                                        4. lift-/.f64N/A

                                          \[\leadsto x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}}\right)\right)\right)\right) \]
                                        5. distribute-neg-frac2N/A

                                          \[\leadsto x + \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(a - z\right)\right)}}\right)\right) \]
                                        6. lift--.f64N/A

                                          \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}\right)\right) \]
                                        7. sub-negate-revN/A

                                          \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                        8. lift--.f64N/A

                                          \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                        9. distribute-frac-neg2N/A

                                          \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(z - a\right)\right)}} \]
                                        10. lift--.f64N/A

                                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \]
                                        11. sub-negate-revN/A

                                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                        12. lift--.f64N/A

                                          \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                        13. lift-*.f64N/A

                                          \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
                                        14. associate-/l*N/A

                                          \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                        15. *-commutativeN/A

                                          \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
                                        16. fp-cancel-sign-sub-invN/A

                                          \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{t}{a - z}\right)\right) \cdot \left(y - z\right)} \]
                                      3. Applied rewrites64.3%

                                        \[\leadsto \color{blue}{x - \frac{t}{z - a} \cdot \left(y - z\right)} \]
                                      4. Taylor expanded in t around inf

                                        \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                      5. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto t \cdot \color{blue}{\left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                        2. lower--.f64N/A

                                          \[\leadsto t \cdot \left(\frac{z}{z - a} - \color{blue}{\frac{y}{z - a}}\right) \]
                                        3. lower-/.f64N/A

                                          \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{\color{blue}{y}}{z - a}\right) \]
                                        4. lower--.f64N/A

                                          \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right) \]
                                        5. lower-/.f64N/A

                                          \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{\color{blue}{z - a}}\right) \]
                                        6. lower--.f6452.4%

                                          \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - \color{blue}{a}}\right) \]
                                      6. Applied rewrites52.4%

                                        \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                      7. Taylor expanded in a around 0

                                        \[\leadsto t \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
                                      8. Step-by-step derivation
                                        1. lower--.f64N/A

                                          \[\leadsto t \cdot \left(1 - \frac{y}{\color{blue}{z}}\right) \]
                                        2. lower-/.f6437.4%

                                          \[\leadsto t \cdot \left(1 - \frac{y}{z}\right) \]
                                      9. Applied rewrites37.4%

                                        \[\leadsto t \cdot \left(1 - \color{blue}{\frac{y}{z}}\right) \]
                                    4. Recombined 2 regimes into one program.
                                    5. Add Preprocessing

                                    Alternative 18: 43.2% accurate, 0.9× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq 305000000000000013664634946977792:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \end{array} \]
                                    (FPCore (x y z t a)
                                      :precision binary64
                                      (if (<=
                                         y
                                         -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528)
                                      (* y (/ t (- a z)))
                                      (if (<= y 305000000000000013664634946977792)
                                        (+ t x)
                                        (* y (/ (- x t) z)))))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double tmp;
                                    	if (y <= -1.3e+147) {
                                    		tmp = y * (t / (a - z));
                                    	} else if (y <= 3.05e+32) {
                                    		tmp = t + x;
                                    	} else {
                                    		tmp = y * ((x - t) / z);
                                    	}
                                    	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 (y <= (-1.3d+147)) then
                                            tmp = y * (t / (a - z))
                                        else if (y <= 3.05d+32) then
                                            tmp = t + x
                                        else
                                            tmp = y * ((x - t) / z)
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y, double z, double t, double a) {
                                    	double tmp;
                                    	if (y <= -1.3e+147) {
                                    		tmp = y * (t / (a - z));
                                    	} else if (y <= 3.05e+32) {
                                    		tmp = t + x;
                                    	} else {
                                    		tmp = y * ((x - t) / z);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t, a):
                                    	tmp = 0
                                    	if y <= -1.3e+147:
                                    		tmp = y * (t / (a - z))
                                    	elif y <= 3.05e+32:
                                    		tmp = t + x
                                    	else:
                                    		tmp = y * ((x - t) / z)
                                    	return tmp
                                    
                                    function code(x, y, z, t, a)
                                    	tmp = 0.0
                                    	if (y <= -1.3e+147)
                                    		tmp = Float64(y * Float64(t / Float64(a - z)));
                                    	elseif (y <= 3.05e+32)
                                    		tmp = Float64(t + x);
                                    	else
                                    		tmp = Float64(y * Float64(Float64(x - t) / z));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t, a)
                                    	tmp = 0.0;
                                    	if (y <= -1.3e+147)
                                    		tmp = y * (t / (a - z));
                                    	elseif (y <= 3.05e+32)
                                    		tmp = t + x;
                                    	else
                                    		tmp = y * ((x - t) / z);
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 305000000000000013664634946977792], N[(t + x), $MachinePrecision], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
                                    
                                    \begin{array}{l}
                                    \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\
                                    \;\;\;\;y \cdot \frac{t}{a - z}\\
                                    
                                    \mathbf{elif}\;y \leq 305000000000000013664634946977792:\\
                                    \;\;\;\;t + x\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;y \cdot \frac{x - t}{z}\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if y < -1.2999999999999999e147

                                      1. Initial program 67.6%

                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                      2. Taylor expanded in y around inf

                                        \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                        2. lower--.f64N/A

                                          \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                        3. lower-/.f64N/A

                                          \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                        4. lower--.f64N/A

                                          \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                        5. lower-/.f64N/A

                                          \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                        6. lower--.f6441.6%

                                          \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                      4. Applied rewrites41.6%

                                        \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                      5. Taylor expanded in x around 0

                                        \[\leadsto y \cdot \frac{t}{\color{blue}{a - z}} \]
                                      6. Step-by-step derivation
                                        1. lower-/.f64N/A

                                          \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                        2. lower--.f6423.4%

                                          \[\leadsto y \cdot \frac{t}{a - z} \]
                                      7. Applied rewrites23.4%

                                        \[\leadsto y \cdot \frac{t}{\color{blue}{a - z}} \]

                                      if -1.2999999999999999e147 < y < 3.0500000000000001e32

                                      1. Initial program 67.6%

                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                      2. Taylor expanded in z around inf

                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                      3. Step-by-step derivation
                                        1. lower--.f6420.0%

                                          \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                      4. Applied rewrites20.0%

                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                      5. Taylor expanded in x around inf

                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                      6. Step-by-step derivation
                                        1. lower-*.f642.8%

                                          \[\leadsto x + -1 \cdot x \]
                                      7. Applied rewrites2.8%

                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                      8. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                        2. +-commutativeN/A

                                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                        3. lower-+.f642.8%

                                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                        4. lift-*.f64N/A

                                          \[\leadsto -1 \cdot x + x \]
                                        5. mul-1-negN/A

                                          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                        6. lower-neg.f642.8%

                                          \[\leadsto \left(-x\right) + x \]
                                      9. Applied rewrites2.8%

                                        \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                      10. Taylor expanded in x around 0

                                        \[\leadsto t + x \]
                                      11. Step-by-step derivation
                                        1. Applied rewrites34.3%

                                          \[\leadsto t + x \]

                                        if 3.0500000000000001e32 < y

                                        1. Initial program 67.6%

                                          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                        2. Taylor expanded in y around inf

                                          \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                          2. lower--.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                          3. lower-/.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                          4. lower--.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                          5. lower-/.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                          6. lower--.f6441.6%

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                        4. Applied rewrites41.6%

                                          \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                        5. Step-by-step derivation
                                          1. lift--.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                          2. lift-/.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                          3. lift-/.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                          4. sub-divN/A

                                            \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
                                          5. sub-negate-revN/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\color{blue}{a} - z} \]
                                          6. lift--.f64N/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - z} \]
                                          7. lift--.f64N/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - \color{blue}{z}} \]
                                          8. sub-negate-revN/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \]
                                          9. lift--.f64N/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \]
                                          10. frac-2neg-revN/A

                                            \[\leadsto y \cdot \frac{x - t}{\color{blue}{z - a}} \]
                                          11. div-flipN/A

                                            \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z - a}{x - t}}} \]
                                          12. metadata-evalN/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(-1\right)}{\frac{\color{blue}{z - a}}{x - t}} \]
                                          13. lower-unsound-/.f64N/A

                                            \[\leadsto y \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\frac{z - a}{x - t}}} \]
                                          14. metadata-evalN/A

                                            \[\leadsto y \cdot \frac{1}{\frac{\color{blue}{z - a}}{x - t}} \]
                                          15. lower-unsound-/.f6441.7%

                                            \[\leadsto y \cdot \frac{1}{\frac{z - a}{\color{blue}{x - t}}} \]
                                        6. Applied rewrites41.7%

                                          \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z - a}{x - t}}} \]
                                        7. Taylor expanded in z around inf

                                          \[\leadsto y \cdot \frac{x - t}{\color{blue}{z}} \]
                                        8. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto y \cdot \frac{x - t}{z} \]
                                          2. lower--.f6425.6%

                                            \[\leadsto y \cdot \frac{x - t}{z} \]
                                        9. Applied rewrites25.6%

                                          \[\leadsto y \cdot \frac{x - t}{\color{blue}{z}} \]
                                      12. Recombined 3 regimes into one program.
                                      13. Add Preprocessing

                                      Alternative 19: 42.6% accurate, 0.9× speedup?

                                      \[\begin{array}{l} \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\ \;\;\;\;y \cdot \frac{t}{a - z}\\ \mathbf{elif}\;y \leq 94999999999999994488169700123549150507398221570116778180359052610744099441334856712192:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{x}{z - a}\\ \end{array} \]
                                      (FPCore (x y z t a)
                                        :precision binary64
                                        (if (<=
                                           y
                                           -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528)
                                        (* y (/ t (- a z)))
                                        (if (<=
                                             y
                                             94999999999999994488169700123549150507398221570116778180359052610744099441334856712192)
                                          (+ t x)
                                          (* y (/ x (- z a))))))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double tmp;
                                      	if (y <= -1.3e+147) {
                                      		tmp = y * (t / (a - z));
                                      	} else if (y <= 9.5e+85) {
                                      		tmp = t + x;
                                      	} else {
                                      		tmp = y * (x / (z - a));
                                      	}
                                      	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 (y <= (-1.3d+147)) then
                                              tmp = y * (t / (a - z))
                                          else if (y <= 9.5d+85) then
                                              tmp = t + x
                                          else
                                              tmp = y * (x / (z - a))
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a) {
                                      	double tmp;
                                      	if (y <= -1.3e+147) {
                                      		tmp = y * (t / (a - z));
                                      	} else if (y <= 9.5e+85) {
                                      		tmp = t + x;
                                      	} else {
                                      		tmp = y * (x / (z - a));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a):
                                      	tmp = 0
                                      	if y <= -1.3e+147:
                                      		tmp = y * (t / (a - z))
                                      	elif y <= 9.5e+85:
                                      		tmp = t + x
                                      	else:
                                      		tmp = y * (x / (z - a))
                                      	return tmp
                                      
                                      function code(x, y, z, t, a)
                                      	tmp = 0.0
                                      	if (y <= -1.3e+147)
                                      		tmp = Float64(y * Float64(t / Float64(a - z)));
                                      	elseif (y <= 9.5e+85)
                                      		tmp = Float64(t + x);
                                      	else
                                      		tmp = Float64(y * Float64(x / Float64(z - a)));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a)
                                      	tmp = 0.0;
                                      	if (y <= -1.3e+147)
                                      		tmp = y * (t / (a - z));
                                      	elseif (y <= 9.5e+85)
                                      		tmp = t + x;
                                      	else
                                      		tmp = y * (x / (z - a));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 94999999999999994488169700123549150507398221570116778180359052610744099441334856712192], N[(t + x), $MachinePrecision], N[(y * N[(x / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\
                                      \;\;\;\;y \cdot \frac{t}{a - z}\\
                                      
                                      \mathbf{elif}\;y \leq 94999999999999994488169700123549150507398221570116778180359052610744099441334856712192:\\
                                      \;\;\;\;t + x\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;y \cdot \frac{x}{z - a}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if y < -1.2999999999999999e147

                                        1. Initial program 67.6%

                                          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                        2. Taylor expanded in y around inf

                                          \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                          2. lower--.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                          3. lower-/.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                          4. lower--.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                          5. lower-/.f64N/A

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                          6. lower--.f6441.6%

                                            \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                        4. Applied rewrites41.6%

                                          \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                        5. Taylor expanded in x around 0

                                          \[\leadsto y \cdot \frac{t}{\color{blue}{a - z}} \]
                                        6. Step-by-step derivation
                                          1. lower-/.f64N/A

                                            \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                          2. lower--.f6423.4%

                                            \[\leadsto y \cdot \frac{t}{a - z} \]
                                        7. Applied rewrites23.4%

                                          \[\leadsto y \cdot \frac{t}{\color{blue}{a - z}} \]

                                        if -1.2999999999999999e147 < y < 9.4999999999999994e85

                                        1. Initial program 67.6%

                                          \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                        2. Taylor expanded in z around inf

                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                        3. Step-by-step derivation
                                          1. lower--.f6420.0%

                                            \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                        4. Applied rewrites20.0%

                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                        5. Taylor expanded in x around inf

                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                        6. Step-by-step derivation
                                          1. lower-*.f642.8%

                                            \[\leadsto x + -1 \cdot x \]
                                        7. Applied rewrites2.8%

                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                        8. Step-by-step derivation
                                          1. lift-+.f64N/A

                                            \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                          2. +-commutativeN/A

                                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                          3. lower-+.f642.8%

                                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                          4. lift-*.f64N/A

                                            \[\leadsto -1 \cdot x + x \]
                                          5. mul-1-negN/A

                                            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                          6. lower-neg.f642.8%

                                            \[\leadsto \left(-x\right) + x \]
                                        9. Applied rewrites2.8%

                                          \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                        10. Taylor expanded in x around 0

                                          \[\leadsto t + x \]
                                        11. Step-by-step derivation
                                          1. Applied rewrites34.3%

                                            \[\leadsto t + x \]

                                          if 9.4999999999999994e85 < y

                                          1. Initial program 67.6%

                                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                          2. Taylor expanded in y around inf

                                            \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                          3. Step-by-step derivation
                                            1. lower-*.f64N/A

                                              \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                            2. lower--.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                            3. lower-/.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                            4. lower--.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                            5. lower-/.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                            6. lower--.f6441.6%

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                          4. Applied rewrites41.6%

                                            \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                          5. Step-by-step derivation
                                            1. lift--.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                            2. lift-/.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                            3. lift-/.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                            4. sub-divN/A

                                              \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
                                            5. sub-negate-revN/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\color{blue}{a} - z} \]
                                            6. lift--.f64N/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - z} \]
                                            7. lift--.f64N/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - \color{blue}{z}} \]
                                            8. sub-negate-revN/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \]
                                            9. lift--.f64N/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \]
                                            10. frac-2neg-revN/A

                                              \[\leadsto y \cdot \frac{x - t}{\color{blue}{z - a}} \]
                                            11. div-flipN/A

                                              \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z - a}{x - t}}} \]
                                            12. metadata-evalN/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(-1\right)}{\frac{\color{blue}{z - a}}{x - t}} \]
                                            13. lower-unsound-/.f64N/A

                                              \[\leadsto y \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\frac{z - a}{x - t}}} \]
                                            14. metadata-evalN/A

                                              \[\leadsto y \cdot \frac{1}{\frac{\color{blue}{z - a}}{x - t}} \]
                                            15. lower-unsound-/.f6441.7%

                                              \[\leadsto y \cdot \frac{1}{\frac{z - a}{\color{blue}{x - t}}} \]
                                          6. Applied rewrites41.7%

                                            \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z - a}{x - t}}} \]
                                          7. Taylor expanded in x around inf

                                            \[\leadsto y \cdot \frac{x}{\color{blue}{z - a}} \]
                                          8. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto y \cdot \frac{x}{z - \color{blue}{a}} \]
                                            2. lower--.f6422.9%

                                              \[\leadsto y \cdot \frac{x}{z - a} \]
                                          9. Applied rewrites22.9%

                                            \[\leadsto y \cdot \frac{x}{\color{blue}{z - a}} \]
                                        12. Recombined 3 regimes into one program.
                                        13. Add Preprocessing

                                        Alternative 20: 42.4% accurate, 0.9× speedup?

                                        \[\begin{array}{l} t_1 := y \cdot \frac{t}{a - z}\\ \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 920000000000000017773994917407618219622006784:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                        (FPCore (x y z t a)
                                          :precision binary64
                                          (let* ((t_1 (* y (/ t (- a z)))))
                                          (if (<=
                                               y
                                               -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528)
                                            t_1
                                            (if (<= y 920000000000000017773994917407618219622006784)
                                              (+ t x)
                                              t_1))))
                                        double code(double x, double y, double z, double t, double a) {
                                        	double t_1 = y * (t / (a - z));
                                        	double tmp;
                                        	if (y <= -1.3e+147) {
                                        		tmp = t_1;
                                        	} else if (y <= 9.2e+44) {
                                        		tmp = t + x;
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        module fmin_fmax_functions
                                            implicit none
                                            private
                                            public fmax
                                            public fmin
                                        
                                            interface fmax
                                                module procedure fmax88
                                                module procedure fmax44
                                                module procedure fmax84
                                                module procedure fmax48
                                            end interface
                                            interface fmin
                                                module procedure fmin88
                                                module procedure fmin44
                                                module procedure fmin84
                                                module procedure fmin48
                                            end interface
                                        contains
                                            real(8) function fmax88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmax44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmax84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmax48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmin44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmin48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                            end function
                                        end module
                                        
                                        real(8) function code(x, y, z, t, a)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            real(8), intent (in) :: z
                                            real(8), intent (in) :: t
                                            real(8), intent (in) :: a
                                            real(8) :: t_1
                                            real(8) :: tmp
                                            t_1 = y * (t / (a - z))
                                            if (y <= (-1.3d+147)) then
                                                tmp = t_1
                                            else if (y <= 9.2d+44) then
                                                tmp = t + x
                                            else
                                                tmp = t_1
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double x, double y, double z, double t, double a) {
                                        	double t_1 = y * (t / (a - z));
                                        	double tmp;
                                        	if (y <= -1.3e+147) {
                                        		tmp = t_1;
                                        	} else if (y <= 9.2e+44) {
                                        		tmp = t + x;
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z, t, a):
                                        	t_1 = y * (t / (a - z))
                                        	tmp = 0
                                        	if y <= -1.3e+147:
                                        		tmp = t_1
                                        	elif y <= 9.2e+44:
                                        		tmp = t + x
                                        	else:
                                        		tmp = t_1
                                        	return tmp
                                        
                                        function code(x, y, z, t, a)
                                        	t_1 = Float64(y * Float64(t / Float64(a - z)))
                                        	tmp = 0.0
                                        	if (y <= -1.3e+147)
                                        		tmp = t_1;
                                        	elseif (y <= 9.2e+44)
                                        		tmp = Float64(t + x);
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z, t, a)
                                        	t_1 = y * (t / (a - z));
                                        	tmp = 0.0;
                                        	if (y <= -1.3e+147)
                                        		tmp = t_1;
                                        	elseif (y <= 9.2e+44)
                                        		tmp = t + x;
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528], t$95$1, If[LessEqual[y, 920000000000000017773994917407618219622006784], N[(t + x), $MachinePrecision], t$95$1]]]
                                        
                                        \begin{array}{l}
                                        t_1 := y \cdot \frac{t}{a - z}\\
                                        \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;y \leq 920000000000000017773994917407618219622006784:\\
                                        \;\;\;\;t + x\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if y < -1.2999999999999999e147 or 9.2000000000000002e44 < y

                                          1. Initial program 67.6%

                                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                          2. Taylor expanded in y around inf

                                            \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                          3. Step-by-step derivation
                                            1. lower-*.f64N/A

                                              \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                            2. lower--.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                            3. lower-/.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                            4. lower--.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                            5. lower-/.f64N/A

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                            6. lower--.f6441.6%

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                          4. Applied rewrites41.6%

                                            \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                          5. Taylor expanded in x around 0

                                            \[\leadsto y \cdot \frac{t}{\color{blue}{a - z}} \]
                                          6. Step-by-step derivation
                                            1. lower-/.f64N/A

                                              \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                            2. lower--.f6423.4%

                                              \[\leadsto y \cdot \frac{t}{a - z} \]
                                          7. Applied rewrites23.4%

                                            \[\leadsto y \cdot \frac{t}{\color{blue}{a - z}} \]

                                          if -1.2999999999999999e147 < y < 9.2000000000000002e44

                                          1. Initial program 67.6%

                                            \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                          2. Taylor expanded in z around inf

                                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                          3. Step-by-step derivation
                                            1. lower--.f6420.0%

                                              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                          4. Applied rewrites20.0%

                                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                          5. Taylor expanded in x around inf

                                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                          6. Step-by-step derivation
                                            1. lower-*.f642.8%

                                              \[\leadsto x + -1 \cdot x \]
                                          7. Applied rewrites2.8%

                                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                          8. Step-by-step derivation
                                            1. lift-+.f64N/A

                                              \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                            2. +-commutativeN/A

                                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                            3. lower-+.f642.8%

                                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                            4. lift-*.f64N/A

                                              \[\leadsto -1 \cdot x + x \]
                                            5. mul-1-negN/A

                                              \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                            6. lower-neg.f642.8%

                                              \[\leadsto \left(-x\right) + x \]
                                          9. Applied rewrites2.8%

                                            \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                          10. Taylor expanded in x around 0

                                            \[\leadsto t + x \]
                                          11. Step-by-step derivation
                                            1. Applied rewrites34.3%

                                              \[\leadsto t + x \]
                                          12. Recombined 2 regimes into one program.
                                          13. Add Preprocessing

                                          Alternative 21: 41.9% accurate, 0.9× speedup?

                                          \[\begin{array}{l} t_1 := \frac{y \cdot \left(x - t\right)}{z}\\ \mathbf{if}\;y \leq -3150000000000000064284969159874311689514361096988281839886662509860462691717156695854977457588840479124276687248905910808558607317955988038119305882107904:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 11199999999999999266636761500785285580346219368070827845276274434151467108484710924288:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                          (FPCore (x y z t a)
                                            :precision binary64
                                            (let* ((t_1 (/ (* y (- x t)) z)))
                                            (if (<=
                                                 y
                                                 -3150000000000000064284969159874311689514361096988281839886662509860462691717156695854977457588840479124276687248905910808558607317955988038119305882107904)
                                              t_1
                                              (if (<=
                                                   y
                                                   11199999999999999266636761500785285580346219368070827845276274434151467108484710924288)
                                                (+ t x)
                                                t_1))))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double t_1 = (y * (x - t)) / z;
                                          	double tmp;
                                          	if (y <= -3.15e+153) {
                                          		tmp = t_1;
                                          	} else if (y <= 1.12e+85) {
                                          		tmp = t + x;
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          module fmin_fmax_functions
                                              implicit none
                                              private
                                              public fmax
                                              public fmin
                                          
                                              interface fmax
                                                  module procedure fmax88
                                                  module procedure fmax44
                                                  module procedure fmax84
                                                  module procedure fmax48
                                              end interface
                                              interface fmin
                                                  module procedure fmin88
                                                  module procedure fmin44
                                                  module procedure fmin84
                                                  module procedure fmin48
                                              end interface
                                          contains
                                              real(8) function fmax88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmax44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmax84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmax48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin88(x, y) result (res)
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(4) function fmin44(x, y) result (res)
                                                  real(4), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                              end function
                                              real(8) function fmin84(x, y) result(res)
                                                  real(8), intent (in) :: x
                                                  real(4), intent (in) :: y
                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                              end function
                                              real(8) function fmin48(x, y) result(res)
                                                  real(4), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                              end function
                                          end module
                                          
                                          real(8) function code(x, y, z, t, a)
                                          use fmin_fmax_functions
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              real(8), intent (in) :: z
                                              real(8), intent (in) :: t
                                              real(8), intent (in) :: a
                                              real(8) :: t_1
                                              real(8) :: tmp
                                              t_1 = (y * (x - t)) / z
                                              if (y <= (-3.15d+153)) then
                                                  tmp = t_1
                                              else if (y <= 1.12d+85) then
                                                  tmp = t + x
                                              else
                                                  tmp = t_1
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t, double a) {
                                          	double t_1 = (y * (x - t)) / z;
                                          	double tmp;
                                          	if (y <= -3.15e+153) {
                                          		tmp = t_1;
                                          	} else if (y <= 1.12e+85) {
                                          		tmp = t + x;
                                          	} else {
                                          		tmp = t_1;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a):
                                          	t_1 = (y * (x - t)) / z
                                          	tmp = 0
                                          	if y <= -3.15e+153:
                                          		tmp = t_1
                                          	elif y <= 1.12e+85:
                                          		tmp = t + x
                                          	else:
                                          		tmp = t_1
                                          	return tmp
                                          
                                          function code(x, y, z, t, a)
                                          	t_1 = Float64(Float64(y * Float64(x - t)) / z)
                                          	tmp = 0.0
                                          	if (y <= -3.15e+153)
                                          		tmp = t_1;
                                          	elseif (y <= 1.12e+85)
                                          		tmp = Float64(t + x);
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x, y, z, t, a)
                                          	t_1 = (y * (x - t)) / z;
                                          	tmp = 0.0;
                                          	if (y <= -3.15e+153)
                                          		tmp = t_1;
                                          	elseif (y <= 1.12e+85)
                                          		tmp = t + x;
                                          	else
                                          		tmp = t_1;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -3150000000000000064284969159874311689514361096988281839886662509860462691717156695854977457588840479124276687248905910808558607317955988038119305882107904], t$95$1, If[LessEqual[y, 11199999999999999266636761500785285580346219368070827845276274434151467108484710924288], N[(t + x), $MachinePrecision], t$95$1]]]
                                          
                                          \begin{array}{l}
                                          t_1 := \frac{y \cdot \left(x - t\right)}{z}\\
                                          \mathbf{if}\;y \leq -3150000000000000064284969159874311689514361096988281839886662509860462691717156695854977457588840479124276687248905910808558607317955988038119305882107904:\\
                                          \;\;\;\;t\_1\\
                                          
                                          \mathbf{elif}\;y \leq 11199999999999999266636761500785285580346219368070827845276274434151467108484710924288:\\
                                          \;\;\;\;t + x\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;t\_1\\
                                          
                                          
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if y < -3.1500000000000001e153 or 1.1199999999999999e85 < y

                                            1. Initial program 67.6%

                                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                            2. Taylor expanded in y around inf

                                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                            3. Step-by-step derivation
                                              1. lower-*.f64N/A

                                                \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                              2. lower--.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                              3. lower-/.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                              4. lower--.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                              5. lower-/.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                              6. lower--.f6441.6%

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                            4. Applied rewrites41.6%

                                              \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                            5. Step-by-step derivation
                                              1. lift--.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                              2. lift-/.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                              3. lift-/.f64N/A

                                                \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                              4. sub-divN/A

                                                \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
                                              5. sub-negate-revN/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\color{blue}{a} - z} \]
                                              6. lift--.f64N/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - z} \]
                                              7. lift--.f64N/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - \color{blue}{z}} \]
                                              8. sub-negate-revN/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \]
                                              9. lift--.f64N/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{\mathsf{neg}\left(\left(z - a\right)\right)} \]
                                              10. frac-2neg-revN/A

                                                \[\leadsto y \cdot \frac{x - t}{\color{blue}{z - a}} \]
                                              11. div-flipN/A

                                                \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z - a}{x - t}}} \]
                                              12. metadata-evalN/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(-1\right)}{\frac{\color{blue}{z - a}}{x - t}} \]
                                              13. lower-unsound-/.f64N/A

                                                \[\leadsto y \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\frac{z - a}{x - t}}} \]
                                              14. metadata-evalN/A

                                                \[\leadsto y \cdot \frac{1}{\frac{\color{blue}{z - a}}{x - t}} \]
                                              15. lower-unsound-/.f6441.7%

                                                \[\leadsto y \cdot \frac{1}{\frac{z - a}{\color{blue}{x - t}}} \]
                                            6. Applied rewrites41.7%

                                              \[\leadsto y \cdot \frac{1}{\color{blue}{\frac{z - a}{x - t}}} \]
                                            7. Taylor expanded in z around inf

                                              \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z}} \]
                                            8. Step-by-step derivation
                                              1. lower-/.f64N/A

                                                \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                                              2. lower-*.f64N/A

                                                \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                                              3. lower--.f6423.4%

                                                \[\leadsto \frac{y \cdot \left(x - t\right)}{z} \]
                                            9. Applied rewrites23.4%

                                              \[\leadsto \frac{y \cdot \left(x - t\right)}{\color{blue}{z}} \]

                                            if -3.1500000000000001e153 < y < 1.1199999999999999e85

                                            1. Initial program 67.6%

                                              \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                            2. Taylor expanded in z around inf

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            3. Step-by-step derivation
                                              1. lower--.f6420.0%

                                                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                            4. Applied rewrites20.0%

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            5. Taylor expanded in x around inf

                                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                            6. Step-by-step derivation
                                              1. lower-*.f642.8%

                                                \[\leadsto x + -1 \cdot x \]
                                            7. Applied rewrites2.8%

                                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                            8. Step-by-step derivation
                                              1. lift-+.f64N/A

                                                \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                              2. +-commutativeN/A

                                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                              3. lower-+.f642.8%

                                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                              4. lift-*.f64N/A

                                                \[\leadsto -1 \cdot x + x \]
                                              5. mul-1-negN/A

                                                \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                              6. lower-neg.f642.8%

                                                \[\leadsto \left(-x\right) + x \]
                                            9. Applied rewrites2.8%

                                              \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                            10. Taylor expanded in x around 0

                                              \[\leadsto t + x \]
                                            11. Step-by-step derivation
                                              1. Applied rewrites34.3%

                                                \[\leadsto t + x \]
                                            12. Recombined 2 regimes into one program.
                                            13. Add Preprocessing

                                            Alternative 22: 40.3% accurate, 0.9× speedup?

                                            \[\begin{array}{l} t_1 := \frac{t \cdot y}{a - z}\\ \mathbf{if}\;y \leq -50999999999999999913463833549768098307226747205863239969121231761549111670275507377143393897037216678997213998797862879886381730568557053240719466212871897088:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 180000000000000016537542150923784084643392395473784873467797301027047301048967180400844950344295254010622589839497394619678720:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                            (FPCore (x y z t a)
                                              :precision binary64
                                              (let* ((t_1 (/ (* t y) (- a z))))
                                              (if (<=
                                                   y
                                                   -50999999999999999913463833549768098307226747205863239969121231761549111670275507377143393897037216678997213998797862879886381730568557053240719466212871897088)
                                                t_1
                                                (if (<=
                                                     y
                                                     180000000000000016537542150923784084643392395473784873467797301027047301048967180400844950344295254010622589839497394619678720)
                                                  (+ t x)
                                                  t_1))))
                                            double code(double x, double y, double z, double t, double a) {
                                            	double t_1 = (t * y) / (a - z);
                                            	double tmp;
                                            	if (y <= -5.1e+157) {
                                            		tmp = t_1;
                                            	} else if (y <= 1.8e+125) {
                                            		tmp = t + x;
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            module fmin_fmax_functions
                                                implicit none
                                                private
                                                public fmax
                                                public fmin
                                            
                                                interface fmax
                                                    module procedure fmax88
                                                    module procedure fmax44
                                                    module procedure fmax84
                                                    module procedure fmax48
                                                end interface
                                                interface fmin
                                                    module procedure fmin88
                                                    module procedure fmin44
                                                    module procedure fmin84
                                                    module procedure fmin48
                                                end interface
                                            contains
                                                real(8) function fmax88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmax44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmax84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmax48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin88(x, y) result (res)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(4) function fmin44(x, y) result (res)
                                                    real(4), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                end function
                                                real(8) function fmin84(x, y) result(res)
                                                    real(8), intent (in) :: x
                                                    real(4), intent (in) :: y
                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                end function
                                                real(8) function fmin48(x, y) result(res)
                                                    real(4), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                end function
                                            end module
                                            
                                            real(8) function code(x, y, z, t, a)
                                            use fmin_fmax_functions
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8), intent (in) :: t
                                                real(8), intent (in) :: a
                                                real(8) :: t_1
                                                real(8) :: tmp
                                                t_1 = (t * y) / (a - z)
                                                if (y <= (-5.1d+157)) then
                                                    tmp = t_1
                                                else if (y <= 1.8d+125) then
                                                    tmp = t + x
                                                else
                                                    tmp = t_1
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a) {
                                            	double t_1 = (t * y) / (a - z);
                                            	double tmp;
                                            	if (y <= -5.1e+157) {
                                            		tmp = t_1;
                                            	} else if (y <= 1.8e+125) {
                                            		tmp = t + x;
                                            	} else {
                                            		tmp = t_1;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a):
                                            	t_1 = (t * y) / (a - z)
                                            	tmp = 0
                                            	if y <= -5.1e+157:
                                            		tmp = t_1
                                            	elif y <= 1.8e+125:
                                            		tmp = t + x
                                            	else:
                                            		tmp = t_1
                                            	return tmp
                                            
                                            function code(x, y, z, t, a)
                                            	t_1 = Float64(Float64(t * y) / Float64(a - z))
                                            	tmp = 0.0
                                            	if (y <= -5.1e+157)
                                            		tmp = t_1;
                                            	elseif (y <= 1.8e+125)
                                            		tmp = Float64(t + x);
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a)
                                            	t_1 = (t * y) / (a - z);
                                            	tmp = 0.0;
                                            	if (y <= -5.1e+157)
                                            		tmp = t_1;
                                            	elseif (y <= 1.8e+125)
                                            		tmp = t + x;
                                            	else
                                            		tmp = t_1;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -50999999999999999913463833549768098307226747205863239969121231761549111670275507377143393897037216678997213998797862879886381730568557053240719466212871897088], t$95$1, If[LessEqual[y, 180000000000000016537542150923784084643392395473784873467797301027047301048967180400844950344295254010622589839497394619678720], N[(t + x), $MachinePrecision], t$95$1]]]
                                            
                                            \begin{array}{l}
                                            t_1 := \frac{t \cdot y}{a - z}\\
                                            \mathbf{if}\;y \leq -50999999999999999913463833549768098307226747205863239969121231761549111670275507377143393897037216678997213998797862879886381730568557053240719466212871897088:\\
                                            \;\;\;\;t\_1\\
                                            
                                            \mathbf{elif}\;y \leq 180000000000000016537542150923784084643392395473784873467797301027047301048967180400844950344295254010622589839497394619678720:\\
                                            \;\;\;\;t + x\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_1\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if y < -5.1e157 or 1.8000000000000002e125 < y

                                              1. Initial program 67.6%

                                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                              2. Taylor expanded in y around inf

                                                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                              3. Step-by-step derivation
                                                1. lower-*.f64N/A

                                                  \[\leadsto y \cdot \color{blue}{\left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                                2. lower--.f64N/A

                                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \color{blue}{\frac{x}{a - z}}\right) \]
                                                3. lower-/.f64N/A

                                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{\color{blue}{x}}{a - z}\right) \]
                                                4. lower--.f64N/A

                                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \]
                                                5. lower-/.f64N/A

                                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                                6. lower--.f6441.6%

                                                  \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{a - \color{blue}{z}}\right) \]
                                              4. Applied rewrites41.6%

                                                \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                              5. Taylor expanded in x around 0

                                                \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                              6. Step-by-step derivation
                                                1. lower-/.f64N/A

                                                  \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
                                                2. lower-*.f64N/A

                                                  \[\leadsto \frac{t \cdot y}{a - z} \]
                                                3. lower--.f6421.6%

                                                  \[\leadsto \frac{t \cdot y}{a - z} \]
                                              7. Applied rewrites21.6%

                                                \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]

                                              if -5.1e157 < y < 1.8000000000000002e125

                                              1. Initial program 67.6%

                                                \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                              2. Taylor expanded in z around inf

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                              3. Step-by-step derivation
                                                1. lower--.f6420.0%

                                                  \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                              4. Applied rewrites20.0%

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                              5. Taylor expanded in x around inf

                                                \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                              6. Step-by-step derivation
                                                1. lower-*.f642.8%

                                                  \[\leadsto x + -1 \cdot x \]
                                              7. Applied rewrites2.8%

                                                \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                              8. Step-by-step derivation
                                                1. lift-+.f64N/A

                                                  \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                2. +-commutativeN/A

                                                  \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                3. lower-+.f642.8%

                                                  \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                4. lift-*.f64N/A

                                                  \[\leadsto -1 \cdot x + x \]
                                                5. mul-1-negN/A

                                                  \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                6. lower-neg.f642.8%

                                                  \[\leadsto \left(-x\right) + x \]
                                              9. Applied rewrites2.8%

                                                \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                              10. Taylor expanded in x around 0

                                                \[\leadsto t + x \]
                                              11. Step-by-step derivation
                                                1. Applied rewrites34.3%

                                                  \[\leadsto t + x \]
                                              12. Recombined 2 regimes into one program.
                                              13. Add Preprocessing

                                              Alternative 23: 39.4% accurate, 1.0× speedup?

                                              \[\begin{array}{l} t_1 := t \cdot \frac{y}{a}\\ \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                              (FPCore (x y z t a)
                                                :precision binary64
                                                (let* ((t_1 (* t (/ y a))))
                                                (if (<=
                                                     y
                                                     -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528)
                                                  t_1
                                                  (if (<=
                                                       y
                                                       295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160)
                                                    (+ t x)
                                                    t_1))))
                                              double code(double x, double y, double z, double t, double a) {
                                              	double t_1 = t * (y / a);
                                              	double tmp;
                                              	if (y <= -1.3e+147) {
                                              		tmp = t_1;
                                              	} else if (y <= 2.95e+206) {
                                              		tmp = t + x;
                                              	} else {
                                              		tmp = t_1;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              module fmin_fmax_functions
                                                  implicit none
                                                  private
                                                  public fmax
                                                  public fmin
                                              
                                                  interface fmax
                                                      module procedure fmax88
                                                      module procedure fmax44
                                                      module procedure fmax84
                                                      module procedure fmax48
                                                  end interface
                                                  interface fmin
                                                      module procedure fmin88
                                                      module procedure fmin44
                                                      module procedure fmin84
                                                      module procedure fmin48
                                                  end interface
                                              contains
                                                  real(8) function fmax88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmax44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmax48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin88(x, y) result (res)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(4) function fmin44(x, y) result (res)
                                                      real(4), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin84(x, y) result(res)
                                                      real(8), intent (in) :: x
                                                      real(4), intent (in) :: y
                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                  end function
                                                  real(8) function fmin48(x, y) result(res)
                                                      real(4), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                  end function
                                              end module
                                              
                                              real(8) function code(x, y, z, t, a)
                                              use fmin_fmax_functions
                                                  real(8), intent (in) :: x
                                                  real(8), intent (in) :: y
                                                  real(8), intent (in) :: z
                                                  real(8), intent (in) :: t
                                                  real(8), intent (in) :: a
                                                  real(8) :: t_1
                                                  real(8) :: tmp
                                                  t_1 = t * (y / a)
                                                  if (y <= (-1.3d+147)) then
                                                      tmp = t_1
                                                  else if (y <= 2.95d+206) then
                                                      tmp = t + x
                                                  else
                                                      tmp = t_1
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x, double y, double z, double t, double a) {
                                              	double t_1 = t * (y / a);
                                              	double tmp;
                                              	if (y <= -1.3e+147) {
                                              		tmp = t_1;
                                              	} else if (y <= 2.95e+206) {
                                              		tmp = t + x;
                                              	} else {
                                              		tmp = t_1;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x, y, z, t, a):
                                              	t_1 = t * (y / a)
                                              	tmp = 0
                                              	if y <= -1.3e+147:
                                              		tmp = t_1
                                              	elif y <= 2.95e+206:
                                              		tmp = t + x
                                              	else:
                                              		tmp = t_1
                                              	return tmp
                                              
                                              function code(x, y, z, t, a)
                                              	t_1 = Float64(t * Float64(y / a))
                                              	tmp = 0.0
                                              	if (y <= -1.3e+147)
                                              		tmp = t_1;
                                              	elseif (y <= 2.95e+206)
                                              		tmp = Float64(t + x);
                                              	else
                                              		tmp = t_1;
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x, y, z, t, a)
                                              	t_1 = t * (y / a);
                                              	tmp = 0.0;
                                              	if (y <= -1.3e+147)
                                              		tmp = t_1;
                                              	elseif (y <= 2.95e+206)
                                              		tmp = t + x;
                                              	else
                                              		tmp = t_1;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528], t$95$1, If[LessEqual[y, 295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160], N[(t + x), $MachinePrecision], t$95$1]]]
                                              
                                              \begin{array}{l}
                                              t_1 := t \cdot \frac{y}{a}\\
                                              \mathbf{if}\;y \leq -1299999999999999935905125042608528024070569499276670001017534653649590958815701108287851124338230693249026350807211601062882461692784770903103766528:\\
                                              \;\;\;\;t\_1\\
                                              
                                              \mathbf{elif}\;y \leq 295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160:\\
                                              \;\;\;\;t + x\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if y < -1.2999999999999999e147 or 2.95e206 < y

                                                1. Initial program 67.6%

                                                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                                2. Taylor expanded in x around 0

                                                  \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites55.5%

                                                    \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                                  2. Step-by-step derivation
                                                    1. lift-+.f64N/A

                                                      \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot t}{a - z}} \]
                                                    2. add-flipN/A

                                                      \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)} \]
                                                    3. sub-flipN/A

                                                      \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)\right)\right)} \]
                                                    4. lift-/.f64N/A

                                                      \[\leadsto x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}}\right)\right)\right)\right) \]
                                                    5. distribute-neg-frac2N/A

                                                      \[\leadsto x + \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(a - z\right)\right)}}\right)\right) \]
                                                    6. lift--.f64N/A

                                                      \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}\right)\right) \]
                                                    7. sub-negate-revN/A

                                                      \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                                    8. lift--.f64N/A

                                                      \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                                    9. distribute-frac-neg2N/A

                                                      \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(z - a\right)\right)}} \]
                                                    10. lift--.f64N/A

                                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \]
                                                    11. sub-negate-revN/A

                                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                                    12. lift--.f64N/A

                                                      \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                                    13. lift-*.f64N/A

                                                      \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
                                                    14. associate-/l*N/A

                                                      \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                                    15. *-commutativeN/A

                                                      \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
                                                    16. fp-cancel-sign-sub-invN/A

                                                      \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{t}{a - z}\right)\right) \cdot \left(y - z\right)} \]
                                                  3. Applied rewrites64.3%

                                                    \[\leadsto \color{blue}{x - \frac{t}{z - a} \cdot \left(y - z\right)} \]
                                                  4. Taylor expanded in t around inf

                                                    \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                                  5. Step-by-step derivation
                                                    1. lower-*.f64N/A

                                                      \[\leadsto t \cdot \color{blue}{\left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                                    2. lower--.f64N/A

                                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \color{blue}{\frac{y}{z - a}}\right) \]
                                                    3. lower-/.f64N/A

                                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{\color{blue}{y}}{z - a}\right) \]
                                                    4. lower--.f64N/A

                                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right) \]
                                                    5. lower-/.f64N/A

                                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{\color{blue}{z - a}}\right) \]
                                                    6. lower--.f6452.4%

                                                      \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - \color{blue}{a}}\right) \]
                                                  6. Applied rewrites52.4%

                                                    \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                                  7. Taylor expanded in z around 0

                                                    \[\leadsto t \cdot \frac{y}{\color{blue}{a}} \]
                                                  8. Step-by-step derivation
                                                    1. lower-/.f6418.9%

                                                      \[\leadsto t \cdot \frac{y}{a} \]
                                                  9. Applied rewrites18.9%

                                                    \[\leadsto t \cdot \frac{y}{\color{blue}{a}} \]

                                                  if -1.2999999999999999e147 < y < 2.95e206

                                                  1. Initial program 67.6%

                                                    \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                                  2. Taylor expanded in z around inf

                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                  3. Step-by-step derivation
                                                    1. lower--.f6420.0%

                                                      \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                  4. Applied rewrites20.0%

                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                  5. Taylor expanded in x around inf

                                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                  6. Step-by-step derivation
                                                    1. lower-*.f642.8%

                                                      \[\leadsto x + -1 \cdot x \]
                                                  7. Applied rewrites2.8%

                                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                  8. Step-by-step derivation
                                                    1. lift-+.f64N/A

                                                      \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                    2. +-commutativeN/A

                                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                    3. lower-+.f642.8%

                                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                    4. lift-*.f64N/A

                                                      \[\leadsto -1 \cdot x + x \]
                                                    5. mul-1-negN/A

                                                      \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                    6. lower-neg.f642.8%

                                                      \[\leadsto \left(-x\right) + x \]
                                                  9. Applied rewrites2.8%

                                                    \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                  10. Taylor expanded in x around 0

                                                    \[\leadsto t + x \]
                                                  11. Step-by-step derivation
                                                    1. Applied rewrites34.3%

                                                      \[\leadsto t + x \]
                                                  12. Recombined 2 regimes into one program.
                                                  13. Add Preprocessing

                                                  Alternative 24: 35.9% accurate, 1.3× speedup?

                                                  \[\begin{array}{l} \mathbf{if}\;y \leq 295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \end{array} \]
                                                  (FPCore (x y z t a)
                                                    :precision binary64
                                                    (if (<=
                                                       y
                                                       295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160)
                                                    (+ t x)
                                                    (/ (* t y) a)))
                                                  double code(double x, double y, double z, double t, double a) {
                                                  	double tmp;
                                                  	if (y <= 2.95e+206) {
                                                  		tmp = t + x;
                                                  	} else {
                                                  		tmp = (t * y) / a;
                                                  	}
                                                  	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 (y <= 2.95d+206) then
                                                          tmp = t + x
                                                      else
                                                          tmp = (t * y) / a
                                                      end if
                                                      code = tmp
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z, double t, double a) {
                                                  	double tmp;
                                                  	if (y <= 2.95e+206) {
                                                  		tmp = t + x;
                                                  	} else {
                                                  		tmp = (t * y) / a;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x, y, z, t, a):
                                                  	tmp = 0
                                                  	if y <= 2.95e+206:
                                                  		tmp = t + x
                                                  	else:
                                                  		tmp = (t * y) / a
                                                  	return tmp
                                                  
                                                  function code(x, y, z, t, a)
                                                  	tmp = 0.0
                                                  	if (y <= 2.95e+206)
                                                  		tmp = Float64(t + x);
                                                  	else
                                                  		tmp = Float64(Float64(t * y) / a);
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x, y, z, t, a)
                                                  	tmp = 0.0;
                                                  	if (y <= 2.95e+206)
                                                  		tmp = t + x;
                                                  	else
                                                  		tmp = (t * y) / a;
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_] := If[LessEqual[y, 295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160], N[(t + x), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  \mathbf{if}\;y \leq 295000000000000004344791912536394558108844251514140744190522484346814426623697136233468449779680802677124290236833767055363244594916579383928253056153621501775798717408760314312729365944671056842509684572160:\\
                                                  \;\;\;\;t + x\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\frac{t \cdot y}{a}\\
                                                  
                                                  
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if y < 2.95e206

                                                    1. Initial program 67.6%

                                                      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                                    2. Taylor expanded in z around inf

                                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                    3. Step-by-step derivation
                                                      1. lower--.f6420.0%

                                                        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                    4. Applied rewrites20.0%

                                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                    5. Taylor expanded in x around inf

                                                      \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                    6. Step-by-step derivation
                                                      1. lower-*.f642.8%

                                                        \[\leadsto x + -1 \cdot x \]
                                                    7. Applied rewrites2.8%

                                                      \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                    8. Step-by-step derivation
                                                      1. lift-+.f64N/A

                                                        \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                      2. +-commutativeN/A

                                                        \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                      3. lower-+.f642.8%

                                                        \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                      4. lift-*.f64N/A

                                                        \[\leadsto -1 \cdot x + x \]
                                                      5. mul-1-negN/A

                                                        \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                      6. lower-neg.f642.8%

                                                        \[\leadsto \left(-x\right) + x \]
                                                    9. Applied rewrites2.8%

                                                      \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                    10. Taylor expanded in x around 0

                                                      \[\leadsto t + x \]
                                                    11. Step-by-step derivation
                                                      1. Applied rewrites34.3%

                                                        \[\leadsto t + x \]

                                                      if 2.95e206 < y

                                                      1. Initial program 67.6%

                                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                                      2. Taylor expanded in x around 0

                                                        \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites55.5%

                                                          \[\leadsto x + \frac{\left(y - z\right) \cdot \color{blue}{t}}{a - z} \]
                                                        2. Step-by-step derivation
                                                          1. lift-+.f64N/A

                                                            \[\leadsto \color{blue}{x + \frac{\left(y - z\right) \cdot t}{a - z}} \]
                                                          2. add-flipN/A

                                                            \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)} \]
                                                          3. sub-flipN/A

                                                            \[\leadsto \color{blue}{x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{a - z}\right)\right)\right)\right)} \]
                                                          4. lift-/.f64N/A

                                                            \[\leadsto x + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{a - z}}\right)\right)\right)\right) \]
                                                          5. distribute-neg-frac2N/A

                                                            \[\leadsto x + \left(\mathsf{neg}\left(\color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(a - z\right)\right)}}\right)\right) \]
                                                          6. lift--.f64N/A

                                                            \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(a - z\right)}\right)}\right)\right) \]
                                                          7. sub-negate-revN/A

                                                            \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                                          8. lift--.f64N/A

                                                            \[\leadsto x + \left(\mathsf{neg}\left(\frac{\left(y - z\right) \cdot t}{\color{blue}{z - a}}\right)\right) \]
                                                          9. distribute-frac-neg2N/A

                                                            \[\leadsto x + \color{blue}{\frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\left(z - a\right)\right)}} \]
                                                          10. lift--.f64N/A

                                                            \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\mathsf{neg}\left(\color{blue}{\left(z - a\right)}\right)} \]
                                                          11. sub-negate-revN/A

                                                            \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                                          12. lift--.f64N/A

                                                            \[\leadsto x + \frac{\left(y - z\right) \cdot t}{\color{blue}{a - z}} \]
                                                          13. lift-*.f64N/A

                                                            \[\leadsto x + \frac{\color{blue}{\left(y - z\right) \cdot t}}{a - z} \]
                                                          14. associate-/l*N/A

                                                            \[\leadsto x + \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
                                                          15. *-commutativeN/A

                                                            \[\leadsto x + \color{blue}{\frac{t}{a - z} \cdot \left(y - z\right)} \]
                                                          16. fp-cancel-sign-sub-invN/A

                                                            \[\leadsto \color{blue}{x - \left(\mathsf{neg}\left(\frac{t}{a - z}\right)\right) \cdot \left(y - z\right)} \]
                                                        3. Applied rewrites64.3%

                                                          \[\leadsto \color{blue}{x - \frac{t}{z - a} \cdot \left(y - z\right)} \]
                                                        4. Taylor expanded in t around inf

                                                          \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                                        5. Step-by-step derivation
                                                          1. lower-*.f64N/A

                                                            \[\leadsto t \cdot \color{blue}{\left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                                          2. lower--.f64N/A

                                                            \[\leadsto t \cdot \left(\frac{z}{z - a} - \color{blue}{\frac{y}{z - a}}\right) \]
                                                          3. lower-/.f64N/A

                                                            \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{\color{blue}{y}}{z - a}\right) \]
                                                          4. lower--.f64N/A

                                                            \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right) \]
                                                          5. lower-/.f64N/A

                                                            \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{\color{blue}{z - a}}\right) \]
                                                          6. lower--.f6452.4%

                                                            \[\leadsto t \cdot \left(\frac{z}{z - a} - \frac{y}{z - \color{blue}{a}}\right) \]
                                                        6. Applied rewrites52.4%

                                                          \[\leadsto \color{blue}{t \cdot \left(\frac{z}{z - a} - \frac{y}{z - a}\right)} \]
                                                        7. Taylor expanded in z around 0

                                                          \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                        8. Step-by-step derivation
                                                          1. lower-/.f64N/A

                                                            \[\leadsto \frac{t \cdot y}{a} \]
                                                          2. lower-*.f6416.6%

                                                            \[\leadsto \frac{t \cdot y}{a} \]
                                                        9. Applied rewrites16.6%

                                                          \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                      4. Recombined 2 regimes into one program.
                                                      5. Add Preprocessing

                                                      Alternative 25: 34.3% accurate, 7.3× speedup?

                                                      \[t + x \]
                                                      (FPCore (x y z t a)
                                                        :precision binary64
                                                        (+ t x))
                                                      double code(double x, double y, double z, double t, double a) {
                                                      	return t + x;
                                                      }
                                                      
                                                      module fmin_fmax_functions
                                                          implicit none
                                                          private
                                                          public fmax
                                                          public fmin
                                                      
                                                          interface fmax
                                                              module procedure fmax88
                                                              module procedure fmax44
                                                              module procedure fmax84
                                                              module procedure fmax48
                                                          end interface
                                                          interface fmin
                                                              module procedure fmin88
                                                              module procedure fmin44
                                                              module procedure fmin84
                                                              module procedure fmin48
                                                          end interface
                                                      contains
                                                          real(8) function fmax88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmax44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmax48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin88(x, y) result (res)
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(4) function fmin44(x, y) result (res)
                                                              real(4), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin84(x, y) result(res)
                                                              real(8), intent (in) :: x
                                                              real(4), intent (in) :: y
                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                          end function
                                                          real(8) function fmin48(x, y) result(res)
                                                              real(4), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                          end function
                                                      end module
                                                      
                                                      real(8) function code(x, y, z, t, a)
                                                      use fmin_fmax_functions
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          real(8), intent (in) :: z
                                                          real(8), intent (in) :: t
                                                          real(8), intent (in) :: a
                                                          code = t + x
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z, double t, double a) {
                                                      	return t + x;
                                                      }
                                                      
                                                      def code(x, y, z, t, a):
                                                      	return t + x
                                                      
                                                      function code(x, y, z, t, a)
                                                      	return Float64(t + x)
                                                      end
                                                      
                                                      function tmp = code(x, y, z, t, a)
                                                      	tmp = t + x;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_] := N[(t + x), $MachinePrecision]
                                                      
                                                      t + x
                                                      
                                                      Derivation
                                                      1. Initial program 67.6%

                                                        \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                                                      2. Taylor expanded in z around inf

                                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                      3. Step-by-step derivation
                                                        1. lower--.f6420.0%

                                                          \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                      4. Applied rewrites20.0%

                                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                      5. Taylor expanded in x around inf

                                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                      6. Step-by-step derivation
                                                        1. lower-*.f642.8%

                                                          \[\leadsto x + -1 \cdot x \]
                                                      7. Applied rewrites2.8%

                                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                      8. Step-by-step derivation
                                                        1. lift-+.f64N/A

                                                          \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                        2. +-commutativeN/A

                                                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                        3. lower-+.f642.8%

                                                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                        4. lift-*.f64N/A

                                                          \[\leadsto -1 \cdot x + x \]
                                                        5. mul-1-negN/A

                                                          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                        6. lower-neg.f642.8%

                                                          \[\leadsto \left(-x\right) + x \]
                                                      9. Applied rewrites2.8%

                                                        \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                      10. Taylor expanded in x around 0

                                                        \[\leadsto t + x \]
                                                      11. Step-by-step derivation
                                                        1. Applied rewrites34.3%

                                                          \[\leadsto t + x \]
                                                        2. Add Preprocessing

                                                        Reproduce

                                                        ?
                                                        herbie shell --seed 2025271 -o generate:evaluate
                                                        (FPCore (x y z t a)
                                                          :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                                                          :precision binary64
                                                          (+ x (/ (* (- y z) (- t x)) (- a z))))