Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 97.1% → 99.6%
Time: 4.9s
Alternatives: 15
Speedup: 1.2×

Specification

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

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: 97.1% accurate, 1.0× speedup?

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

Alternative 1: 99.6% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 97.4% accurate, 1.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.2% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := x - \frac{z - y}{z - 1} \cdot a\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+74}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (* (/ (- z y) (- z 1.0)) a))))
  (if (<= z -1.25e+63)
    t_1
    (if (<= z 3.2e+74) (- x (* (/ y (+ 1.0 t)) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((z - y) / (z - 1.0)) * a);
	double tmp;
	if (z <= -1.25e+63) {
		tmp = t_1;
	} else if (z <= 3.2e+74) {
		tmp = x - ((y / (1.0 + t)) * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (((z - y) / (z - 1.0d0)) * a)
    if (z <= (-1.25d+63)) then
        tmp = t_1
    else if (z <= 3.2d+74) then
        tmp = x - ((y / (1.0d0 + t)) * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((z - y) / (z - 1.0)) * a);
	double tmp;
	if (z <= -1.25e+63) {
		tmp = t_1;
	} else if (z <= 3.2e+74) {
		tmp = x - ((y / (1.0 + t)) * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((z - y) / (z - 1.0)) * a)
	tmp = 0
	if z <= -1.25e+63:
		tmp = t_1
	elif z <= 3.2e+74:
		tmp = x - ((y / (1.0 + t)) * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(z - y) / Float64(z - 1.0)) * a))
	tmp = 0.0
	if (z <= -1.25e+63)
		tmp = t_1;
	elseif (z <= 3.2e+74)
		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((z - y) / (z - 1.0)) * a);
	tmp = 0.0;
	if (z <= -1.25e+63)
		tmp = t_1;
	elseif (z <= 3.2e+74)
		tmp = x - ((y / (1.0 + t)) * a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+63], t$95$1, If[LessEqual[z, 3.2e+74], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \frac{z - y}{z - 1} \cdot a\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.2 \cdot 10^{+74}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.25e63 or 3.1999999999999999e74 < z

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \frac{z - y}{\color{blue}{z - 1}} \cdot a \]
    5. Step-by-step derivation
      1. lower--.f6480.4%

        \[\leadsto x - \frac{z - y}{z - \color{blue}{1}} \cdot a \]
    6. Applied rewrites80.4%

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

    if -1.25e63 < z < 3.1999999999999999e74

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
      2. lower-+.f6472.0%

        \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
    6. Applied rewrites72.0%

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

Alternative 4: 87.7% accurate, 0.9× speedup?

\[\begin{array}{l} t_1 := x - \frac{z}{-1 - \left(t - z\right)} \cdot a\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+17}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (* (/ z (- -1.0 (- t z))) a))))
  (if (<= z -1.25e+63)
    t_1
    (if (<= z 2.6e+17) (- x (* (/ y (+ 1.0 t)) a)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((z / (-1.0 - (t - z))) * a);
	double tmp;
	if (z <= -1.25e+63) {
		tmp = t_1;
	} else if (z <= 2.6e+17) {
		tmp = x - ((y / (1.0 + t)) * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - ((z / ((-1.0d0) - (t - z))) * a)
    if (z <= (-1.25d+63)) then
        tmp = t_1
    else if (z <= 2.6d+17) then
        tmp = x - ((y / (1.0d0 + t)) * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((z / (-1.0 - (t - z))) * a);
	double tmp;
	if (z <= -1.25e+63) {
		tmp = t_1;
	} else if (z <= 2.6e+17) {
		tmp = x - ((y / (1.0 + t)) * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((z / (-1.0 - (t - z))) * a)
	tmp = 0
	if z <= -1.25e+63:
		tmp = t_1
	elif z <= 2.6e+17:
		tmp = x - ((y / (1.0 + t)) * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(z / Float64(-1.0 - Float64(t - z))) * a))
	tmp = 0.0
	if (z <= -1.25e+63)
		tmp = t_1;
	elseif (z <= 2.6e+17)
		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((z / (-1.0 - (t - z))) * a);
	tmp = 0.0;
	if (z <= -1.25e+63)
		tmp = t_1;
	elseif (z <= 2.6e+17)
		tmp = x - ((y / (1.0 + t)) * a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(z / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+63], t$95$1, If[LessEqual[z, 2.6e+17], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \frac{z}{-1 - \left(t - z\right)} \cdot a\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+17}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.25e63 or 2.6e17 < z

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.25e63 < z < 2.6e17

      1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
        2. lower-+.f6472.0%

          \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
      6. Applied rewrites72.0%

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

    Alternative 5: 84.5% accurate, 1.0× speedup?

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

      1. Initial program 97.1%

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

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

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

        if -9e62 < z < 1.45e71

        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
          2. lower-+.f6472.0%

            \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
        6. Applied rewrites72.0%

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

      Alternative 6: 82.6% accurate, 1.0× speedup?

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

        1. Initial program 97.1%

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

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

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

          if -8.5999999999999994e62 < z < 2.65e17

          1. Initial program 97.1%

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

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

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

              \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
            3. lower-+.f6469.1%

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

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

        Alternative 7: 72.2% accurate, 1.0× speedup?

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

          1. Initial program 97.1%

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

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

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

              \[\leadsto x - \frac{a \cdot \left(y - z\right)}{t} \]
            3. lower--.f6450.4%

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

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

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

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

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

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

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

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

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

          if -1.45e35 < t < 1.15e-27

          1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
            2. lower-+.f6472.0%

              \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
          6. Applied rewrites72.0%

            \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
          7. Taylor expanded in t around 0

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

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

              \[\leadsto x - \left(y + -1 \cdot \left(t \cdot \color{blue}{y}\right)\right) \cdot a \]
            3. lower-*.f6448.7%

              \[\leadsto x - \left(y + -1 \cdot \left(t \cdot y\right)\right) \cdot a \]
          9. Applied rewrites48.7%

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

          if 1.15e-27 < t

          1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
            2. lower-+.f6472.0%

              \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
          6. Applied rewrites72.0%

            \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
          7. Taylor expanded in t around inf

            \[\leadsto x - \frac{y}{\color{blue}{t}} \cdot a \]
          8. Step-by-step derivation
            1. lower-/.f6456.2%

              \[\leadsto x - \frac{y}{t} \cdot a \]
          9. Applied rewrites56.2%

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

        Alternative 8: 71.5% accurate, 1.0× speedup?

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

          1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
            2. lower-+.f6472.0%

              \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
          6. Applied rewrites72.0%

            \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
          7. Taylor expanded in t around inf

            \[\leadsto x - \frac{y}{\color{blue}{t}} \cdot a \]
          8. Step-by-step derivation
            1. lower-/.f6456.2%

              \[\leadsto x - \frac{y}{t} \cdot a \]
          9. Applied rewrites56.2%

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

          if -3.1e-7 < t < 1.15e-27

          1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
            2. lower-+.f6472.0%

              \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
          6. Applied rewrites72.0%

            \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
          7. Taylor expanded in t around 0

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

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

              \[\leadsto x - \left(y + -1 \cdot \left(t \cdot \color{blue}{y}\right)\right) \cdot a \]
            3. lower-*.f6448.7%

              \[\leadsto x - \left(y + -1 \cdot \left(t \cdot y\right)\right) \cdot a \]
          9. Applied rewrites48.7%

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

        Alternative 9: 70.9% accurate, 1.1× speedup?

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

          1. Initial program 97.1%

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

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

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

            if -8.5999999999999994e62 < z < 8.6000000000000003e61

            1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x - \frac{y}{\color{blue}{1 + t}} \cdot a \]
              2. lower-+.f6472.0%

                \[\leadsto x - \frac{y}{1 + \color{blue}{t}} \cdot a \]
            6. Applied rewrites72.0%

              \[\leadsto x - \color{blue}{\frac{y}{1 + t}} \cdot a \]
            7. Taylor expanded in t around inf

              \[\leadsto x - \frac{y}{\color{blue}{t}} \cdot a \]
            8. Step-by-step derivation
              1. lower-/.f6456.2%

                \[\leadsto x - \frac{y}{t} \cdot a \]
            9. Applied rewrites56.2%

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

          Alternative 10: 69.6% accurate, 1.1× speedup?

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

            1. Initial program 97.1%

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

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

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

              if -1.7000000000000001e62 < z < 5.8999999999999997e32

              1. Initial program 97.1%

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

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

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

                  \[\leadsto x - \frac{a \cdot \left(y - z\right)}{t} \]
                3. lower--.f6450.4%

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

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

                \[\leadsto x - \frac{a \cdot y}{t} \]
              6. Step-by-step derivation
                1. lower-*.f6454.1%

                  \[\leadsto x - \frac{a \cdot y}{t} \]
              7. Applied rewrites54.1%

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

            Alternative 11: 67.4% accurate, 0.2× speedup?

            \[\begin{array}{l} t_1 := y \cdot \frac{a}{z - 1}\\ t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+270}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-44}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-42}:\\ \;\;\;\;-\left(-x\right)\\ \mathbf{elif}\;t\_2 \leq 10^{+263}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
            (FPCore (x y z t a)
              :precision binary64
              (let* ((t_1 (* y (/ a (- z 1.0))))
                   (t_2 (/ (- y z) (/ (+ (- t z) 1.0) a))))
              (if (<= t_2 -5e+270)
                t_1
                (if (<= t_2 -1e-44)
                  (- x a)
                  (if (<= t_2 2e-42)
                    (- (- x))
                    (if (<= t_2 1e+263) (- x a) t_1))))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = y * (a / (z - 1.0));
            	double t_2 = (y - z) / (((t - z) + 1.0) / a);
            	double tmp;
            	if (t_2 <= -5e+270) {
            		tmp = t_1;
            	} else if (t_2 <= -1e-44) {
            		tmp = x - a;
            	} else if (t_2 <= 2e-42) {
            		tmp = -(-x);
            	} else if (t_2 <= 1e+263) {
            		tmp = x - a;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_1 = y * (a / (z - 1.0d0))
                t_2 = (y - z) / (((t - z) + 1.0d0) / a)
                if (t_2 <= (-5d+270)) then
                    tmp = t_1
                else if (t_2 <= (-1d-44)) then
                    tmp = x - a
                else if (t_2 <= 2d-42) then
                    tmp = -(-x)
                else if (t_2 <= 1d+263) then
                    tmp = x - a
                else
                    tmp = t_1
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double t_1 = y * (a / (z - 1.0));
            	double t_2 = (y - z) / (((t - z) + 1.0) / a);
            	double tmp;
            	if (t_2 <= -5e+270) {
            		tmp = t_1;
            	} else if (t_2 <= -1e-44) {
            		tmp = x - a;
            	} else if (t_2 <= 2e-42) {
            		tmp = -(-x);
            	} else if (t_2 <= 1e+263) {
            		tmp = x - a;
            	} else {
            		tmp = t_1;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	t_1 = y * (a / (z - 1.0))
            	t_2 = (y - z) / (((t - z) + 1.0) / a)
            	tmp = 0
            	if t_2 <= -5e+270:
            		tmp = t_1
            	elif t_2 <= -1e-44:
            		tmp = x - a
            	elif t_2 <= 2e-42:
            		tmp = -(-x)
            	elif t_2 <= 1e+263:
            		tmp = x - a
            	else:
            		tmp = t_1
            	return tmp
            
            function code(x, y, z, t, a)
            	t_1 = Float64(y * Float64(a / Float64(z - 1.0)))
            	t_2 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
            	tmp = 0.0
            	if (t_2 <= -5e+270)
            		tmp = t_1;
            	elseif (t_2 <= -1e-44)
            		tmp = Float64(x - a);
            	elseif (t_2 <= 2e-42)
            		tmp = Float64(-Float64(-x));
            	elseif (t_2 <= 1e+263)
            		tmp = Float64(x - a);
            	else
            		tmp = t_1;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = y * (a / (z - 1.0));
            	t_2 = (y - z) / (((t - z) + 1.0) / a);
            	tmp = 0.0;
            	if (t_2 <= -5e+270)
            		tmp = t_1;
            	elseif (t_2 <= -1e-44)
            		tmp = x - a;
            	elseif (t_2 <= 2e-42)
            		tmp = -(-x);
            	elseif (t_2 <= 1e+263)
            		tmp = x - a;
            	else
            		tmp = t_1;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(a / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+270], t$95$1, If[LessEqual[t$95$2, -1e-44], N[(x - a), $MachinePrecision], If[LessEqual[t$95$2, 2e-42], (-(-x)), If[LessEqual[t$95$2, 1e+263], N[(x - a), $MachinePrecision], t$95$1]]]]]]
            
            \begin{array}{l}
            t_1 := y \cdot \frac{a}{z - 1}\\
            t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
            \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+270}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-44}:\\
            \;\;\;\;x - a\\
            
            \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-42}:\\
            \;\;\;\;-\left(-x\right)\\
            
            \mathbf{elif}\;t\_2 \leq 10^{+263}:\\
            \;\;\;\;x - a\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -4.9999999999999998e270 or 1e263 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

              1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{y \cdot a}{\left(-1 + \left(\mathsf{neg}\left(t\right)\right)\right) + z} \]
                10. sub-flipN/A

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

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

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

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

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

                  \[\leadsto y \cdot \frac{a}{\mathsf{neg}\left(\left(\left(t - z\right) - -1\right)\right)} \]
                16. distribute-neg-frac2N/A

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

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

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

                  \[\leadsto y \cdot \left(\mathsf{neg}\left(\frac{a}{\left(t - z\right) - -1}\right)\right) \]
                20. distribute-neg-frac2N/A

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

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

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

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

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

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

                  \[\leadsto y \cdot \frac{a}{z - \color{blue}{1}} \]
                2. lower--.f6418.9%

                  \[\leadsto y \cdot \frac{a}{z - 1} \]
              11. Applied rewrites18.9%

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

              if -4.9999999999999998e270 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -9.9999999999999995e-45 or 2.0000000000000001e-42 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1e263

              1. Initial program 97.1%

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

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

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

                if -9.9999999999999995e-45 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 2.0000000000000001e-42

                1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                6. Step-by-step derivation
                  1. lower-*.f6453.6%

                    \[\leadsto -1 \cdot \left(-1 \cdot x\right) \]
                7. Applied rewrites53.6%

                  \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                8. Step-by-step derivation
                  1. lift-*.f64N/A

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

                    \[\leadsto \mathsf{neg}\left(-1 \cdot x\right) \]
                  3. lower-neg.f6453.6%

                    \[\leadsto --1 \cdot x \]
                  4. lift-*.f64N/A

                    \[\leadsto --1 \cdot x \]
                  5. mul-1-negN/A

                    \[\leadsto -\left(\mathsf{neg}\left(x\right)\right) \]
                  6. lower-neg.f6453.6%

                    \[\leadsto -\left(-x\right) \]
                9. Applied rewrites53.6%

                  \[\leadsto -\left(-x\right) \]
              4. Recombined 3 regimes into one program.
              5. Add Preprocessing

              Alternative 12: 67.2% accurate, 0.2× speedup?

              \[\begin{array}{l} t_1 := \frac{a \cdot y}{z - 1}\\ t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+270}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-44}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-42}:\\ \;\;\;\;-\left(-x\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+294}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
              (FPCore (x y z t a)
                :precision binary64
                (let* ((t_1 (/ (* a y) (- z 1.0)))
                     (t_2 (/ (- y z) (/ (+ (- t z) 1.0) a))))
                (if (<= t_2 -5e+270)
                  t_1
                  (if (<= t_2 -1e-44)
                    (- x a)
                    (if (<= t_2 2e-42)
                      (- (- x))
                      (if (<= t_2 2e+294) (- x a) t_1))))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = (a * y) / (z - 1.0);
              	double t_2 = (y - z) / (((t - z) + 1.0) / a);
              	double tmp;
              	if (t_2 <= -5e+270) {
              		tmp = t_1;
              	} else if (t_2 <= -1e-44) {
              		tmp = x - a;
              	} else if (t_2 <= 2e-42) {
              		tmp = -(-x);
              	} else if (t_2 <= 2e+294) {
              		tmp = x - a;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: t_1
                  real(8) :: t_2
                  real(8) :: tmp
                  t_1 = (a * y) / (z - 1.0d0)
                  t_2 = (y - z) / (((t - z) + 1.0d0) / a)
                  if (t_2 <= (-5d+270)) then
                      tmp = t_1
                  else if (t_2 <= (-1d-44)) then
                      tmp = x - a
                  else if (t_2 <= 2d-42) then
                      tmp = -(-x)
                  else if (t_2 <= 2d+294) then
                      tmp = x - a
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	double t_1 = (a * y) / (z - 1.0);
              	double t_2 = (y - z) / (((t - z) + 1.0) / a);
              	double tmp;
              	if (t_2 <= -5e+270) {
              		tmp = t_1;
              	} else if (t_2 <= -1e-44) {
              		tmp = x - a;
              	} else if (t_2 <= 2e-42) {
              		tmp = -(-x);
              	} else if (t_2 <= 2e+294) {
              		tmp = x - a;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	t_1 = (a * y) / (z - 1.0)
              	t_2 = (y - z) / (((t - z) + 1.0) / a)
              	tmp = 0
              	if t_2 <= -5e+270:
              		tmp = t_1
              	elif t_2 <= -1e-44:
              		tmp = x - a
              	elif t_2 <= 2e-42:
              		tmp = -(-x)
              	elif t_2 <= 2e+294:
              		tmp = x - a
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a)
              	t_1 = Float64(Float64(a * y) / Float64(z - 1.0))
              	t_2 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))
              	tmp = 0.0
              	if (t_2 <= -5e+270)
              		tmp = t_1;
              	elseif (t_2 <= -1e-44)
              		tmp = Float64(x - a);
              	elseif (t_2 <= 2e-42)
              		tmp = Float64(-Float64(-x));
              	elseif (t_2 <= 2e+294)
              		tmp = Float64(x - a);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	t_1 = (a * y) / (z - 1.0);
              	t_2 = (y - z) / (((t - z) + 1.0) / a);
              	tmp = 0.0;
              	if (t_2 <= -5e+270)
              		tmp = t_1;
              	elseif (t_2 <= -1e-44)
              		tmp = x - a;
              	elseif (t_2 <= 2e-42)
              		tmp = -(-x);
              	elseif (t_2 <= 2e+294)
              		tmp = x - a;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * y), $MachinePrecision] / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+270], t$95$1, If[LessEqual[t$95$2, -1e-44], N[(x - a), $MachinePrecision], If[LessEqual[t$95$2, 2e-42], (-(-x)), If[LessEqual[t$95$2, 2e+294], N[(x - a), $MachinePrecision], t$95$1]]]]]]
              
              \begin{array}{l}
              t_1 := \frac{a \cdot y}{z - 1}\\
              t_2 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
              \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+270}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-44}:\\
              \;\;\;\;x - a\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-42}:\\
              \;\;\;\;-\left(-x\right)\\
              
              \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+294}:\\
              \;\;\;\;x - a\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -4.9999999999999998e270 or 2.0000000000000001e294 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

                1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{a \cdot y}{z - 1} \]
                  3. lower--.f6418.0%

                    \[\leadsto \frac{a \cdot y}{z - 1} \]
                9. Applied rewrites18.0%

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

                if -4.9999999999999998e270 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -9.9999999999999995e-45 or 2.0000000000000001e-42 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 2.0000000000000001e294

                1. Initial program 97.1%

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

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

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

                  if -9.9999999999999995e-45 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 2.0000000000000001e-42

                  1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                  6. Step-by-step derivation
                    1. lower-*.f6453.6%

                      \[\leadsto -1 \cdot \left(-1 \cdot x\right) \]
                  7. Applied rewrites53.6%

                    \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                  8. Step-by-step derivation
                    1. lift-*.f64N/A

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

                      \[\leadsto \mathsf{neg}\left(-1 \cdot x\right) \]
                    3. lower-neg.f6453.6%

                      \[\leadsto --1 \cdot x \]
                    4. lift-*.f64N/A

                      \[\leadsto --1 \cdot x \]
                    5. mul-1-negN/A

                      \[\leadsto -\left(\mathsf{neg}\left(x\right)\right) \]
                    6. lower-neg.f6453.6%

                      \[\leadsto -\left(-x\right) \]
                  9. Applied rewrites53.6%

                    \[\leadsto -\left(-x\right) \]
                4. Recombined 3 regimes into one program.
                5. Add Preprocessing

                Alternative 13: 65.0% accurate, 0.3× speedup?

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

                  1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y \cdot a}{\left(-1 + \left(\mathsf{neg}\left(t\right)\right)\right) + z} \]
                    10. sub-flipN/A

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

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

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

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

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

                      \[\leadsto y \cdot \frac{a}{\mathsf{neg}\left(\left(\left(t - z\right) - -1\right)\right)} \]
                    16. distribute-neg-frac2N/A

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

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

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

                      \[\leadsto y \cdot \left(\mathsf{neg}\left(\frac{a}{\left(t - z\right) - -1}\right)\right) \]
                    20. distribute-neg-frac2N/A

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

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

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

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

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

                    \[\leadsto y \cdot \frac{a}{-1 - t} \]
                  10. Step-by-step derivation
                    1. Applied rewrites22.7%

                      \[\leadsto y \cdot \frac{a}{-1 - t} \]

                    if -2.0000000000000001e84 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 2.0000000000000001e-42

                    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6453.6%

                        \[\leadsto -1 \cdot \left(-1 \cdot x\right) \]
                    7. Applied rewrites53.6%

                      \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

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

                        \[\leadsto \mathsf{neg}\left(-1 \cdot x\right) \]
                      3. lower-neg.f6453.6%

                        \[\leadsto --1 \cdot x \]
                      4. lift-*.f64N/A

                        \[\leadsto --1 \cdot x \]
                      5. mul-1-negN/A

                        \[\leadsto -\left(\mathsf{neg}\left(x\right)\right) \]
                      6. lower-neg.f6453.6%

                        \[\leadsto -\left(-x\right) \]
                    9. Applied rewrites53.6%

                      \[\leadsto -\left(-x\right) \]

                    if 2.0000000000000001e-42 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1e263

                    1. Initial program 97.1%

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

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

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

                      if 1e263 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

                      1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{y \cdot a}{\left(-1 + \left(\mathsf{neg}\left(t\right)\right)\right) + z} \]
                        10. sub-flipN/A

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

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

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

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

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

                          \[\leadsto y \cdot \frac{a}{\mathsf{neg}\left(\left(\left(t - z\right) - -1\right)\right)} \]
                        16. distribute-neg-frac2N/A

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

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

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

                          \[\leadsto y \cdot \left(\mathsf{neg}\left(\frac{a}{\left(t - z\right) - -1}\right)\right) \]
                        20. distribute-neg-frac2N/A

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

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

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

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

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

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

                          \[\leadsto y \cdot \frac{a}{z - \color{blue}{1}} \]
                        2. lower--.f6418.9%

                          \[\leadsto y \cdot \frac{a}{z - 1} \]
                      11. Applied rewrites18.9%

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

                    Alternative 14: 64.8% accurate, 2.1× speedup?

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

                      1. Initial program 97.1%

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

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

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

                        if -5.2000000000000001e47 < z < 1.4e-147

                        1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                        6. Step-by-step derivation
                          1. lower-*.f6453.6%

                            \[\leadsto -1 \cdot \left(-1 \cdot x\right) \]
                        7. Applied rewrites53.6%

                          \[\leadsto -1 \cdot \left(-1 \cdot \color{blue}{x}\right) \]
                        8. Step-by-step derivation
                          1. lift-*.f64N/A

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

                            \[\leadsto \mathsf{neg}\left(-1 \cdot x\right) \]
                          3. lower-neg.f6453.6%

                            \[\leadsto --1 \cdot x \]
                          4. lift-*.f64N/A

                            \[\leadsto --1 \cdot x \]
                          5. mul-1-negN/A

                            \[\leadsto -\left(\mathsf{neg}\left(x\right)\right) \]
                          6. lower-neg.f6453.6%

                            \[\leadsto -\left(-x\right) \]
                        9. Applied rewrites53.6%

                          \[\leadsto -\left(-x\right) \]
                      4. Recombined 2 regimes into one program.
                      5. Add Preprocessing

                      Alternative 15: 59.5% accurate, 8.8× speedup?

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

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

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

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

                        Reproduce

                        ?
                        herbie shell --seed 2025258 
                        (FPCore (x y z t a)
                          :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                          :precision binary64
                          (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))