Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A

Percentage Accurate: 85.9% → 98.1%
Time: 4.0s
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Initial Program: 85.9% accurate, 1.0× speedup?

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

Alternative 1: 98.1% accurate, 0.7× speedup?

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

    \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.1% accurate, 1.0× speedup?

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

    \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 95.7% accurate, 1.0× speedup?

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

    \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.5% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.0000000000000001e97 or 1.26e37 < y

    1. Initial program 85.9%

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

      \[\leadsto x + \frac{\color{blue}{t \cdot y}}{a - z} \]
    3. Step-by-step derivation
      1. lower-*.f6473.5%

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

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

    if -7.0000000000000001e97 < y < 1.26e37

    1. Initial program 85.9%

      \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 80.2% accurate, 0.8× speedup?

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

      1. Initial program 85.9%

        \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.1000000000000001e-127 < a < 9.40000000000000013e-91

        1. Initial program 85.9%

          \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 9.40000000000000013e-91 < a

        1. Initial program 85.9%

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

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

            \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
          2. lower-*.f6460.7%

            \[\leadsto x + \frac{t \cdot y}{a} \]
        4. Applied rewrites60.7%

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{t}{a} \cdot y \]
          9. lower-/.f6462.3%

            \[\leadsto x + \frac{t}{a} \cdot y \]
        6. Applied rewrites62.3%

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

      Alternative 6: 77.6% accurate, 0.8× speedup?

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

        1. Initial program 85.9%

          \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.05e-127 < a < 9.40000000000000013e-91

          1. Initial program 85.9%

            \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.40000000000000013e-91 < a

          1. Initial program 85.9%

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

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

              \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
            2. lower-*.f6460.7%

              \[\leadsto x + \frac{t \cdot y}{a} \]
          4. Applied rewrites60.7%

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

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

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

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

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

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

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

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

              \[\leadsto x + \frac{t}{a} \cdot y \]
            9. lower-/.f6462.3%

              \[\leadsto x + \frac{t}{a} \cdot y \]
          6. Applied rewrites62.3%

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

        Alternative 7: 77.0% accurate, 0.8× speedup?

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

          1. Initial program 85.9%

            \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.2e53 < z < 2.05000000000000008e-73

          1. Initial program 85.9%

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

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

              \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
            2. lower-*.f6460.7%

              \[\leadsto x + \frac{t \cdot y}{a} \]
          4. Applied rewrites60.7%

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

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

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

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

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

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

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

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

              \[\leadsto x + \frac{t}{a} \cdot y \]
            9. lower-/.f6462.3%

              \[\leadsto x + \frac{t}{a} \cdot y \]
          6. Applied rewrites62.3%

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

        Alternative 8: 76.8% accurate, 0.9× speedup?

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

          1. Initial program 85.9%

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

            \[\leadsto x + \color{blue}{t} \]
          3. Step-by-step derivation
            1. Applied rewrites61.0%

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

            if -8.9999999999999992e109 < z < 4.5000000000000003e56

            1. Initial program 85.9%

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

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

                \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
              2. lower-*.f6460.7%

                \[\leadsto x + \frac{t \cdot y}{a} \]
            4. Applied rewrites60.7%

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{t}{a} \cdot y \]
              9. lower-/.f6462.3%

                \[\leadsto x + \frac{t}{a} \cdot y \]
            6. Applied rewrites62.3%

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

          Alternative 9: 66.0% accurate, 0.4× speedup?

          \[\begin{array}{l} t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+153}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \mathbf{elif}\;t\_1 \leq 10^{+90}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\left(z - y\right) \cdot \frac{t}{z}\\ \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (/ (* (- y z) t) (- a z))))
             (if (<= t_1 -5e+153)
               (* (/ y (- a z)) t)
               (if (<= t_1 1e+90) (+ x t) (* (- z y) (/ t z))))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = ((y - z) * t) / (a - z);
          	double tmp;
          	if (t_1 <= -5e+153) {
          		tmp = (y / (a - z)) * t;
          	} else if (t_1 <= 1e+90) {
          		tmp = x + t;
          	} else {
          		tmp = (z - y) * (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) :: t_1
              real(8) :: tmp
              t_1 = ((y - z) * t) / (a - z)
              if (t_1 <= (-5d+153)) then
                  tmp = (y / (a - z)) * t
              else if (t_1 <= 1d+90) then
                  tmp = x + t
              else
                  tmp = (z - y) * (t / z)
              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) * t) / (a - z);
          	double tmp;
          	if (t_1 <= -5e+153) {
          		tmp = (y / (a - z)) * t;
          	} else if (t_1 <= 1e+90) {
          		tmp = x + t;
          	} else {
          		tmp = (z - y) * (t / z);
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	t_1 = ((y - z) * t) / (a - z)
          	tmp = 0
          	if t_1 <= -5e+153:
          		tmp = (y / (a - z)) * t
          	elif t_1 <= 1e+90:
          		tmp = x + t
          	else:
          		tmp = (z - y) * (t / z)
          	return tmp
          
          function code(x, y, z, t, a)
          	t_1 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
          	tmp = 0.0
          	if (t_1 <= -5e+153)
          		tmp = Float64(Float64(y / Float64(a - z)) * t);
          	elseif (t_1 <= 1e+90)
          		tmp = Float64(x + t);
          	else
          		tmp = Float64(Float64(z - y) * Float64(t / z));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = ((y - z) * t) / (a - z);
          	tmp = 0.0;
          	if (t_1 <= -5e+153)
          		tmp = (y / (a - z)) * t;
          	elseif (t_1 <= 1e+90)
          		tmp = x + t;
          	else
          		tmp = (z - y) * (t / z);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+153], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t$95$1, 1e+90], N[(x + t), $MachinePrecision], N[(N[(z - y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]
          
          \begin{array}{l}
          t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
          \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+153}:\\
          \;\;\;\;\frac{y}{a - z} \cdot t\\
          
          \mathbf{elif}\;t\_1 \leq 10^{+90}:\\
          \;\;\;\;x + t\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(z - y\right) \cdot \frac{t}{z}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.00000000000000018e153

            1. Initial program 85.9%

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

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

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

                \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
              3. lower--.f6426.4%

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

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

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

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

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

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

                \[\leadsto \frac{y}{a - z} \cdot \color{blue}{t} \]
              6. lower-/.f6428.7%

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

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

            if -5.00000000000000018e153 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 9.99999999999999966e89

            1. Initial program 85.9%

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

              \[\leadsto x + \color{blue}{t} \]
            3. Step-by-step derivation
              1. Applied rewrites61.0%

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

              if 9.99999999999999966e89 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

              1. Initial program 85.9%

                \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{z - a}, z - y, 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.5%

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

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

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

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

                  \[\leadsto \frac{t \cdot \left(z - y\right)}{z} \]
                3. lower--.f6423.8%

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

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

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

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

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

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

                  \[\leadsto \left(z - y\right) \cdot \frac{t}{z} \]
                6. lower-*.f6429.3%

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

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

            Alternative 10: 65.7% accurate, 0.4× speedup?

            \[\begin{array}{l} t_1 := \frac{y}{a - z} \cdot t\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+153}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+188}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (let* ((t_1 (* (/ y (- a z)) t)) (t_2 (/ (* (- y z) t) (- a z))))
               (if (<= t_2 -5e+153) t_1 (if (<= t_2 5e+188) (+ x t) t_1))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = (y / (a - z)) * t;
            	double t_2 = ((y - z) * t) / (a - z);
            	double tmp;
            	if (t_2 <= -5e+153) {
            		tmp = t_1;
            	} else if (t_2 <= 5e+188) {
            		tmp = 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) :: t_2
                real(8) :: tmp
                t_1 = (y / (a - z)) * t
                t_2 = ((y - z) * t) / (a - z)
                if (t_2 <= (-5d+153)) then
                    tmp = t_1
                else if (t_2 <= 5d+188) then
                    tmp = 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 = (y / (a - z)) * t;
            	double t_2 = ((y - z) * t) / (a - z);
            	double tmp;
            	if (t_2 <= -5e+153) {
            		tmp = t_1;
            	} else if (t_2 <= 5e+188) {
            		tmp = x + t;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	t_1 = (y / (a - z)) * t
            	t_2 = ((y - z) * t) / (a - z)
            	tmp = 0
            	if t_2 <= -5e+153:
            		tmp = t_1
            	elif t_2 <= 5e+188:
            		tmp = x + t
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a)
            	t_1 = Float64(Float64(y / Float64(a - z)) * t)
            	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
            	tmp = 0.0
            	if (t_2 <= -5e+153)
            		tmp = t_1;
            	elseif (t_2 <= 5e+188)
            		tmp = Float64(x + t);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = (y / (a - z)) * t;
            	t_2 = ((y - z) * t) / (a - z);
            	tmp = 0.0;
            	if (t_2 <= -5e+153)
            		tmp = t_1;
            	elseif (t_2 <= 5e+188)
            		tmp = x + t;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+153], t$95$1, If[LessEqual[t$95$2, 5e+188], N[(x + t), $MachinePrecision], t$95$1]]]]
            
            \begin{array}{l}
            t_1 := \frac{y}{a - z} \cdot t\\
            t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
            \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+153}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+188}:\\
            \;\;\;\;x + t\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.00000000000000018e153 or 5.0000000000000001e188 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

              1. Initial program 85.9%

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

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

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

                  \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
                3. lower--.f6426.4%

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

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

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

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

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

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

                  \[\leadsto \frac{y}{a - z} \cdot \color{blue}{t} \]
                6. lower-/.f6428.7%

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

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

              if -5.00000000000000018e153 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 5.0000000000000001e188

              1. Initial program 85.9%

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

                \[\leadsto x + \color{blue}{t} \]
              3. Step-by-step derivation
                1. Applied rewrites61.0%

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

              Alternative 11: 65.1% accurate, 0.4× speedup?

              \[\begin{array}{l} t_1 := \frac{t}{a - z} \cdot y\\ t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+153}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+188}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (let* ((t_1 (* (/ t (- a z)) y)) (t_2 (/ (* (- y z) t) (- a z))))
                 (if (<= t_2 -5e+153) t_1 (if (<= t_2 5e+188) (+ x t) t_1))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = (t / (a - z)) * y;
              	double t_2 = ((y - z) * t) / (a - z);
              	double tmp;
              	if (t_2 <= -5e+153) {
              		tmp = t_1;
              	} else if (t_2 <= 5e+188) {
              		tmp = 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) :: t_2
                  real(8) :: tmp
                  t_1 = (t / (a - z)) * y
                  t_2 = ((y - z) * t) / (a - z)
                  if (t_2 <= (-5d+153)) then
                      tmp = t_1
                  else if (t_2 <= 5d+188) then
                      tmp = 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 / (a - z)) * y;
              	double t_2 = ((y - z) * t) / (a - z);
              	double tmp;
              	if (t_2 <= -5e+153) {
              		tmp = t_1;
              	} else if (t_2 <= 5e+188) {
              		tmp = x + t;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	t_1 = (t / (a - z)) * y
              	t_2 = ((y - z) * t) / (a - z)
              	tmp = 0
              	if t_2 <= -5e+153:
              		tmp = t_1
              	elif t_2 <= 5e+188:
              		tmp = x + t
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a)
              	t_1 = Float64(Float64(t / Float64(a - z)) * y)
              	t_2 = Float64(Float64(Float64(y - z) * t) / Float64(a - z))
              	tmp = 0.0
              	if (t_2 <= -5e+153)
              		tmp = t_1;
              	elseif (t_2 <= 5e+188)
              		tmp = Float64(x + t);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	t_1 = (t / (a - z)) * y;
              	t_2 = ((y - z) * t) / (a - z);
              	tmp = 0.0;
              	if (t_2 <= -5e+153)
              		tmp = t_1;
              	elseif (t_2 <= 5e+188)
              		tmp = x + t;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+153], t$95$1, If[LessEqual[t$95$2, 5e+188], N[(x + t), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              t_1 := \frac{t}{a - z} \cdot y\\
              t_2 := \frac{\left(y - z\right) \cdot t}{a - z}\\
              \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+153}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+188}:\\
              \;\;\;\;x + t\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.00000000000000018e153 or 5.0000000000000001e188 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                1. Initial program 85.9%

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

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

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

                    \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
                  3. lower--.f6426.4%

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

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

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

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

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

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

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

                    \[\leadsto \frac{t}{a - z} \cdot \color{blue}{y} \]
                  7. lower-/.f6428.6%

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

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

                if -5.00000000000000018e153 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 5.0000000000000001e188

                1. Initial program 85.9%

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

                  \[\leadsto x + \color{blue}{t} \]
                3. Step-by-step derivation
                  1. Applied rewrites61.0%

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

                Alternative 12: 61.0% accurate, 0.7× speedup?

                \[\begin{array}{l} \mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq -5 \cdot 10^{+153}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (<= (/ (* (- y z) t) (- a z)) -5e+153) (* (/ y a) t) (+ x t)))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((((y - z) * t) / (a - z)) <= -5e+153) {
                		tmp = (y / a) * t;
                	} else {
                		tmp = x + t;
                	}
                	return tmp;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t, a)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8), intent (in) :: a
                    real(8) :: tmp
                    if ((((y - z) * t) / (a - z)) <= (-5d+153)) then
                        tmp = (y / a) * t
                    else
                        tmp = x + t
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((((y - z) * t) / (a - z)) <= -5e+153) {
                		tmp = (y / a) * t;
                	} else {
                		tmp = x + t;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	tmp = 0
                	if (((y - z) * t) / (a - z)) <= -5e+153:
                		tmp = (y / a) * t
                	else:
                		tmp = x + t
                	return tmp
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if (Float64(Float64(Float64(y - z) * t) / Float64(a - z)) <= -5e+153)
                		tmp = Float64(Float64(y / a) * t);
                	else
                		tmp = Float64(x + t);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	tmp = 0.0;
                	if ((((y - z) * t) / (a - z)) <= -5e+153)
                		tmp = (y / a) * t;
                	else
                		tmp = x + t;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], -5e+153], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], N[(x + t), $MachinePrecision]]
                
                \begin{array}{l}
                \mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq -5 \cdot 10^{+153}:\\
                \;\;\;\;\frac{y}{a} \cdot t\\
                
                \mathbf{else}:\\
                \;\;\;\;x + t\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.00000000000000018e153

                  1. Initial program 85.9%

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

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

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

                      \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
                    3. lower--.f6426.4%

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

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

                    \[\leadsto \frac{t \cdot y}{a} \]
                  6. Step-by-step derivation
                    1. Applied rewrites19.0%

                      \[\leadsto \frac{t \cdot y}{a} \]
                    2. Step-by-step derivation
                      1. +-commutative19.0%

                        \[\leadsto \frac{\color{blue}{t \cdot y}}{a} \]
                      2. lift--.f64N/A

                        \[\leadsto \frac{t \cdot y}{a} \]
                      3. *-commutativeN/A

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

                        \[\leadsto \frac{\color{blue}{t} \cdot y}{a} \]
                      5. frac-2neg-revN/A

                        \[\leadsto \frac{t \cdot y}{a} \]
                      6. lift--.f6419.0%

                        \[\leadsto \frac{t \cdot y}{a} \]
                      7. sub-negate-rev19.0%

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

                        \[\leadsto \frac{t \cdot y}{a} \]
                      9. sub-negate-revN/A

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

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

                        \[\leadsto \frac{\color{blue}{t} \cdot y}{a} \]
                      12. lift--.f6419.0%

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

                        \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                      14. lift-*.f64N/A

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

                        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} \]
                      16. *-commutativeN/A

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

                        \[\leadsto \frac{y}{a} \cdot \color{blue}{t} \]
                      18. lower-/.f6420.8%

                        \[\leadsto \frac{y}{a} \cdot t \]
                    3. Applied rewrites20.8%

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

                    if -5.00000000000000018e153 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                    1. Initial program 85.9%

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

                      \[\leadsto x + \color{blue}{t} \]
                    3. Step-by-step derivation
                      1. Applied rewrites61.0%

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

                    Alternative 13: 60.5% accurate, 0.7× speedup?

                    \[\begin{array}{l} \mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq -5 \cdot 10^{+153}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (<= (/ (* (- y z) t) (- a z)) -5e+153) (* y (/ t a)) (+ x t)))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if ((((y - z) * t) / (a - z)) <= -5e+153) {
                    		tmp = y * (t / a);
                    	} else {
                    		tmp = x + t;
                    	}
                    	return tmp;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        real(8) :: tmp
                        if ((((y - z) * t) / (a - z)) <= (-5d+153)) then
                            tmp = y * (t / a)
                        else
                            tmp = x + t
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if ((((y - z) * t) / (a - z)) <= -5e+153) {
                    		tmp = y * (t / a);
                    	} else {
                    		tmp = x + t;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t, a):
                    	tmp = 0
                    	if (((y - z) * t) / (a - z)) <= -5e+153:
                    		tmp = y * (t / a)
                    	else:
                    		tmp = x + t
                    	return tmp
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if (Float64(Float64(Float64(y - z) * t) / Float64(a - z)) <= -5e+153)
                    		tmp = Float64(y * Float64(t / a));
                    	else
                    		tmp = Float64(x + t);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t, a)
                    	tmp = 0.0;
                    	if ((((y - z) * t) / (a - z)) <= -5e+153)
                    		tmp = y * (t / a);
                    	else
                    		tmp = x + t;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], -5e+153], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
                    
                    \begin{array}{l}
                    \mathbf{if}\;\frac{\left(y - z\right) \cdot t}{a - z} \leq -5 \cdot 10^{+153}:\\
                    \;\;\;\;y \cdot \frac{t}{a}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x + t\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -5.00000000000000018e153

                      1. Initial program 85.9%

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

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

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

                          \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
                        3. lower--.f6426.4%

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

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

                        \[\leadsto \frac{t \cdot y}{a} \]
                      6. Step-by-step derivation
                        1. Applied rewrites19.0%

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

                            \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                          2. mult-flipN/A

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

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

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

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

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

                            \[\leadsto y \cdot \frac{t}{\color{blue}{a}} \]
                          8. lower-/.f6420.7%

                            \[\leadsto y \cdot \frac{t}{\color{blue}{a}} \]
                        3. Applied rewrites20.7%

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

                        if -5.00000000000000018e153 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

                        1. Initial program 85.9%

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

                          \[\leadsto x + \color{blue}{t} \]
                        3. Step-by-step derivation
                          1. Applied rewrites61.0%

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

                        Alternative 14: 60.3% accurate, 4.1× speedup?

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

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

                          \[\leadsto x + \color{blue}{t} \]
                        3. Step-by-step derivation
                          1. Applied rewrites61.0%

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

                          Alternative 15: 18.9% accurate, 15.3× speedup?

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

                            \[x + \frac{\left(y - z\right) \cdot 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t}{z - a}, z - y, 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.5%

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

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

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

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

                              \[\leadsto \frac{t \cdot \left(z - y\right)}{z} \]
                            3. lower--.f6423.8%

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

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

                            \[\leadsto t \]
                          11. Step-by-step derivation
                            1. Applied rewrites18.9%

                              \[\leadsto t \]
                            2. Add Preprocessing

                            Reproduce

                            ?
                            herbie shell --seed 2025188 
                            (FPCore (x y z t a)
                              :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, A"
                              :precision binary64
                              (+ x (/ (* (- y z) t) (- a z))))