Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B

Percentage Accurate: 99.8% → 99.8%
Time: 3.9s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

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

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\left(t + 2 \cdot \left(z + y\right)\right) \cdot x - -5 \cdot y \]
(FPCore (x y z t)
  :precision binary64
  (- (* (+ t (* 2.0 (+ z y))) x) (* -5.0 y)))
double code(double x, double y, double z, double t) {
	return ((t + (2.0 * (z + y))) * x) - (-5.0 * y);
}
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)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = ((t + (2.0d0 * (z + y))) * x) - ((-5.0d0) * y)
end function
public static double code(double x, double y, double z, double t) {
	return ((t + (2.0 * (z + y))) * x) - (-5.0 * y);
}
def code(x, y, z, t):
	return ((t + (2.0 * (z + y))) * x) - (-5.0 * y)
function code(x, y, z, t)
	return Float64(Float64(Float64(t + Float64(2.0 * Float64(z + y))) * x) - Float64(-5.0 * y))
end
function tmp = code(x, y, z, t)
	tmp = ((t + (2.0 * (z + y))) * x) - (-5.0 * y);
end
code[x_, y_, z_, t_] := N[(N[(N[(t + N[(2.0 * N[(z + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(-5.0 * y), $MachinePrecision]), $MachinePrecision]
\left(t + 2 \cdot \left(z + y\right)\right) \cdot x - -5 \cdot y
Derivation
  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
    16. count-2N/A

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

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

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

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

      \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
    21. distribute-lft-neg-outN/A

      \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
    22. distribute-rgt-neg-inN/A

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

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

      \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
  3. Applied rewrites99.8%

    \[\leadsto \color{blue}{\left(t + 2 \cdot \left(z + y\right)\right) \cdot x - -5 \cdot y} \]
  4. Add Preprocessing

Alternative 2: 99.2% accurate, 0.7× speedup?

\[\begin{array}{l} t_1 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\ \mathbf{if}\;x \leq -540000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 20:\\ \;\;\;\;x \cdot \left(\left(\left(z + z\right) + y\right) + t\right) + y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t)
  :precision binary64
  (let* ((t_1 (* x (+ t (* 2.0 (+ y z))))))
  (if (<= x -540000.0)
    t_1
    (if (<= x 20.0) (+ (* x (+ (+ (+ z z) y) t)) (* y 5.0)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (2.0 * (y + z)));
	double tmp;
	if (x <= -540000.0) {
		tmp = t_1;
	} else if (x <= 20.0) {
		tmp = (x * (((z + z) + y) + t)) + (y * 5.0);
	} 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)
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) :: t_1
    real(8) :: tmp
    t_1 = x * (t + (2.0d0 * (y + z)))
    if (x <= (-540000.0d0)) then
        tmp = t_1
    else if (x <= 20.0d0) then
        tmp = (x * (((z + z) + y) + t)) + (y * 5.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = x * (t + (2.0 * (y + z)));
	double tmp;
	if (x <= -540000.0) {
		tmp = t_1;
	} else if (x <= 20.0) {
		tmp = (x * (((z + z) + y) + t)) + (y * 5.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = x * (t + (2.0 * (y + z)))
	tmp = 0
	if x <= -540000.0:
		tmp = t_1
	elif x <= 20.0:
		tmp = (x * (((z + z) + y) + t)) + (y * 5.0)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t)
	t_1 = Float64(x * Float64(t + Float64(2.0 * Float64(y + z))))
	tmp = 0.0
	if (x <= -540000.0)
		tmp = t_1;
	elseif (x <= 20.0)
		tmp = Float64(Float64(x * Float64(Float64(Float64(z + z) + y) + t)) + Float64(y * 5.0));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = x * (t + (2.0 * (y + z)));
	tmp = 0.0;
	if (x <= -540000.0)
		tmp = t_1;
	elseif (x <= 20.0)
		tmp = (x * (((z + z) + y) + t)) + (y * 5.0);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -540000.0], t$95$1, If[LessEqual[x, 20.0], N[(N[(x * N[(N[(N[(z + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
\mathbf{if}\;x \leq -540000:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 20:\\
\;\;\;\;x \cdot \left(\left(\left(z + z\right) + y\right) + t\right) + y \cdot 5\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -5.4e5 or 20 < x

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
      16. count-2N/A

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

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

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

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

        \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
      21. distribute-lft-neg-outN/A

        \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
      22. distribute-rgt-neg-inN/A

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

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

        \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
    3. Applied rewrites99.8%

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

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

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

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

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

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

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

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

        \[\leadsto x \cdot \left(t + \left(2 \cdot \left(y + z\right) + 5 \cdot \frac{y}{\color{blue}{x}}\right)\right) \]
    6. Applied rewrites87.9%

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

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

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

        \[\leadsto x \cdot \left(t + 2 \cdot \left(y + z\right)\right) \]
    9. Applied rewrites71.2%

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

    if -5.4e5 < x < 20

    1. Initial program 99.8%

      \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
    2. Taylor expanded in y around 0

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

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

    Alternative 3: 99.1% accurate, 0.8× speedup?

    \[\begin{array}{l} t_1 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\ \mathbf{if}\;x \leq -4800000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 20:\\ \;\;\;\;\left(\left(z + z\right) + t\right) \cdot x - -5 \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t)
      :precision binary64
      (let* ((t_1 (* x (+ t (* 2.0 (+ y z))))))
      (if (<= x -4800000000.0)
        t_1
        (if (<= x 20.0) (- (* (+ (+ z z) t) x) (* -5.0 y)) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = x * (t + (2.0 * (y + z)));
    	double tmp;
    	if (x <= -4800000000.0) {
    		tmp = t_1;
    	} else if (x <= 20.0) {
    		tmp = (((z + z) + t) * x) - (-5.0 * y);
    	} 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)
    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) :: t_1
        real(8) :: tmp
        t_1 = x * (t + (2.0d0 * (y + z)))
        if (x <= (-4800000000.0d0)) then
            tmp = t_1
        else if (x <= 20.0d0) then
            tmp = (((z + z) + t) * x) - ((-5.0d0) * y)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x * (t + (2.0 * (y + z)));
    	double tmp;
    	if (x <= -4800000000.0) {
    		tmp = t_1;
    	} else if (x <= 20.0) {
    		tmp = (((z + z) + t) * x) - (-5.0 * y);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = x * (t + (2.0 * (y + z)))
    	tmp = 0
    	if x <= -4800000000.0:
    		tmp = t_1
    	elif x <= 20.0:
    		tmp = (((z + z) + t) * x) - (-5.0 * y)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(x * Float64(t + Float64(2.0 * Float64(y + z))))
    	tmp = 0.0
    	if (x <= -4800000000.0)
    		tmp = t_1;
    	elseif (x <= 20.0)
    		tmp = Float64(Float64(Float64(Float64(z + z) + t) * x) - Float64(-5.0 * y));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = x * (t + (2.0 * (y + z)));
    	tmp = 0.0;
    	if (x <= -4800000000.0)
    		tmp = t_1;
    	elseif (x <= 20.0)
    		tmp = (((z + z) + t) * x) - (-5.0 * y);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4800000000.0], t$95$1, If[LessEqual[x, 20.0], N[(N[(N[(N[(z + z), $MachinePrecision] + t), $MachinePrecision] * x), $MachinePrecision] - N[(-5.0 * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
    \mathbf{if}\;x \leq -4800000000:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 20:\\
    \;\;\;\;\left(\left(z + z\right) + t\right) \cdot x - -5 \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -4.8e9 or 20 < x

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(t + \left(2 \cdot \left(y + z\right) + 5 \cdot \frac{y}{\color{blue}{x}}\right)\right) \]
      6. Applied rewrites87.9%

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

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

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

          \[\leadsto x \cdot \left(t + 2 \cdot \left(y + z\right)\right) \]
      9. Applied rewrites71.2%

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

      if -4.8e9 < x < 20

      1. Initial program 99.8%

        \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
      2. Taylor expanded in y around 0

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

          \[\leadsto x \cdot \left(t + \color{blue}{2 \cdot z}\right) + y \cdot 5 \]
        2. lower-*.f6485.2%

          \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{z}\right) + y \cdot 5 \]
      4. Applied rewrites85.2%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot z + t\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        12. count-2-revN/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        13. lower-+.f64N/A

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

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x - \mathsf{Rewrite=>}\left(distribute-lft-neg-out, \left(\mathsf{neg}\left(y \cdot 5\right)\right)\right) \]
        15. lower-+.f64N/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x - \mathsf{Rewrite=>}\left(distribute-rgt-neg-in, \left(y \cdot \left(\mathsf{neg}\left(5\right)\right)\right)\right) \]
        16. lower-+.f64N/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x - y \cdot \mathsf{Rewrite=>}\left(metadata-eval, -5\right) \]
        17. lower-+.f64N/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x - \mathsf{Rewrite<=}\left(*-commutative, \left(-5 \cdot y\right)\right) \]
        18. lower-+.f64N/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x - \mathsf{Rewrite<=}\left(lift-*.f64, \left(-5 \cdot y\right)\right) \]
      6. Applied rewrites85.2%

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

    Alternative 4: 89.3% accurate, 0.7× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(t + \left(2 \cdot \left(y + z\right) + 5 \cdot \frac{y}{\color{blue}{x}}\right)\right) \]
      6. Applied rewrites87.9%

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

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

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

          \[\leadsto x \cdot \left(t + 2 \cdot \left(y + z\right)\right) \]
      9. Applied rewrites71.2%

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

      if -3.5e-12 < x < 2e-243

      1. Initial program 99.8%

        \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
      2. Taylor expanded in t around inf

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

          \[\leadsto t \cdot \color{blue}{x} + y \cdot 5 \]
      4. Applied rewrites59.0%

        \[\leadsto \color{blue}{t \cdot x} + y \cdot 5 \]

      if 2e-243 < x < 2.3e-37

      1. Initial program 99.8%

        \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
      2. Taylor expanded in z around inf

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

          \[\leadsto 2 \cdot \color{blue}{\left(x \cdot z\right)} + y \cdot 5 \]
        2. lower-*.f6458.3%

          \[\leadsto 2 \cdot \left(x \cdot \color{blue}{z}\right) + y \cdot 5 \]
      4. Applied rewrites58.3%

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

    Alternative 5: 88.8% accurate, 0.9× speedup?

    \[\begin{array}{l} t_1 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-50}:\\ \;\;\;\;t \cdot x + y \cdot 5\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t)
      :precision binary64
      (let* ((t_1 (* x (+ t (* 2.0 (+ y z))))))
      (if (<= x -3.5e-12)
        t_1
        (if (<= x 7.6e-50) (+ (* t x) (* y 5.0)) t_1))))
    double code(double x, double y, double z, double t) {
    	double t_1 = x * (t + (2.0 * (y + z)));
    	double tmp;
    	if (x <= -3.5e-12) {
    		tmp = t_1;
    	} else if (x <= 7.6e-50) {
    		tmp = (t * x) + (y * 5.0);
    	} 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)
    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) :: t_1
        real(8) :: tmp
        t_1 = x * (t + (2.0d0 * (y + z)))
        if (x <= (-3.5d-12)) then
            tmp = t_1
        else if (x <= 7.6d-50) then
            tmp = (t * x) + (y * 5.0d0)
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double t_1 = x * (t + (2.0 * (y + z)));
    	double tmp;
    	if (x <= -3.5e-12) {
    		tmp = t_1;
    	} else if (x <= 7.6e-50) {
    		tmp = (t * x) + (y * 5.0);
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	t_1 = x * (t + (2.0 * (y + z)))
    	tmp = 0
    	if x <= -3.5e-12:
    		tmp = t_1
    	elif x <= 7.6e-50:
    		tmp = (t * x) + (y * 5.0)
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t)
    	t_1 = Float64(x * Float64(t + Float64(2.0 * Float64(y + z))))
    	tmp = 0.0
    	if (x <= -3.5e-12)
    		tmp = t_1;
    	elseif (x <= 7.6e-50)
    		tmp = Float64(Float64(t * x) + Float64(y * 5.0));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	t_1 = x * (t + (2.0 * (y + z)));
    	tmp = 0.0;
    	if (x <= -3.5e-12)
    		tmp = t_1;
    	elseif (x <= 7.6e-50)
    		tmp = (t * x) + (y * 5.0);
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.5e-12], t$95$1, If[LessEqual[x, 7.6e-50], N[(N[(t * x), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    t_1 := x \cdot \left(t + 2 \cdot \left(y + z\right)\right)\\
    \mathbf{if}\;x \leq -3.5 \cdot 10^{-12}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 7.6 \cdot 10^{-50}:\\
    \;\;\;\;t \cdot x + y \cdot 5\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -3.5e-12 or 7.5999999999999998e-50 < x

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

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

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

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

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

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

          \[\leadsto x \cdot \left(t + \left(2 \cdot \left(y + z\right) + 5 \cdot \frac{y}{\color{blue}{x}}\right)\right) \]
      6. Applied rewrites87.9%

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

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

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

          \[\leadsto x \cdot \left(t + 2 \cdot \left(y + z\right)\right) \]
      9. Applied rewrites71.2%

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

      if -3.5e-12 < x < 7.5999999999999998e-50

      1. Initial program 99.8%

        \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
      2. Taylor expanded in t around inf

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

          \[\leadsto t \cdot \color{blue}{x} + y \cdot 5 \]
      4. Applied rewrites59.0%

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

    Alternative 6: 78.8% accurate, 1.1× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

          \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
        3. lower-*.f6447.7%

          \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
      6. Applied rewrites47.7%

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

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

          \[\leadsto \left(5 + 2 \cdot x\right) \cdot \color{blue}{y} \]
        3. lower-*.f6447.7%

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

          \[\leadsto \left(5 + 2 \cdot x\right) \cdot y \]
        5. +-commutativeN/A

          \[\leadsto \left(2 \cdot x + 5\right) \cdot y \]
        6. add-flipN/A

          \[\leadsto \left(2 \cdot x - \left(\mathsf{neg}\left(5\right)\right)\right) \cdot y \]
        7. metadata-evalN/A

          \[\leadsto \left(2 \cdot x - -5\right) \cdot y \]
        8. lower--.f6447.7%

          \[\leadsto \left(2 \cdot x - -5\right) \cdot y \]
        9. lift-*.f64N/A

          \[\leadsto \left(2 \cdot x - -5\right) \cdot y \]
        10. count-2-revN/A

          \[\leadsto \left(\left(x + x\right) - -5\right) \cdot y \]
        11. lower-+.f6447.7%

          \[\leadsto \left(\left(x + x\right) - -5\right) \cdot y \]
      8. Applied rewrites47.7%

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

      if -3.7e11 < y < 3.6999999999999999e37

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

          \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
        3. lower-*.f6447.7%

          \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
      6. Applied rewrites47.7%

        \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
      7. Taylor expanded in y around 0

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

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

          \[\leadsto x \cdot \left(t + \color{blue}{2 \cdot z}\right) \]
        3. lower-*.f6457.0%

          \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{z}\right) \]
      9. Applied rewrites57.0%

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

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

          \[\leadsto \left(t + 2 \cdot z\right) \cdot \color{blue}{x} \]
        3. lower-*.f6457.0%

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

          \[\leadsto \left(t + 2 \cdot z\right) \cdot x \]
        5. +-commutativeN/A

          \[\leadsto \left(2 \cdot z + t\right) \cdot x \]
        6. lower-+.f6457.0%

          \[\leadsto \left(2 \cdot z + t\right) \cdot x \]
        7. lift-*.f64N/A

          \[\leadsto \left(2 \cdot z + t\right) \cdot x \]
        8. count-2-revN/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x \]
        9. lower-+.f6457.0%

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x \]
      11. Applied rewrites57.0%

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

    Alternative 7: 65.7% accurate, 1.1× speedup?

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

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

          \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
        3. lower-*.f6447.7%

          \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
      6. Applied rewrites47.7%

        \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
      7. Taylor expanded in y around 0

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

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

          \[\leadsto x \cdot \left(t + \color{blue}{2 \cdot z}\right) \]
        3. lower-*.f6457.0%

          \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{z}\right) \]
      9. Applied rewrites57.0%

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

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

          \[\leadsto \left(t + 2 \cdot z\right) \cdot \color{blue}{x} \]
        3. lower-*.f6457.0%

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

          \[\leadsto \left(t + 2 \cdot z\right) \cdot x \]
        5. +-commutativeN/A

          \[\leadsto \left(2 \cdot z + t\right) \cdot x \]
        6. lower-+.f6457.0%

          \[\leadsto \left(2 \cdot z + t\right) \cdot x \]
        7. lift-*.f64N/A

          \[\leadsto \left(2 \cdot z + t\right) \cdot x \]
        8. count-2-revN/A

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x \]
        9. lower-+.f6457.0%

          \[\leadsto \left(\left(z + z\right) + t\right) \cdot x \]
      11. Applied rewrites57.0%

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

      if -1.85e-57 < x < 1.7e-212

      1. Initial program 99.8%

        \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
      2. Taylor expanded in x around 0

        \[\leadsto \color{blue}{5 \cdot y} \]
      3. Step-by-step derivation
        1. lower-*.f6430.3%

          \[\leadsto 5 \cdot \color{blue}{y} \]
      4. Applied rewrites30.3%

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

    Alternative 8: 47.9% accurate, 1.0× speedup?

    \[\begin{array}{l} \mathbf{if}\;x \leq -3.5 \cdot 10^{+169}:\\ \;\;\;\;2 \cdot \left(x \cdot y\right)\\ \mathbf{elif}\;x \leq -1.85 \cdot 10^{-57}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 7.6 \cdot 10^{-50}:\\ \;\;\;\;5 \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(z + z\right) \cdot x\\ \end{array} \]
    (FPCore (x y z t)
      :precision binary64
      (if (<= x -3.5e+169)
      (* 2.0 (* x y))
      (if (<= x -1.85e-57)
        (* x t)
        (if (<= x 7.6e-50) (* 5.0 y) (* (+ z z) x)))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if (x <= -3.5e+169) {
    		tmp = 2.0 * (x * y);
    	} else if (x <= -1.85e-57) {
    		tmp = x * t;
    	} else if (x <= 7.6e-50) {
    		tmp = 5.0 * y;
    	} else {
    		tmp = (z + z) * x;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t)
    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) :: tmp
        if (x <= (-3.5d+169)) then
            tmp = 2.0d0 * (x * y)
        else if (x <= (-1.85d-57)) then
            tmp = x * t
        else if (x <= 7.6d-50) then
            tmp = 5.0d0 * y
        else
            tmp = (z + z) * x
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if (x <= -3.5e+169) {
    		tmp = 2.0 * (x * y);
    	} else if (x <= -1.85e-57) {
    		tmp = x * t;
    	} else if (x <= 7.6e-50) {
    		tmp = 5.0 * y;
    	} else {
    		tmp = (z + z) * x;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if x <= -3.5e+169:
    		tmp = 2.0 * (x * y)
    	elif x <= -1.85e-57:
    		tmp = x * t
    	elif x <= 7.6e-50:
    		tmp = 5.0 * y
    	else:
    		tmp = (z + z) * x
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (x <= -3.5e+169)
    		tmp = Float64(2.0 * Float64(x * y));
    	elseif (x <= -1.85e-57)
    		tmp = Float64(x * t);
    	elseif (x <= 7.6e-50)
    		tmp = Float64(5.0 * y);
    	else
    		tmp = Float64(Float64(z + z) * x);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if (x <= -3.5e+169)
    		tmp = 2.0 * (x * y);
    	elseif (x <= -1.85e-57)
    		tmp = x * t;
    	elseif (x <= 7.6e-50)
    		tmp = 5.0 * y;
    	else
    		tmp = (z + z) * x;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[x, -3.5e+169], N[(2.0 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.85e-57], N[(x * t), $MachinePrecision], If[LessEqual[x, 7.6e-50], N[(5.0 * y), $MachinePrecision], N[(N[(z + z), $MachinePrecision] * x), $MachinePrecision]]]]
    
    \begin{array}{l}
    \mathbf{if}\;x \leq -3.5 \cdot 10^{+169}:\\
    \;\;\;\;2 \cdot \left(x \cdot y\right)\\
    
    \mathbf{elif}\;x \leq -1.85 \cdot 10^{-57}:\\
    \;\;\;\;x \cdot t\\
    
    \mathbf{elif}\;x \leq 7.6 \cdot 10^{-50}:\\
    \;\;\;\;5 \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(z + z\right) \cdot x\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if x < -3.5000000000000002e169

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

          \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
        3. lower-*.f6447.7%

          \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
      6. Applied rewrites47.7%

        \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
      7. Taylor expanded in x around inf

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

          \[\leadsto 2 \cdot \left(x \cdot \color{blue}{y}\right) \]
        2. lower-*.f6419.9%

          \[\leadsto 2 \cdot \left(x \cdot y\right) \]
      9. Applied rewrites19.9%

        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y\right)} \]

      if -3.5000000000000002e169 < x < -1.85e-57

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        16. count-2N/A

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

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

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

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

          \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
        21. distribute-lft-neg-outN/A

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
        22. distribute-rgt-neg-inN/A

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

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

          \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
      3. Applied rewrites99.8%

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

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

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

          \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
        3. lower-*.f6447.7%

          \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
      6. Applied rewrites47.7%

        \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
      7. Taylor expanded in y around 0

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

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

          \[\leadsto x \cdot \left(t + \color{blue}{2 \cdot z}\right) \]
        3. lower-*.f6457.0%

          \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{z}\right) \]
      9. Applied rewrites57.0%

        \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
      10. Taylor expanded in z around 0

        \[\leadsto x \cdot t \]
      11. Step-by-step derivation
        1. Applied rewrites31.1%

          \[\leadsto x \cdot t \]

        if -1.85e-57 < x < 7.5999999999999998e-50

        1. Initial program 99.8%

          \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{5 \cdot y} \]
        3. Step-by-step derivation
          1. lower-*.f6430.3%

            \[\leadsto 5 \cdot \color{blue}{y} \]
        4. Applied rewrites30.3%

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

        if 7.5999999999999998e-50 < x

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 2 \cdot \color{blue}{\left(x \cdot z\right)} \]
          2. lower-*.f6430.3%

            \[\leadsto 2 \cdot \left(x \cdot \color{blue}{z}\right) \]
        6. Applied rewrites30.3%

          \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right)} \]
        7. Step-by-step derivation
          1. Applied rewrites30.3%

            \[\leadsto \color{blue}{\left(z + z\right) \cdot x} \]
        8. Recombined 4 regimes into one program.
        9. Add Preprocessing

        Alternative 9: 47.8% accurate, 1.2× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
            16. count-2N/A

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

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

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

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

              \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
            21. distribute-lft-neg-outN/A

              \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
            22. distribute-rgt-neg-inN/A

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

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

              \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
          3. Applied rewrites99.8%

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

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

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

              \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
            3. lower-*.f6447.7%

              \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
          6. Applied rewrites47.7%

            \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
          7. Taylor expanded in y around 0

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

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

              \[\leadsto x \cdot \left(t + \color{blue}{2 \cdot z}\right) \]
            3. lower-*.f6457.0%

              \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{z}\right) \]
          9. Applied rewrites57.0%

            \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
          10. Taylor expanded in z around 0

            \[\leadsto x \cdot t \]
          11. Step-by-step derivation
            1. Applied rewrites31.1%

              \[\leadsto x \cdot t \]

            if -1.85e-57 < x < 7.5999999999999998e-50

            1. Initial program 99.8%

              \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
            2. Taylor expanded in x around 0

              \[\leadsto \color{blue}{5 \cdot y} \]
            3. Step-by-step derivation
              1. lower-*.f6430.3%

                \[\leadsto 5 \cdot \color{blue}{y} \]
            4. Applied rewrites30.3%

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

            if 7.5999999999999998e-50 < x

            1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 2 \cdot \color{blue}{\left(x \cdot z\right)} \]
              2. lower-*.f6430.3%

                \[\leadsto 2 \cdot \left(x \cdot \color{blue}{z}\right) \]
            6. Applied rewrites30.3%

              \[\leadsto \color{blue}{2 \cdot \left(x \cdot z\right)} \]
            7. Step-by-step derivation
              1. Applied rewrites30.3%

                \[\leadsto \color{blue}{\left(z + z\right) \cdot x} \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 10: 47.7% accurate, 1.4× speedup?

            \[\begin{array}{l} \mathbf{if}\;x \leq -1.85 \cdot 10^{-57}:\\ \;\;\;\;x \cdot t\\ \mathbf{elif}\;x \leq 1.06 \cdot 10^{-58}:\\ \;\;\;\;5 \cdot y\\ \mathbf{else}:\\ \;\;\;\;x \cdot t\\ \end{array} \]
            (FPCore (x y z t)
              :precision binary64
              (if (<= x -1.85e-57) (* x t) (if (<= x 1.06e-58) (* 5.0 y) (* x t))))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if (x <= -1.85e-57) {
            		tmp = x * t;
            	} else if (x <= 1.06e-58) {
            		tmp = 5.0 * y;
            	} else {
            		tmp = x * t;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t)
            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) :: tmp
                if (x <= (-1.85d-57)) then
                    tmp = x * t
                else if (x <= 1.06d-58) then
                    tmp = 5.0d0 * y
                else
                    tmp = x * t
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if (x <= -1.85e-57) {
            		tmp = x * t;
            	} else if (x <= 1.06e-58) {
            		tmp = 5.0 * y;
            	} else {
            		tmp = x * t;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if x <= -1.85e-57:
            		tmp = x * t
            	elif x <= 1.06e-58:
            		tmp = 5.0 * y
            	else:
            		tmp = x * t
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (x <= -1.85e-57)
            		tmp = Float64(x * t);
            	elseif (x <= 1.06e-58)
            		tmp = Float64(5.0 * y);
            	else
            		tmp = Float64(x * t);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if (x <= -1.85e-57)
            		tmp = x * t;
            	elseif (x <= 1.06e-58)
            		tmp = 5.0 * y;
            	else
            		tmp = x * t;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[x, -1.85e-57], N[(x * t), $MachinePrecision], If[LessEqual[x, 1.06e-58], N[(5.0 * y), $MachinePrecision], N[(x * t), $MachinePrecision]]]
            
            \begin{array}{l}
            \mathbf{if}\;x \leq -1.85 \cdot 10^{-57}:\\
            \;\;\;\;x \cdot t\\
            
            \mathbf{elif}\;x \leq 1.06 \cdot 10^{-58}:\\
            \;\;\;\;5 \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;x \cdot t\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < -1.85e-57 or 1.0600000000000001e-58 < x

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(t + \left(\left(y + z\right) + \color{blue}{\left(y + z\right)}\right)\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
                16. count-2N/A

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

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

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

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

                  \[\leadsto \left(t + 2 \cdot \color{blue}{\left(z + y\right)}\right) \cdot x - \left(\mathsf{neg}\left(y\right)\right) \cdot 5 \]
                21. distribute-lft-neg-outN/A

                  \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(y \cdot 5\right)\right)} \]
                22. distribute-rgt-neg-inN/A

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

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

                  \[\leadsto \left(t + 2 \cdot \left(z + y\right)\right) \cdot x - \color{blue}{\left(\mathsf{neg}\left(5\right)\right) \cdot y} \]
              3. Applied rewrites99.8%

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

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

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

                  \[\leadsto y \cdot \left(5 + \color{blue}{2 \cdot x}\right) \]
                3. lower-*.f6447.7%

                  \[\leadsto y \cdot \left(5 + 2 \cdot \color{blue}{x}\right) \]
              6. Applied rewrites47.7%

                \[\leadsto \color{blue}{y \cdot \left(5 + 2 \cdot x\right)} \]
              7. Taylor expanded in y around 0

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

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

                  \[\leadsto x \cdot \left(t + \color{blue}{2 \cdot z}\right) \]
                3. lower-*.f6457.0%

                  \[\leadsto x \cdot \left(t + 2 \cdot \color{blue}{z}\right) \]
              9. Applied rewrites57.0%

                \[\leadsto \color{blue}{x \cdot \left(t + 2 \cdot z\right)} \]
              10. Taylor expanded in z around 0

                \[\leadsto x \cdot t \]
              11. Step-by-step derivation
                1. Applied rewrites31.1%

                  \[\leadsto x \cdot t \]

                if -1.85e-57 < x < 1.0600000000000001e-58

                1. Initial program 99.8%

                  \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
                2. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{5 \cdot y} \]
                3. Step-by-step derivation
                  1. lower-*.f6430.3%

                    \[\leadsto 5 \cdot \color{blue}{y} \]
                4. Applied rewrites30.3%

                  \[\leadsto \color{blue}{5 \cdot y} \]
              12. Recombined 2 regimes into one program.
              13. Add Preprocessing

              Alternative 11: 30.3% accurate, 4.3× speedup?

              \[5 \cdot y \]
              (FPCore (x y z t)
                :precision binary64
                (* 5.0 y))
              double code(double x, double y, double z, double t) {
              	return 5.0 * y;
              }
              
              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)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  code = 5.0d0 * y
              end function
              
              public static double code(double x, double y, double z, double t) {
              	return 5.0 * y;
              }
              
              def code(x, y, z, t):
              	return 5.0 * y
              
              function code(x, y, z, t)
              	return Float64(5.0 * y)
              end
              
              function tmp = code(x, y, z, t)
              	tmp = 5.0 * y;
              end
              
              code[x_, y_, z_, t_] := N[(5.0 * y), $MachinePrecision]
              
              5 \cdot y
              
              Derivation
              1. Initial program 99.8%

                \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5 \]
              2. Taylor expanded in x around 0

                \[\leadsto \color{blue}{5 \cdot y} \]
              3. Step-by-step derivation
                1. lower-*.f6430.3%

                  \[\leadsto 5 \cdot \color{blue}{y} \]
              4. Applied rewrites30.3%

                \[\leadsto \color{blue}{5 \cdot y} \]
              5. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2025258 
              (FPCore (x y z t)
                :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
                :precision binary64
                (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))