Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A

Percentage Accurate: 99.4% → 99.8%
Time: 7.0s
Alternatives: 10
Speedup: 1.1×

Specification

?
\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
(FPCore (x y z t)
 :precision binary64
 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.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 * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t):
	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0)))
end
function tmp = code(x, y, z, t)
	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}

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

\[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
(FPCore (x y z t)
 :precision binary64
 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.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 * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t):
	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0)))
end
function tmp = code(x, y, z, t)
	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

real(8) function code(x, y, z, t)
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 = ((0.5d0 * x) - y) * sqrt((exp((t * t)) * (z + z)))
end function
public static double code(double x, double y, double z, double t) {
	return ((0.5 * x) - y) * Math.sqrt((Math.exp((t * t)) * (z + z)));
}
def code(x, y, z, t):
	return ((0.5 * x) - y) * math.sqrt((math.exp((t * t)) * (z + z)))
function code(x, y, z, t)
	return Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(exp(Float64(t * t)) * Float64(z + z))))
end
function tmp = code(x, y, z, t)
	tmp = ((0.5 * x) - y) * sqrt((exp((t * t)) * (z + z)));
end
code[x_, y_, z_, t_] := N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}
Derivation
  1. Initial program 99.4%

    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
  2. Step-by-step derivation
    1. lift-*.f64N/A

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

      \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
    3. associate-*l*N/A

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

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

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

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

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

      \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right) \]
    9. lift-exp.f64N/A

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

      \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\color{blue}{\frac{t \cdot t}{2}}}\right) \]
    11. exp-sqrtN/A

      \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{e^{t \cdot t}}}\right) \]
    12. sqrt-unprodN/A

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

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

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

      \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{\color{blue}{e^{t \cdot t} \cdot \left(z \cdot 2\right)}} \]
    16. lower-exp.f6499.8

      \[\leadsto \left(0.5 \cdot x - y\right) \cdot \sqrt{\color{blue}{e^{t \cdot t}} \cdot \left(z \cdot 2\right)} \]
    17. lift-*.f64N/A

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

      \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(2 \cdot z\right)}} \]
    19. count-2-revN/A

      \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(z + z\right)}} \]
    20. lower-+.f6499.8

      \[\leadsto \left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(z + z\right)}} \]
  3. Applied rewrites99.8%

    \[\leadsto \color{blue}{\left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
  4. Add Preprocessing

Alternative 2: 86.6% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;\left|t\right| \leq 0.000225:\\ \;\;\;\;\frac{0.5 \cdot x - y}{{\left(2 \cdot z\right)}^{-0.5}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(z + z\right) \cdot e^{\left|t\right| \cdot \left|t\right|}} \cdot \left(-y\right)\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (fabs t) 0.000225)
   (/ (- (* 0.5 x) y) (pow (* 2.0 z) -0.5))
   (* (sqrt (* (+ z z) (exp (* (fabs t) (fabs t))))) (- y))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (fabs(t) <= 0.000225) {
		tmp = ((0.5 * x) - y) / pow((2.0 * z), -0.5);
	} else {
		tmp = sqrt(((z + z) * exp((fabs(t) * fabs(t))))) * -y;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
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 (abs(t) <= 0.000225d0) then
        tmp = ((0.5d0 * x) - y) / ((2.0d0 * z) ** (-0.5d0))
    else
        tmp = sqrt(((z + z) * exp((abs(t) * abs(t))))) * -y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (Math.abs(t) <= 0.000225) {
		tmp = ((0.5 * x) - y) / Math.pow((2.0 * z), -0.5);
	} else {
		tmp = Math.sqrt(((z + z) * Math.exp((Math.abs(t) * Math.abs(t))))) * -y;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if math.fabs(t) <= 0.000225:
		tmp = ((0.5 * x) - y) / math.pow((2.0 * z), -0.5)
	else:
		tmp = math.sqrt(((z + z) * math.exp((math.fabs(t) * math.fabs(t))))) * -y
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (abs(t) <= 0.000225)
		tmp = Float64(Float64(Float64(0.5 * x) - y) / (Float64(2.0 * z) ^ -0.5));
	else
		tmp = Float64(sqrt(Float64(Float64(z + z) * exp(Float64(abs(t) * abs(t))))) * Float64(-y));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (abs(t) <= 0.000225)
		tmp = ((0.5 * x) - y) / ((2.0 * z) ^ -0.5);
	else
		tmp = sqrt(((z + z) * exp((abs(t) * abs(t))))) * -y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[N[Abs[t], $MachinePrecision], 0.000225], N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] / N[Power[N[(2.0 * z), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(z + z), $MachinePrecision] * N[Exp[N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|t\right| \leq 0.000225:\\
\;\;\;\;\frac{0.5 \cdot x - y}{{\left(2 \cdot z\right)}^{-0.5}}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(z + z\right) \cdot e^{\left|t\right| \cdot \left|t\right|}} \cdot \left(-y\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.2499999999999999e-4

    1. Initial program 99.4%

      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
    2. Taylor expanded in t around 0

      \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
    3. Step-by-step derivation
      1. Applied rewrites56.6%

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

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\sqrt{z \cdot 2}}\right) \cdot 1 \]
        2. pow1/2N/A

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

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

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot {\color{blue}{\left(2 \cdot z\right)}}^{\frac{1}{2}}\right) \cdot 1 \]
        5. count-2-revN/A

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

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot {\color{blue}{\left(z + z\right)}}^{\frac{1}{2}}\right) \cdot 1 \]
        7. remove-double-negN/A

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot {\left(z + z\right)}^{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)\right)\right)}}\right) \cdot 1 \]
        8. pow-negN/A

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

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \color{blue}{\frac{1}{{\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}\right) \cdot 1 \]
        10. lower-unsound-pow.f64N/A

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \frac{1}{\color{blue}{{\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}}\right) \cdot 1 \]
        11. metadata-eval56.5

          \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \frac{1}{{\left(z + z\right)}^{\color{blue}{-0.5}}}\right) \cdot 1 \]
      3. Applied rewrites56.5%

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

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

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

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

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

          \[\leadsto \frac{\frac{1}{2} \cdot x - y}{{\left(2 \cdot z\right)}^{\color{blue}{\frac{-1}{2}}}} \]
        5. lower-*.f6456.6

          \[\leadsto \frac{0.5 \cdot x - y}{{\left(2 \cdot z\right)}^{-0.5}} \]
      6. Applied rewrites56.6%

        \[\leadsto \color{blue}{\frac{0.5 \cdot x - y}{{\left(2 \cdot z\right)}^{-0.5}}} \]

      if 2.2499999999999999e-4 < t

      1. Initial program 99.4%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

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

          \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
        3. associate-*l*N/A

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

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

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

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

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

          \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right) \]
        9. lift-exp.f64N/A

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

          \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\color{blue}{\frac{t \cdot t}{2}}}\right) \]
        11. exp-sqrtN/A

          \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{e^{t \cdot t}}}\right) \]
        12. sqrt-unprodN/A

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

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

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

          \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{\color{blue}{e^{t \cdot t} \cdot \left(z \cdot 2\right)}} \]
        16. lower-exp.f6499.8

          \[\leadsto \left(0.5 \cdot x - y\right) \cdot \sqrt{\color{blue}{e^{t \cdot t}} \cdot \left(z \cdot 2\right)} \]
        17. lift-*.f64N/A

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

          \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(2 \cdot z\right)}} \]
        19. count-2-revN/A

          \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(z + z\right)}} \]
        20. lower-+.f6499.8

          \[\leadsto \left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(z + z\right)}} \]
      3. Applied rewrites99.8%

        \[\leadsto \color{blue}{\left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
      4. Taylor expanded in x around 0

        \[\leadsto \color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \]
      5. Step-by-step derivation
        1. lower-*.f6463.0

          \[\leadsto \left(-1 \cdot \color{blue}{y}\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \]
      6. Applied rewrites63.0%

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

          \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
        2. *-commutativeN/A

          \[\leadsto \color{blue}{\sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \cdot \left(-1 \cdot y\right)} \]
        3. lower-*.f6463.0

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

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

          \[\leadsto \sqrt{\color{blue}{\left(z + z\right) \cdot e^{t \cdot t}}} \cdot \left(-1 \cdot y\right) \]
        6. lower-*.f6463.0

          \[\leadsto \sqrt{\color{blue}{\left(z + z\right) \cdot e^{t \cdot t}}} \cdot \left(-1 \cdot y\right) \]
        7. lift-*.f64N/A

          \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(-1 \cdot \color{blue}{y}\right) \]
        8. *-commutativeN/A

          \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(y \cdot \color{blue}{-1}\right) \]
        9. metadata-evalN/A

          \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(y \cdot \left(\mathsf{neg}\left(1\right)\right)\right) \]
        10. distribute-rgt-neg-outN/A

          \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right) \]
        11. lower-neg.f64N/A

          \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(-y \cdot 1\right) \]
        12. *-rgt-identity63.0

          \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(-y\right) \]
      8. Applied rewrites63.0%

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

    Alternative 3: 86.6% accurate, 1.0× speedup?

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

      1. Initial program 99.4%

        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
      2. Taylor expanded in t around 0

        \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
      3. Step-by-step derivation
        1. Applied rewrites56.6%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
          13. count-2-revN/A

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

            \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
          15. lower-*.f6456.6

            \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z + z} \cdot 1\right)} \]
        3. Applied rewrites56.6%

          \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)} \]

        if 2.2499999999999999e-4 < t

        1. Initial program 99.4%

          \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

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

            \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right)} \cdot e^{\frac{t \cdot t}{2}} \]
          3. associate-*l*N/A

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

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

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

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

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

            \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\color{blue}{\sqrt{z \cdot 2}} \cdot e^{\frac{t \cdot t}{2}}\right) \]
          9. lift-exp.f64N/A

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

            \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot e^{\color{blue}{\frac{t \cdot t}{2}}}\right) \]
          11. exp-sqrtN/A

            \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot \color{blue}{\sqrt{e^{t \cdot t}}}\right) \]
          12. sqrt-unprodN/A

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

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

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

            \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{\color{blue}{e^{t \cdot t} \cdot \left(z \cdot 2\right)}} \]
          16. lower-exp.f6499.8

            \[\leadsto \left(0.5 \cdot x - y\right) \cdot \sqrt{\color{blue}{e^{t \cdot t}} \cdot \left(z \cdot 2\right)} \]
          17. lift-*.f64N/A

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

            \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(2 \cdot z\right)}} \]
          19. count-2-revN/A

            \[\leadsto \left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(z + z\right)}} \]
          20. lower-+.f6499.8

            \[\leadsto \left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \color{blue}{\left(z + z\right)}} \]
        3. Applied rewrites99.8%

          \[\leadsto \color{blue}{\left(0.5 \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
        4. Taylor expanded in x around 0

          \[\leadsto \color{blue}{\left(-1 \cdot y\right)} \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \]
        5. Step-by-step derivation
          1. lower-*.f6463.0

            \[\leadsto \left(-1 \cdot \color{blue}{y}\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \]
        6. Applied rewrites63.0%

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

            \[\leadsto \color{blue}{\left(-1 \cdot y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
          2. *-commutativeN/A

            \[\leadsto \color{blue}{\sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \cdot \left(-1 \cdot y\right)} \]
          3. lower-*.f6463.0

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

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

            \[\leadsto \sqrt{\color{blue}{\left(z + z\right) \cdot e^{t \cdot t}}} \cdot \left(-1 \cdot y\right) \]
          6. lower-*.f6463.0

            \[\leadsto \sqrt{\color{blue}{\left(z + z\right) \cdot e^{t \cdot t}}} \cdot \left(-1 \cdot y\right) \]
          7. lift-*.f64N/A

            \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(-1 \cdot \color{blue}{y}\right) \]
          8. *-commutativeN/A

            \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(y \cdot \color{blue}{-1}\right) \]
          9. metadata-evalN/A

            \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(y \cdot \left(\mathsf{neg}\left(1\right)\right)\right) \]
          10. distribute-rgt-neg-outN/A

            \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right) \]
          11. lower-neg.f64N/A

            \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(-y \cdot 1\right) \]
          12. *-rgt-identity63.0

            \[\leadsto \sqrt{\left(z + z\right) \cdot e^{t \cdot t}} \cdot \left(-y\right) \]
        8. Applied rewrites63.0%

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

      Alternative 4: 61.7% accurate, 1.1× speedup?

      \[\begin{array}{l} \mathbf{if}\;\frac{t \cdot t}{2} \leq 6000000000000:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{\frac{2}{z}}\right) \cdot z\right) \cdot 1\\ \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (if (<= (/ (* t t) 2.0) 6000000000000.0)
         (* (- (* x 0.5) y) (* (sqrt (+ z z)) 1.0))
         (* (* (* (- (* 0.5 x) y) (sqrt (/ 2.0 z))) z) 1.0)))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if (((t * t) / 2.0) <= 6000000000000.0) {
      		tmp = ((x * 0.5) - y) * (sqrt((z + z)) * 1.0);
      	} else {
      		tmp = ((((0.5 * x) - y) * sqrt((2.0 / z))) * z) * 1.0;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t)
      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 (((t * t) / 2.0d0) <= 6000000000000.0d0) then
              tmp = ((x * 0.5d0) - y) * (sqrt((z + z)) * 1.0d0)
          else
              tmp = ((((0.5d0 * x) - y) * sqrt((2.0d0 / z))) * z) * 1.0d0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double tmp;
      	if (((t * t) / 2.0) <= 6000000000000.0) {
      		tmp = ((x * 0.5) - y) * (Math.sqrt((z + z)) * 1.0);
      	} else {
      		tmp = ((((0.5 * x) - y) * Math.sqrt((2.0 / z))) * z) * 1.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	tmp = 0
      	if ((t * t) / 2.0) <= 6000000000000.0:
      		tmp = ((x * 0.5) - y) * (math.sqrt((z + z)) * 1.0)
      	else:
      		tmp = ((((0.5 * x) - y) * math.sqrt((2.0 / z))) * z) * 1.0
      	return tmp
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (Float64(Float64(t * t) / 2.0) <= 6000000000000.0)
      		tmp = Float64(Float64(Float64(x * 0.5) - y) * Float64(sqrt(Float64(z + z)) * 1.0));
      	else
      		tmp = Float64(Float64(Float64(Float64(Float64(0.5 * x) - y) * sqrt(Float64(2.0 / z))) * z) * 1.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	tmp = 0.0;
      	if (((t * t) / 2.0) <= 6000000000000.0)
      		tmp = ((x * 0.5) - y) * (sqrt((z + z)) * 1.0);
      	else
      		tmp = ((((0.5 * x) - y) * sqrt((2.0 / z))) * z) * 1.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := If[LessEqual[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision], 6000000000000.0], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(0.5 * x), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(2.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] * 1.0), $MachinePrecision]]
      
      \begin{array}{l}
      \mathbf{if}\;\frac{t \cdot t}{2} \leq 6000000000000:\\
      \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{\frac{2}{z}}\right) \cdot z\right) \cdot 1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (*.f64 t t) #s(literal 2 binary64)) < 6e12

        1. Initial program 99.4%

          \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
        2. Taylor expanded in t around 0

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
        3. Step-by-step derivation
          1. Applied rewrites56.6%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
            13. count-2-revN/A

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

              \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
            15. lower-*.f6456.6

              \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z + z} \cdot 1\right)} \]
          3. Applied rewrites56.6%

            \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)} \]

          if 6e12 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

          1. Initial program 99.4%

            \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
          2. Taylor expanded in t around 0

            \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
          3. Step-by-step derivation
            1. Applied rewrites56.6%

              \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
            2. Taylor expanded in z around inf

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

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

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

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

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

                \[\leadsto \left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(\frac{1}{2} \cdot x - \color{blue}{y}\right)\right)\right) \cdot 1 \]
              6. lower-*.f6456.0

                \[\leadsto \left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(0.5 \cdot x - y\right)\right)\right) \cdot 1 \]
            4. Applied rewrites56.0%

              \[\leadsto \color{blue}{\left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(0.5 \cdot x - y\right)\right)\right)} \cdot 1 \]
            5. Step-by-step derivation
              1. Applied rewrites56.0%

                \[\leadsto \color{blue}{\left(\left(\left(0.5 \cdot x - y\right) \cdot \sqrt{\frac{2}{z}}\right) \cdot z\right) \cdot 1} \]
            6. Recombined 2 regimes into one program.
            7. Add Preprocessing

            Alternative 5: 61.5% accurate, 1.0× speedup?

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

              1. Initial program 99.4%

                \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
              2. Taylor expanded in t around 0

                \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
              3. Step-by-step derivation
                1. Applied rewrites56.6%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
                  13. count-2-revN/A

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

                    \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
                  15. lower-*.f6456.6

                    \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z + z} \cdot 1\right)} \]
                3. Applied rewrites56.6%

                  \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)} \]

                if 2.00000000000000001e41 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                1. Initial program 99.4%

                  \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                2. Taylor expanded in t around 0

                  \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                3. Step-by-step derivation
                  1. Applied rewrites56.6%

                    \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                  2. Taylor expanded in z around inf

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

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

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

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

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

                      \[\leadsto \left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(\frac{1}{2} \cdot x - \color{blue}{y}\right)\right)\right) \cdot 1 \]
                    6. lower-*.f6456.0

                      \[\leadsto \left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(0.5 \cdot x - y\right)\right)\right) \cdot 1 \]
                  4. Applied rewrites56.0%

                    \[\leadsto \color{blue}{\left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(0.5 \cdot x - y\right)\right)\right)} \cdot 1 \]
                  5. Step-by-step derivation
                    1. Applied rewrites56.0%

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

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

                        \[\leadsto \left(\left(\left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{\frac{2}{z}}\right) \cdot z\right) \cdot 1 \]
                      3. sqrt-divN/A

                        \[\leadsto \left(\left(\left(\frac{1}{2} \cdot x - y\right) \cdot \frac{\sqrt{2}}{\sqrt{z}}\right) \cdot z\right) \cdot 1 \]
                      4. lower-unsound-/.f64N/A

                        \[\leadsto \left(\left(\left(\frac{1}{2} \cdot x - y\right) \cdot \frac{\sqrt{2}}{\sqrt{z}}\right) \cdot z\right) \cdot 1 \]
                      5. lower-unsound-sqrt.f64N/A

                        \[\leadsto \left(\left(\left(\frac{1}{2} \cdot x - y\right) \cdot \frac{\sqrt{2}}{\sqrt{z}}\right) \cdot z\right) \cdot 1 \]
                      6. lower-unsound-sqrt.f6455.9

                        \[\leadsto \left(\left(\left(0.5 \cdot x - y\right) \cdot \frac{\sqrt{2}}{\sqrt{z}}\right) \cdot z\right) \cdot 1 \]
                    3. Applied rewrites55.9%

                      \[\leadsto \left(\left(\left(0.5 \cdot x - y\right) \cdot \frac{\sqrt{2}}{\sqrt{z}}\right) \cdot z\right) \cdot 1 \]
                  6. Recombined 2 regimes into one program.
                  7. Add Preprocessing

                  Alternative 6: 60.1% accurate, 1.1× speedup?

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

                    1. Initial program 99.4%

                      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                    2. Taylor expanded in t around 0

                      \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                    3. Step-by-step derivation
                      1. Applied rewrites56.6%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
                        13. count-2-revN/A

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

                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
                        15. lower-*.f6456.6

                          \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z + z} \cdot 1\right)} \]
                      3. Applied rewrites56.6%

                        \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)} \]

                      if 3.10000000000000011e51 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                      1. Initial program 99.4%

                        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                      2. Taylor expanded in t around 0

                        \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                      3. Step-by-step derivation
                        1. Applied rewrites56.6%

                          \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                        2. Taylor expanded in x around 0

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

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

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

                            \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                          4. lower-*.f6429.7

                            \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                        4. Applied rewrites29.7%

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

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

                            \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                          3. lift-*.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                          4. *-commutativeN/A

                            \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                          5. lift-*.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                          6. count-2-revN/A

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

                            \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                          8. lower-sqrt.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                          9. pow1/2N/A

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

                            \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot y\right)\right) \cdot 1 \]
                          11. pow-flipN/A

                            \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                          12. lift-pow.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                          13. lift-/.f64N/A

                            \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                          14. distribute-rgt-neg-inN/A

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

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

                            \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                          17. lift-pow.f64N/A

                            \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                          18. pow-flipN/A

                            \[\leadsto \left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                          19. metadata-evalN/A

                            \[\leadsto \left({\left(z + z\right)}^{\frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                          20. pow1/2N/A

                            \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                          21. lower-sqrt.f64N/A

                            \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                          22. *-rgt-identityN/A

                            \[\leadsto \left(\sqrt{z + z} \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{1}\right)\right) \cdot 1 \]
                          23. distribute-lft-neg-outN/A

                            \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right)\right) \cdot 1 \]
                          24. lower-neg.f64N/A

                            \[\leadsto \left(\sqrt{z + z} \cdot \left(-y \cdot 1\right)\right) \cdot 1 \]
                          25. *-rgt-identity29.7

                            \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                        6. Applied rewrites29.7%

                          \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(-y\right)}\right) \cdot 1 \]
                        7. Step-by-step derivation
                          1. rem-square-sqrtN/A

                            \[\leadsto \left(\sqrt{\sqrt{z + z} \cdot \sqrt{z + z}} \cdot \left(-y\right)\right) \cdot 1 \]
                          2. sqrt-unprodN/A

                            \[\leadsto \left(\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
                          3. lower-sqrt.f64N/A

                            \[\leadsto \left(\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
                          4. lower-*.f6428.5

                            \[\leadsto \left(\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
                        8. Applied rewrites28.5%

                          \[\leadsto \left(\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}} \cdot \left(-y\right)\right) \cdot 1 \]
                      4. Recombined 2 regimes into one program.
                      5. Add Preprocessing

                      Alternative 7: 56.6% accurate, 2.0× speedup?

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

                        \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                      2. Taylor expanded in t around 0

                        \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                      3. Step-by-step derivation
                        1. Applied rewrites56.6%

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
                          13. count-2-revN/A

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

                            \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
                          15. lower-*.f6456.6

                            \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{z + z} \cdot 1\right)} \]
                        3. Applied rewrites56.6%

                          \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)} \]
                        4. Add Preprocessing

                        Alternative 8: 42.8% accurate, 1.5× speedup?

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

                          1. Initial program 99.4%

                            \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                          2. Taylor expanded in t around 0

                            \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                          3. Step-by-step derivation
                            1. Applied rewrites56.6%

                              \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                            2. Taylor expanded in x around 0

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

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

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

                                \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                              4. lower-*.f6429.7

                                \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                            4. Applied rewrites29.7%

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

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

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

                                \[\leadsto \left(-1 \cdot \left(y \cdot \left(z \cdot \sqrt{\frac{2}{z}}\right)\right)\right) \cdot 1 \]
                              3. lower-/.f6429.6

                                \[\leadsto \left(-1 \cdot \left(y \cdot \left(z \cdot \sqrt{\frac{2}{z}}\right)\right)\right) \cdot 1 \]
                            7. Applied rewrites29.6%

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

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

                                \[\leadsto \left(\mathsf{neg}\left(y \cdot \left(z \cdot \sqrt{\frac{2}{z}}\right)\right)\right) \cdot 1 \]
                              3. lift-*.f64N/A

                                \[\leadsto \left(\mathsf{neg}\left(y \cdot \left(z \cdot \sqrt{\frac{2}{z}}\right)\right)\right) \cdot 1 \]
                              4. *-commutativeN/A

                                \[\leadsto \left(\mathsf{neg}\left(\left(z \cdot \sqrt{\frac{2}{z}}\right) \cdot y\right)\right) \cdot 1 \]
                              5. distribute-lft-neg-inN/A

                                \[\leadsto \left(\left(\mathsf{neg}\left(z \cdot \sqrt{\frac{2}{z}}\right)\right) \cdot \color{blue}{y}\right) \cdot 1 \]
                              6. lower-*.f64N/A

                                \[\leadsto \left(\left(\mathsf{neg}\left(z \cdot \sqrt{\frac{2}{z}}\right)\right) \cdot \color{blue}{y}\right) \cdot 1 \]
                              7. lower-neg.f6429.6

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

                                \[\leadsto \left(\left(-z \cdot \sqrt{\frac{2}{z}}\right) \cdot y\right) \cdot 1 \]
                              9. *-commutativeN/A

                                \[\leadsto \left(\left(-\sqrt{\frac{2}{z}} \cdot z\right) \cdot y\right) \cdot 1 \]
                              10. lower-*.f6429.6

                                \[\leadsto \left(\left(-\sqrt{\frac{2}{z}} \cdot z\right) \cdot y\right) \cdot 1 \]
                            9. Applied rewrites29.6%

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

                            if -1.15e-75 < y < 4.39999999999999991e44

                            1. Initial program 99.4%

                              \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                            2. Taylor expanded in t around 0

                              \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                            3. Step-by-step derivation
                              1. Applied rewrites56.6%

                                \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                              2. Taylor expanded in x around 0

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

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

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

                                  \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                4. lower-*.f6429.7

                                  \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                              4. Applied rewrites29.7%

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

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

                                  \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                3. lift-*.f64N/A

                                  \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                4. *-commutativeN/A

                                  \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                5. lift-*.f64N/A

                                  \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                6. count-2-revN/A

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

                                  \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                8. lower-sqrt.f64N/A

                                  \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                9. pow1/2N/A

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

                                  \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot y\right)\right) \cdot 1 \]
                                11. pow-flipN/A

                                  \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                12. lift-pow.f64N/A

                                  \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                13. lift-/.f64N/A

                                  \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                14. distribute-rgt-neg-inN/A

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

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

                                  \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                17. lift-pow.f64N/A

                                  \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                18. pow-flipN/A

                                  \[\leadsto \left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                19. metadata-evalN/A

                                  \[\leadsto \left({\left(z + z\right)}^{\frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                20. pow1/2N/A

                                  \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                21. lower-sqrt.f64N/A

                                  \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                22. *-rgt-identityN/A

                                  \[\leadsto \left(\sqrt{z + z} \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{1}\right)\right) \cdot 1 \]
                                23. distribute-lft-neg-outN/A

                                  \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right)\right) \cdot 1 \]
                                24. lower-neg.f64N/A

                                  \[\leadsto \left(\sqrt{z + z} \cdot \left(-y \cdot 1\right)\right) \cdot 1 \]
                                25. *-rgt-identity29.7

                                  \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                              6. Applied rewrites29.7%

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

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

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

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

                                  \[\leadsto \left(\frac{1}{2} \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                4. lower-*.f6429.5

                                  \[\leadsto \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                              9. Applied rewrites29.5%

                                \[\leadsto \color{blue}{\left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)} \cdot 1 \]

                              if 4.39999999999999991e44 < y

                              1. Initial program 99.4%

                                \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                              2. Taylor expanded in t around 0

                                \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                              3. Step-by-step derivation
                                1. Applied rewrites56.6%

                                  \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                2. Taylor expanded in x around 0

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

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

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

                                    \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                  4. lower-*.f6429.7

                                    \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                4. Applied rewrites29.7%

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

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

                                    \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                  4. *-commutativeN/A

                                    \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                  5. lift-*.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                  6. count-2-revN/A

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

                                    \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                  8. lower-sqrt.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                  9. pow1/2N/A

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

                                    \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot y\right)\right) \cdot 1 \]
                                  11. pow-flipN/A

                                    \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                  12. lift-pow.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                  13. lift-/.f64N/A

                                    \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                  14. distribute-rgt-neg-inN/A

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

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

                                    \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                  17. lift-pow.f64N/A

                                    \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                  18. pow-flipN/A

                                    \[\leadsto \left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                  19. metadata-evalN/A

                                    \[\leadsto \left({\left(z + z\right)}^{\frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                  20. pow1/2N/A

                                    \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                  21. lower-sqrt.f64N/A

                                    \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                  22. *-rgt-identityN/A

                                    \[\leadsto \left(\sqrt{z + z} \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{1}\right)\right) \cdot 1 \]
                                  23. distribute-lft-neg-outN/A

                                    \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right)\right) \cdot 1 \]
                                  24. lower-neg.f64N/A

                                    \[\leadsto \left(\sqrt{z + z} \cdot \left(-y \cdot 1\right)\right) \cdot 1 \]
                                  25. *-rgt-identity29.7

                                    \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                                6. Applied rewrites29.7%

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

                              Alternative 9: 42.8% accurate, 1.5× speedup?

                              \[\begin{array}{l} t_1 := \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1\\ \mathbf{if}\;y \leq -1.15 \cdot 10^{-75}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+44}:\\ \;\;\;\;\left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                              (FPCore (x y z t)
                               :precision binary64
                               (let* ((t_1 (* (* (sqrt (+ z z)) (- y)) 1.0)))
                                 (if (<= y -1.15e-75)
                                   t_1
                                   (if (<= y 4.4e+44) (* (* 0.5 (* x (sqrt (* 2.0 z)))) 1.0) t_1))))
                              double code(double x, double y, double z, double t) {
                              	double t_1 = (sqrt((z + z)) * -y) * 1.0;
                              	double tmp;
                              	if (y <= -1.15e-75) {
                              		tmp = t_1;
                              	} else if (y <= 4.4e+44) {
                              		tmp = (0.5 * (x * sqrt((2.0 * z)))) * 1.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 = (sqrt((z + z)) * -y) * 1.0d0
                                  if (y <= (-1.15d-75)) then
                                      tmp = t_1
                                  else if (y <= 4.4d+44) then
                                      tmp = (0.5d0 * (x * sqrt((2.0d0 * z)))) * 1.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 = (Math.sqrt((z + z)) * -y) * 1.0;
                              	double tmp;
                              	if (y <= -1.15e-75) {
                              		tmp = t_1;
                              	} else if (y <= 4.4e+44) {
                              		tmp = (0.5 * (x * Math.sqrt((2.0 * z)))) * 1.0;
                              	} else {
                              		tmp = t_1;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	t_1 = (math.sqrt((z + z)) * -y) * 1.0
                              	tmp = 0
                              	if y <= -1.15e-75:
                              		tmp = t_1
                              	elif y <= 4.4e+44:
                              		tmp = (0.5 * (x * math.sqrt((2.0 * z)))) * 1.0
                              	else:
                              		tmp = t_1
                              	return tmp
                              
                              function code(x, y, z, t)
                              	t_1 = Float64(Float64(sqrt(Float64(z + z)) * Float64(-y)) * 1.0)
                              	tmp = 0.0
                              	if (y <= -1.15e-75)
                              		tmp = t_1;
                              	elseif (y <= 4.4e+44)
                              		tmp = Float64(Float64(0.5 * Float64(x * sqrt(Float64(2.0 * z)))) * 1.0);
                              	else
                              		tmp = t_1;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	t_1 = (sqrt((z + z)) * -y) * 1.0;
                              	tmp = 0.0;
                              	if (y <= -1.15e-75)
                              		tmp = t_1;
                              	elseif (y <= 4.4e+44)
                              		tmp = (0.5 * (x * sqrt((2.0 * z)))) * 1.0;
                              	else
                              		tmp = t_1;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[y, -1.15e-75], t$95$1, If[LessEqual[y, 4.4e+44], N[(N[(0.5 * N[(x * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], t$95$1]]]
                              
                              \begin{array}{l}
                              t_1 := \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1\\
                              \mathbf{if}\;y \leq -1.15 \cdot 10^{-75}:\\
                              \;\;\;\;t\_1\\
                              
                              \mathbf{elif}\;y \leq 4.4 \cdot 10^{+44}:\\
                              \;\;\;\;\left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_1\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if y < -1.15e-75 or 4.39999999999999991e44 < y

                                1. Initial program 99.4%

                                  \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                2. Taylor expanded in t around 0

                                  \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites56.6%

                                    \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                  2. Taylor expanded in x around 0

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

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

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

                                      \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                    4. lower-*.f6429.7

                                      \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                  4. Applied rewrites29.7%

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

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

                                      \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                    3. lift-*.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                    4. *-commutativeN/A

                                      \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                    5. lift-*.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                    6. count-2-revN/A

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

                                      \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                    8. lower-sqrt.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                    9. pow1/2N/A

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

                                      \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot y\right)\right) \cdot 1 \]
                                    11. pow-flipN/A

                                      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                    12. lift-pow.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                    13. lift-/.f64N/A

                                      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                    14. distribute-rgt-neg-inN/A

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

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

                                      \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                    17. lift-pow.f64N/A

                                      \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                    18. pow-flipN/A

                                      \[\leadsto \left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                    19. metadata-evalN/A

                                      \[\leadsto \left({\left(z + z\right)}^{\frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                    20. pow1/2N/A

                                      \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                    21. lower-sqrt.f64N/A

                                      \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                    22. *-rgt-identityN/A

                                      \[\leadsto \left(\sqrt{z + z} \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{1}\right)\right) \cdot 1 \]
                                    23. distribute-lft-neg-outN/A

                                      \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right)\right) \cdot 1 \]
                                    24. lower-neg.f64N/A

                                      \[\leadsto \left(\sqrt{z + z} \cdot \left(-y \cdot 1\right)\right) \cdot 1 \]
                                    25. *-rgt-identity29.7

                                      \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                                  6. Applied rewrites29.7%

                                    \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(-y\right)}\right) \cdot 1 \]

                                  if -1.15e-75 < y < 4.39999999999999991e44

                                  1. Initial program 99.4%

                                    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                  2. Taylor expanded in t around 0

                                    \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites56.6%

                                      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                    2. Taylor expanded in x around 0

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

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

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

                                        \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      4. lower-*.f6429.7

                                        \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                    4. Applied rewrites29.7%

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

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

                                        \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      3. lift-*.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      4. *-commutativeN/A

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                      5. lift-*.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                      6. count-2-revN/A

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

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                      8. lower-sqrt.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                      9. pow1/2N/A

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

                                        \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot y\right)\right) \cdot 1 \]
                                      11. pow-flipN/A

                                        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                      12. lift-pow.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                      13. lift-/.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                      14. distribute-rgt-neg-inN/A

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

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

                                        \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      17. lift-pow.f64N/A

                                        \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                      18. pow-flipN/A

                                        \[\leadsto \left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      19. metadata-evalN/A

                                        \[\leadsto \left({\left(z + z\right)}^{\frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                      20. pow1/2N/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      21. lower-sqrt.f64N/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      22. *-rgt-identityN/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{1}\right)\right) \cdot 1 \]
                                      23. distribute-lft-neg-outN/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right)\right) \cdot 1 \]
                                      24. lower-neg.f64N/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(-y \cdot 1\right)\right) \cdot 1 \]
                                      25. *-rgt-identity29.7

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                                    6. Applied rewrites29.7%

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

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

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

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

                                        \[\leadsto \left(\frac{1}{2} \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      4. lower-*.f6429.5

                                        \[\leadsto \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                    9. Applied rewrites29.5%

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

                                  Alternative 10: 29.7% accurate, 2.7× speedup?

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

                                    \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                  2. Taylor expanded in t around 0

                                    \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites56.6%

                                      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                    2. Taylor expanded in x around 0

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

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

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

                                        \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      4. lower-*.f6429.7

                                        \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                    4. Applied rewrites29.7%

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

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

                                        \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      3. lift-*.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                      4. *-commutativeN/A

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                      5. lift-*.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                      6. count-2-revN/A

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

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                      8. lower-sqrt.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                      9. pow1/2N/A

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

                                        \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot y\right)\right) \cdot 1 \]
                                      11. pow-flipN/A

                                        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                      12. lift-pow.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                      13. lift-/.f64N/A

                                        \[\leadsto \left(\mathsf{neg}\left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot y\right)\right) \cdot 1 \]
                                      14. distribute-rgt-neg-inN/A

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

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

                                        \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      17. lift-pow.f64N/A

                                        \[\leadsto \left(\frac{1}{{\left(z + z\right)}^{\frac{-1}{2}}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                      18. pow-flipN/A

                                        \[\leadsto \left({\left(z + z\right)}^{\left(\mathsf{neg}\left(\frac{-1}{2}\right)\right)} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      19. metadata-evalN/A

                                        \[\leadsto \left({\left(z + z\right)}^{\frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot 1 \]
                                      20. pow1/2N/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      21. lower-sqrt.f64N/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \cdot 1 \]
                                      22. *-rgt-identityN/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{1}\right)\right) \cdot 1 \]
                                      23. distribute-lft-neg-outN/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(\mathsf{neg}\left(y \cdot 1\right)\right)\right) \cdot 1 \]
                                      24. lower-neg.f64N/A

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(-y \cdot 1\right)\right) \cdot 1 \]
                                      25. *-rgt-identity29.7

                                        \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                                    6. Applied rewrites29.7%

                                      \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(-y\right)}\right) \cdot 1 \]
                                    7. Add Preprocessing

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025167 
                                    (FPCore (x y z t)
                                      :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
                                      :precision binary64
                                      (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))