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

Percentage Accurate: 99.5% → 99.8%
Time: 40.4s
Alternatives: 11
Speedup: 1.1×

Specification

?
\[\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
(FPCore (x y z t)
  :precision binary64
  (* (* (- (* x 1/2) y) (sqrt (* z 2))) (exp (/ (* t t) 2))))
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 * 1/2), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot \frac{1}{2} - 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 11 alternatives:

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

Initial Program: 99.5% accurate, 1.0× speedup?

\[\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
(FPCore (x y z t)
  :precision binary64
  (* (* (- (* x 1/2) y) (sqrt (* z 2))) (exp (/ (* t t) 2))))
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 * 1/2), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}

Alternative 1: 99.8% accurate, 1.1× speedup?

\[\left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)} \]
(FPCore (x y z t)
  :precision binary64
  (* (- (* 1/2 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[(1/2 * x), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[Exp[N[(t * t), $MachinePrecision]], $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}
Derivation
  1. Initial program 99.5%

    \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
  4. Add Preprocessing

Alternative 2: 96.1% accurate, 1.0× speedup?

\[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := \left|t\right| \cdot \left|t\right|\\ \mathbf{if}\;\left|t\right| \leq \frac{5188146770730811}{72057594037927936}:\\ \;\;\;\;\left(\left(\frac{1}{2} \cdot x - y\right) \cdot t\_1\right) \cdot \left(t\_2 \cdot \frac{1}{2} - -1\right)\\ \mathbf{elif}\;\left|t\right| \leq 114999999999999997377225245734177625043124954484653241178190190737365693104128:\\ \;\;\;\;\left(-1 \cdot y\right) \cdot \sqrt{e^{t\_2} \cdot \left(z + z\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(t\_1 \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{t\_2 \cdot t\_2}\right)\\ \end{array} \]
(FPCore (x y z t)
  :precision binary64
  (let* ((t_1 (sqrt (+ z z))) (t_2 (* (fabs t) (fabs t))))
  (if (<= (fabs t) 5188146770730811/72057594037927936)
    (* (* (- (* 1/2 x) y) t_1) (- (* t_2 1/2) -1))
    (if (<=
         (fabs t)
         114999999999999997377225245734177625043124954484653241178190190737365693104128)
      (* (* -1 y) (sqrt (* (exp t_2) (+ z z))))
      (* (* t_1 (- (* x 1/2) y)) (+ 1 (* 1/2 (sqrt (* t_2 t_2)))))))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((z + z));
	double t_2 = fabs(t) * fabs(t);
	double tmp;
	if (fabs(t) <= 0.072) {
		tmp = (((0.5 * x) - y) * t_1) * ((t_2 * 0.5) - -1.0);
	} else if (fabs(t) <= 1.15e+77) {
		tmp = (-1.0 * y) * sqrt((exp(t_2) * (z + z)));
	} else {
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * sqrt((t_2 * t_2))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
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) :: t_2
    real(8) :: tmp
    t_1 = sqrt((z + z))
    t_2 = abs(t) * abs(t)
    if (abs(t) <= 0.072d0) then
        tmp = (((0.5d0 * x) - y) * t_1) * ((t_2 * 0.5d0) - (-1.0d0))
    else if (abs(t) <= 1.15d+77) then
        tmp = ((-1.0d0) * y) * sqrt((exp(t_2) * (z + z)))
    else
        tmp = (t_1 * ((x * 0.5d0) - y)) * (1.0d0 + (0.5d0 * sqrt((t_2 * t_2))))
    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));
	double t_2 = Math.abs(t) * Math.abs(t);
	double tmp;
	if (Math.abs(t) <= 0.072) {
		tmp = (((0.5 * x) - y) * t_1) * ((t_2 * 0.5) - -1.0);
	} else if (Math.abs(t) <= 1.15e+77) {
		tmp = (-1.0 * y) * Math.sqrt((Math.exp(t_2) * (z + z)));
	} else {
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * Math.sqrt((t_2 * t_2))));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.sqrt((z + z))
	t_2 = math.fabs(t) * math.fabs(t)
	tmp = 0
	if math.fabs(t) <= 0.072:
		tmp = (((0.5 * x) - y) * t_1) * ((t_2 * 0.5) - -1.0)
	elif math.fabs(t) <= 1.15e+77:
		tmp = (-1.0 * y) * math.sqrt((math.exp(t_2) * (z + z)))
	else:
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * math.sqrt((t_2 * t_2))))
	return tmp
function code(x, y, z, t)
	t_1 = sqrt(Float64(z + z))
	t_2 = Float64(abs(t) * abs(t))
	tmp = 0.0
	if (abs(t) <= 0.072)
		tmp = Float64(Float64(Float64(Float64(0.5 * x) - y) * t_1) * Float64(Float64(t_2 * 0.5) - -1.0));
	elseif (abs(t) <= 1.15e+77)
		tmp = Float64(Float64(-1.0 * y) * sqrt(Float64(exp(t_2) * Float64(z + z))));
	else
		tmp = Float64(Float64(t_1 * Float64(Float64(x * 0.5) - y)) * Float64(1.0 + Float64(0.5 * sqrt(Float64(t_2 * t_2)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((z + z));
	t_2 = abs(t) * abs(t);
	tmp = 0.0;
	if (abs(t) <= 0.072)
		tmp = (((0.5 * x) - y) * t_1) * ((t_2 * 0.5) - -1.0);
	elseif (abs(t) <= 1.15e+77)
		tmp = (-1.0 * y) * sqrt((exp(t_2) * (z + z)));
	else
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * sqrt((t_2 * t_2))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 5188146770730811/72057594037927936], N[(N[(N[(N[(1/2 * x), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[(t$95$2 * 1/2), $MachinePrecision] - -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 114999999999999997377225245734177625043124954484653241178190190737365693104128], N[(N[(-1 * y), $MachinePrecision] * N[Sqrt[N[(N[Exp[t$95$2], $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 * N[(N[(x * 1/2), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * N[(1 + N[(1/2 * N[Sqrt[N[(t$95$2 * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \sqrt{z + z}\\
t_2 := \left|t\right| \cdot \left|t\right|\\
\mathbf{if}\;\left|t\right| \leq \frac{5188146770730811}{72057594037927936}:\\
\;\;\;\;\left(\left(\frac{1}{2} \cdot x - y\right) \cdot t\_1\right) \cdot \left(t\_2 \cdot \frac{1}{2} - -1\right)\\

\mathbf{elif}\;\left|t\right| \leq 114999999999999997377225245734177625043124954484653241178190190737365693104128:\\
\;\;\;\;\left(-1 \cdot y\right) \cdot \sqrt{e^{t\_2} \cdot \left(z + z\right)}\\

\mathbf{else}:\\
\;\;\;\;\left(t\_1 \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{t\_2 \cdot t\_2}\right)\\


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

    1. Initial program 99.5%

      \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
    4. Applied rewrites99.5%

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \color{blue}{{t}^{2}}\right) \]
      3. lower-pow.f6485.7%

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot {t}^{\color{blue}{2}}\right) \]
    7. Applied rewrites85.7%

      \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \color{blue}{\left(1 + \frac{1}{2} \cdot {t}^{2}\right)} \]
    8. Applied rewrites85.7%

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

    if 0.071999999999999995 < t < 1.15e77

    1. Initial program 99.5%

      \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \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.2%

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

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

    if 1.15e77 < t

    1. Initial program 99.5%

      \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
    4. Applied rewrites99.5%

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \color{blue}{{t}^{2}}\right) \]
      3. lower-pow.f6485.7%

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot {t}^{\color{blue}{2}}\right) \]
    7. Applied rewrites85.7%

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \left|t \cdot t\right|\right) \]
      4. rem-sqrt-square-revN/A

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

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

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{\left(t \cdot t\right) \cdot \left(t \cdot t\right)}\right) \]
      10. lower-*.f6490.4%

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{\left(t \cdot t\right) \cdot \left(t \cdot t\right)}\right) \]
    9. Applied rewrites90.4%

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

Alternative 3: 91.3% accurate, 1.9× speedup?

\[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := \left|t\right| \cdot \left|t\right|\\ \mathbf{if}\;\left|t\right| \leq 114000000000000000865428808608050761646285597494424303650608906106020105814016:\\ \;\;\;\;\left(\left(t\_2 \cdot \frac{1}{2} - -1\right) \cdot \left(\frac{1}{2} \cdot x - y\right)\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(t\_1 \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{t\_2 \cdot t\_2}\right)\\ \end{array} \]
(FPCore (x y z t)
  :precision binary64
  (let* ((t_1 (sqrt (+ z z))) (t_2 (* (fabs t) (fabs t))))
  (if (<=
       (fabs t)
       114000000000000000865428808608050761646285597494424303650608906106020105814016)
    (* (* (- (* t_2 1/2) -1) (- (* 1/2 x) y)) t_1)
    (* (* t_1 (- (* x 1/2) y)) (+ 1 (* 1/2 (sqrt (* t_2 t_2))))))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((z + z));
	double t_2 = fabs(t) * fabs(t);
	double tmp;
	if (fabs(t) <= 1.14e+77) {
		tmp = (((t_2 * 0.5) - -1.0) * ((0.5 * x) - y)) * t_1;
	} else {
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * sqrt((t_2 * t_2))));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
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) :: t_2
    real(8) :: tmp
    t_1 = sqrt((z + z))
    t_2 = abs(t) * abs(t)
    if (abs(t) <= 1.14d+77) then
        tmp = (((t_2 * 0.5d0) - (-1.0d0)) * ((0.5d0 * x) - y)) * t_1
    else
        tmp = (t_1 * ((x * 0.5d0) - y)) * (1.0d0 + (0.5d0 * sqrt((t_2 * t_2))))
    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));
	double t_2 = Math.abs(t) * Math.abs(t);
	double tmp;
	if (Math.abs(t) <= 1.14e+77) {
		tmp = (((t_2 * 0.5) - -1.0) * ((0.5 * x) - y)) * t_1;
	} else {
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * Math.sqrt((t_2 * t_2))));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.sqrt((z + z))
	t_2 = math.fabs(t) * math.fabs(t)
	tmp = 0
	if math.fabs(t) <= 1.14e+77:
		tmp = (((t_2 * 0.5) - -1.0) * ((0.5 * x) - y)) * t_1
	else:
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * math.sqrt((t_2 * t_2))))
	return tmp
function code(x, y, z, t)
	t_1 = sqrt(Float64(z + z))
	t_2 = Float64(abs(t) * abs(t))
	tmp = 0.0
	if (abs(t) <= 1.14e+77)
		tmp = Float64(Float64(Float64(Float64(t_2 * 0.5) - -1.0) * Float64(Float64(0.5 * x) - y)) * t_1);
	else
		tmp = Float64(Float64(t_1 * Float64(Float64(x * 0.5) - y)) * Float64(1.0 + Float64(0.5 * sqrt(Float64(t_2 * t_2)))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((z + z));
	t_2 = abs(t) * abs(t);
	tmp = 0.0;
	if (abs(t) <= 1.14e+77)
		tmp = (((t_2 * 0.5) - -1.0) * ((0.5 * x) - y)) * t_1;
	else
		tmp = (t_1 * ((x * 0.5) - y)) * (1.0 + (0.5 * sqrt((t_2 * t_2))));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 114000000000000000865428808608050761646285597494424303650608906106020105814016], N[(N[(N[(N[(t$95$2 * 1/2), $MachinePrecision] - -1), $MachinePrecision] * N[(N[(1/2 * x), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(N[(t$95$1 * N[(N[(x * 1/2), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] * N[(1 + N[(1/2 * N[Sqrt[N[(t$95$2 * t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \sqrt{z + z}\\
t_2 := \left|t\right| \cdot \left|t\right|\\
\mathbf{if}\;\left|t\right| \leq 114000000000000000865428808608050761646285597494424303650608906106020105814016:\\
\;\;\;\;\left(\left(t\_2 \cdot \frac{1}{2} - -1\right) \cdot \left(\frac{1}{2} \cdot x - y\right)\right) \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(t\_1 \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{t\_2 \cdot t\_2}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.14e77

    1. Initial program 99.5%

      \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
    4. Applied rewrites99.5%

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \color{blue}{{t}^{2}}\right) \]
      3. lower-pow.f6485.7%

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot {t}^{\color{blue}{2}}\right) \]
    7. Applied rewrites85.7%

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

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

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

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

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

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

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

    if 1.14e77 < t

    1. Initial program 99.5%

      \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
    4. Applied rewrites99.5%

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \color{blue}{{t}^{2}}\right) \]
      3. lower-pow.f6485.7%

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot {t}^{\color{blue}{2}}\right) \]
    7. Applied rewrites85.7%

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \left|t \cdot t\right|\right) \]
      4. rem-sqrt-square-revN/A

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

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

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

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

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

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{\left(t \cdot t\right) \cdot \left(t \cdot t\right)}\right) \]
      10. lower-*.f6490.4%

        \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \sqrt{\left(t \cdot t\right) \cdot \left(t \cdot t\right)}\right) \]
    9. Applied rewrites90.4%

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

Alternative 4: 87.9% accurate, 3.3× speedup?

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

    \[\left(\left(x \cdot \frac{1}{2} - 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(\frac{1}{2} \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(\frac{1}{2} \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(\frac{1}{2} \cdot x - y\right) \cdot \sqrt{e^{t \cdot t} \cdot \left(z + z\right)}} \]
  4. Applied rewrites99.5%

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

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

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

      \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot \color{blue}{{t}^{2}}\right) \]
    3. lower-pow.f6485.7%

      \[\leadsto \left(\sqrt{z + z} \cdot \left(x \cdot \frac{1}{2} - y\right)\right) \cdot \left(1 + \frac{1}{2} \cdot {t}^{\color{blue}{2}}\right) \]
  7. Applied rewrites85.7%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(\left(t \cdot t\right) \cdot \frac{1}{2} - -1\right) \cdot \left(\frac{1}{2} \cdot x - y\right)\right) \cdot \sqrt{z + z}} \]
  10. Add Preprocessing

Alternative 5: 61.7% accurate, 2.5× speedup?

\[\begin{array}{l} \mathbf{if}\;\left|t\right| \leq \frac{1770887431076117}{73786976294838206464}:\\ \;\;\;\;\left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{z + z}\right)\\ \mathbf{elif}\;\left|t\right| \leq 255000000000000002631991338672421740743079323854364804099691828430959303615898816521146967894851781029838828254694268021323551226807374148894617343277586228235347024330191602629918229981433693836541736577152926552980098253848576:\\ \;\;\;\;\left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right) \cdot 1\\ \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 (<= (fabs t) 1770887431076117/73786976294838206464)
  (* (- (* x 1/2) y) (* 1 (sqrt (+ z z))))
  (if (<=
       (fabs t)
       255000000000000002631991338672421740743079323854364804099691828430959303615898816521146967894851781029838828254694268021323551226807374148894617343277586228235347024330191602629918229981433693836541736577152926552980098253848576)
    (* (* z (* (sqrt (/ 2 z)) (- (* 1/2 x) y))) 1)
    (* (* (sqrt (sqrt (* (+ z z) (+ z z)))) (- y)) 1))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (fabs(t) <= 2.4e-5) {
		tmp = ((x * 0.5) - y) * (1.0 * sqrt((z + z)));
	} else if (fabs(t) <= 2.55e+227) {
		tmp = (z * (sqrt((2.0 / z)) * ((0.5 * x) - y))) * 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 (abs(t) <= 2.4d-5) then
        tmp = ((x * 0.5d0) - y) * (1.0d0 * sqrt((z + z)))
    else if (abs(t) <= 2.55d+227) then
        tmp = (z * (sqrt((2.0d0 / z)) * ((0.5d0 * x) - y))) * 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 (Math.abs(t) <= 2.4e-5) {
		tmp = ((x * 0.5) - y) * (1.0 * Math.sqrt((z + z)));
	} else if (Math.abs(t) <= 2.55e+227) {
		tmp = (z * (Math.sqrt((2.0 / z)) * ((0.5 * x) - y))) * 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 math.fabs(t) <= 2.4e-5:
		tmp = ((x * 0.5) - y) * (1.0 * math.sqrt((z + z)))
	elif math.fabs(t) <= 2.55e+227:
		tmp = (z * (math.sqrt((2.0 / z)) * ((0.5 * x) - y))) * 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 (abs(t) <= 2.4e-5)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * Float64(1.0 * sqrt(Float64(z + z))));
	elseif (abs(t) <= 2.55e+227)
		tmp = Float64(Float64(z * Float64(sqrt(Float64(2.0 / z)) * Float64(Float64(0.5 * x) - y))) * 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 (abs(t) <= 2.4e-5)
		tmp = ((x * 0.5) - y) * (1.0 * sqrt((z + z)));
	elseif (abs(t) <= 2.55e+227)
		tmp = (z * (sqrt((2.0 / z)) * ((0.5 * x) - y))) * 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[Abs[t], $MachinePrecision], 1770887431076117/73786976294838206464], N[(N[(N[(x * 1/2), $MachinePrecision] - y), $MachinePrecision] * N[(1 * N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 255000000000000002631991338672421740743079323854364804099691828430959303615898816521146967894851781029838828254694268021323551226807374148894617343277586228235347024330191602629918229981433693836541736577152926552980098253848576], N[(N[(z * N[(N[Sqrt[N[(2 / z), $MachinePrecision]], $MachinePrecision] * N[(N[(1/2 * x), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1), $MachinePrecision], N[(N[(N[Sqrt[N[Sqrt[N[(N[(z + z), $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision] * 1), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;\left|t\right| \leq \frac{1770887431076117}{73786976294838206464}:\\
\;\;\;\;\left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{z + z}\right)\\

\mathbf{elif}\;\left|t\right| \leq 255000000000000002631991338672421740743079323854364804099691828430959303615898816521146967894851781029838828254694268021323551226807374148894617343277586228235347024330191602629918229981433693836541736577152926552980098253848576:\\
\;\;\;\;\left(z \cdot \left(\sqrt{\frac{2}{z}} \cdot \left(\frac{1}{2} \cdot x - y\right)\right)\right) \cdot 1\\

\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 3 regimes
  2. if t < 2.4000000000000001e-5

    1. Initial program 99.5%

      \[\left(\left(x \cdot \frac{1}{2} - 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.7%

        \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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. lower-*.f64N/A

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

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

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

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

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

          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{\color{blue}{z + z}}\right) \]
        10. lift-+.f6456.7%

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

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

      if 2.4000000000000001e-5 < t < 2.55e227

      1. Initial program 99.5%

        \[\left(\left(x \cdot \frac{1}{2} - 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.7%

          \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.5%

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

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

        if 2.55e227 < t

        1. Initial program 99.5%

          \[\left(\left(x \cdot \frac{1}{2} - 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.7%

            \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.6%

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

            \[\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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\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-*.f6427.8%

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

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

        Alternative 6: 59.9% accurate, 0.9× speedup?

        \[\begin{array}{l} \mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 28999999999999998363139381331051510536143881206408543710211823249733286587361152019470147911680:\\ \;\;\;\;\left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{z + z}\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 (<=
             (exp (/ (* t t) 2))
             28999999999999998363139381331051510536143881206408543710211823249733286587361152019470147911680)
          (* (- (* x 1/2) y) (* 1 (sqrt (+ z z))))
          (* (* (sqrt (sqrt (* (+ z z) (+ z z)))) (- y)) 1)))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if (exp(((t * t) / 2.0)) <= 2.9e+94) {
        		tmp = ((x * 0.5) - y) * (1.0 * sqrt((z + z)));
        	} 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 (exp(((t * t) / 2.0d0)) <= 2.9d+94) then
                tmp = ((x * 0.5d0) - y) * (1.0d0 * sqrt((z + z)))
            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 (Math.exp(((t * t) / 2.0)) <= 2.9e+94) {
        		tmp = ((x * 0.5) - y) * (1.0 * Math.sqrt((z + z)));
        	} else {
        		tmp = (Math.sqrt(Math.sqrt(((z + z) * (z + z)))) * -y) * 1.0;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if math.exp(((t * t) / 2.0)) <= 2.9e+94:
        		tmp = ((x * 0.5) - y) * (1.0 * math.sqrt((z + z)))
        	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 (exp(Float64(Float64(t * t) / 2.0)) <= 2.9e+94)
        		tmp = Float64(Float64(Float64(x * 0.5) - y) * Float64(1.0 * sqrt(Float64(z + z))));
        	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 (exp(((t * t) / 2.0)) <= 2.9e+94)
        		tmp = ((x * 0.5) - y) * (1.0 * sqrt((z + z)));
        	else
        		tmp = (sqrt(sqrt(((z + z) * (z + z)))) * -y) * 1.0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[N[Exp[N[(N[(t * t), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision], 28999999999999998363139381331051510536143881206408543710211823249733286587361152019470147911680], N[(N[(N[(x * 1/2), $MachinePrecision] - y), $MachinePrecision] * N[(1 * N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[Sqrt[N[(N[(z + z), $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision] * 1), $MachinePrecision]]
        
        \begin{array}{l}
        \mathbf{if}\;e^{\frac{t \cdot t}{2}} \leq 28999999999999998363139381331051510536143881206408543710211823249733286587361152019470147911680:\\
        \;\;\;\;\left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{z + z}\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 (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64))) < 2.8999999999999998e94

          1. Initial program 99.5%

            \[\left(\left(x \cdot \frac{1}{2} - 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.7%

              \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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. lower-*.f64N/A

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

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

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

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

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

                \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{\color{blue}{z + z}}\right) \]
              10. lift-+.f6456.7%

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

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

            if 2.8999999999999998e94 < (exp.f64 (/.f64 (*.f64 t t) #s(literal 2 binary64)))

            1. Initial program 99.5%

              \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.6%

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

                \[\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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

                \[\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-*.f6427.8%

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

                \[\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.7% accurate, 2.6× speedup?

            \[\begin{array}{l} t_1 := \sqrt{\frac{2}{z}}\\ \mathbf{if}\;\left|t\right| \leq 17199999999999999496683520:\\ \;\;\;\;\left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{z + z}\right)\\ \mathbf{elif}\;\left|t\right| \leq 14199999999999999638195998498193324196805236950177319794238247704009338647377528415507535715657374835872707053017639867579697448519847674783154831048254589302103907213607358465998220156406064333455360:\\ \;\;\;\;\left(z \cdot \left(-1 \cdot \left(y \cdot t\_1\right)\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot \left(\frac{1}{2} \cdot \left(x \cdot t\_1\right)\right)\right) \cdot 1\\ \end{array} \]
            (FPCore (x y z t)
              :precision binary64
              (let* ((t_1 (sqrt (/ 2 z))))
              (if (<= (fabs t) 17199999999999999496683520)
                (* (- (* x 1/2) y) (* 1 (sqrt (+ z z))))
                (if (<=
                     (fabs t)
                     14199999999999999638195998498193324196805236950177319794238247704009338647377528415507535715657374835872707053017639867579697448519847674783154831048254589302103907213607358465998220156406064333455360)
                  (* (* z (* -1 (* y t_1))) 1)
                  (* (* z (* 1/2 (* x t_1))) 1)))))
            double code(double x, double y, double z, double t) {
            	double t_1 = sqrt((2.0 / z));
            	double tmp;
            	if (fabs(t) <= 1.72e+25) {
            		tmp = ((x * 0.5) - y) * (1.0 * sqrt((z + z)));
            	} else if (fabs(t) <= 1.42e+199) {
            		tmp = (z * (-1.0 * (y * t_1))) * 1.0;
            	} else {
            		tmp = (z * (0.5 * (x * t_1))) * 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) :: t_1
                real(8) :: tmp
                t_1 = sqrt((2.0d0 / z))
                if (abs(t) <= 1.72d+25) then
                    tmp = ((x * 0.5d0) - y) * (1.0d0 * sqrt((z + z)))
                else if (abs(t) <= 1.42d+199) then
                    tmp = (z * ((-1.0d0) * (y * t_1))) * 1.0d0
                else
                    tmp = (z * (0.5d0 * (x * t_1))) * 1.0d0
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double t_1 = Math.sqrt((2.0 / z));
            	double tmp;
            	if (Math.abs(t) <= 1.72e+25) {
            		tmp = ((x * 0.5) - y) * (1.0 * Math.sqrt((z + z)));
            	} else if (Math.abs(t) <= 1.42e+199) {
            		tmp = (z * (-1.0 * (y * t_1))) * 1.0;
            	} else {
            		tmp = (z * (0.5 * (x * t_1))) * 1.0;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	t_1 = math.sqrt((2.0 / z))
            	tmp = 0
            	if math.fabs(t) <= 1.72e+25:
            		tmp = ((x * 0.5) - y) * (1.0 * math.sqrt((z + z)))
            	elif math.fabs(t) <= 1.42e+199:
            		tmp = (z * (-1.0 * (y * t_1))) * 1.0
            	else:
            		tmp = (z * (0.5 * (x * t_1))) * 1.0
            	return tmp
            
            function code(x, y, z, t)
            	t_1 = sqrt(Float64(2.0 / z))
            	tmp = 0.0
            	if (abs(t) <= 1.72e+25)
            		tmp = Float64(Float64(Float64(x * 0.5) - y) * Float64(1.0 * sqrt(Float64(z + z))));
            	elseif (abs(t) <= 1.42e+199)
            		tmp = Float64(Float64(z * Float64(-1.0 * Float64(y * t_1))) * 1.0);
            	else
            		tmp = Float64(Float64(z * Float64(0.5 * Float64(x * t_1))) * 1.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	t_1 = sqrt((2.0 / z));
            	tmp = 0.0;
            	if (abs(t) <= 1.72e+25)
            		tmp = ((x * 0.5) - y) * (1.0 * sqrt((z + z)));
            	elseif (abs(t) <= 1.42e+199)
            		tmp = (z * (-1.0 * (y * t_1))) * 1.0;
            	else
            		tmp = (z * (0.5 * (x * t_1))) * 1.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(2 / z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 17199999999999999496683520], N[(N[(N[(x * 1/2), $MachinePrecision] - y), $MachinePrecision] * N[(1 * N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 14199999999999999638195998498193324196805236950177319794238247704009338647377528415507535715657374835872707053017639867579697448519847674783154831048254589302103907213607358465998220156406064333455360], N[(N[(z * N[(-1 * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1), $MachinePrecision], N[(N[(z * N[(1/2 * N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1), $MachinePrecision]]]]
            
            \begin{array}{l}
            t_1 := \sqrt{\frac{2}{z}}\\
            \mathbf{if}\;\left|t\right| \leq 17199999999999999496683520:\\
            \;\;\;\;\left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{z + z}\right)\\
            
            \mathbf{elif}\;\left|t\right| \leq 14199999999999999638195998498193324196805236950177319794238247704009338647377528415507535715657374835872707053017639867579697448519847674783154831048254589302103907213607358465998220156406064333455360:\\
            \;\;\;\;\left(z \cdot \left(-1 \cdot \left(y \cdot t\_1\right)\right)\right) \cdot 1\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(z \cdot \left(\frac{1}{2} \cdot \left(x \cdot t\_1\right)\right)\right) \cdot 1\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if t < 1.7199999999999999e25

              1. Initial program 99.5%

                \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                  \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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. lower-*.f64N/A

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

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

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

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

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

                    \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{\color{blue}{z + z}}\right) \]
                  10. lift-+.f6456.7%

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

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

                if 1.7199999999999999e25 < t < 1.42e199

                1. Initial program 99.5%

                  \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                    \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.5%

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

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

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

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

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

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

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

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

                  if 1.42e199 < t

                  1. Initial program 99.5%

                    \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                      \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.5%

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

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

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

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

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

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

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

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

                  Alternative 8: 56.6% accurate, 3.1× speedup?

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

                    1. Initial program 99.5%

                      \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                        \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.5%

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

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

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

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

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

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

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

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

                      if -1.0000000000000001e174 < y

                      1. Initial program 99.5%

                        \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                          \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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. lower-*.f64N/A

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

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

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

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

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

                            \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{\color{blue}{z + z}}\right) \]
                          10. lift-+.f6456.7%

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

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

                      Alternative 9: 56.0% accurate, 4.7× speedup?

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

                        \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                          \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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. lower-*.f64N/A

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

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

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

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

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

                            \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(1 \cdot \sqrt{\color{blue}{z + z}}\right) \]
                          10. lift-+.f6456.7%

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

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

                        Alternative 10: 42.4% accurate, 3.5× speedup?

                        \[\begin{array}{l} t_1 := \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1\\ \mathbf{if}\;y \leq \frac{-5410876812138479}{31828687130226345097944463881396533766429193651030253916189694521162207808802136034115584}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq \frac{4113761393303015}{411376139330301510538742295639337626245683966408394965837152256}:\\ \;\;\;\;\left(\frac{1}{2} \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)))
                          (if (<=
                               y
                               -5410876812138479/31828687130226345097944463881396533766429193651030253916189694521162207808802136034115584)
                            t_1
                            (if (<=
                                 y
                                 4113761393303015/411376139330301510538742295639337626245683966408394965837152256)
                              (* (* 1/2 (* x (sqrt (* 2 z)))) 1)
                              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.7e-73) {
                        		tmp = t_1;
                        	} else if (y <= 1e-47) {
                        		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.7d-73)) then
                                tmp = t_1
                            else if (y <= 1d-47) 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.7e-73) {
                        		tmp = t_1;
                        	} else if (y <= 1e-47) {
                        		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.7e-73:
                        		tmp = t_1
                        	elif y <= 1e-47:
                        		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.7e-73)
                        		tmp = t_1;
                        	elseif (y <= 1e-47)
                        		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.7e-73)
                        		tmp = t_1;
                        	elseif (y <= 1e-47)
                        		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), $MachinePrecision]}, If[LessEqual[y, -5410876812138479/31828687130226345097944463881396533766429193651030253916189694521162207808802136034115584], t$95$1, If[LessEqual[y, 4113761393303015/411376139330301510538742295639337626245683966408394965837152256], N[(N[(1/2 * N[(x * N[Sqrt[N[(2 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        t_1 := \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1\\
                        \mathbf{if}\;y \leq \frac{-5410876812138479}{31828687130226345097944463881396533766429193651030253916189694521162207808802136034115584}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;y \leq \frac{4113761393303015}{411376139330301510538742295639337626245683966408394965837152256}:\\
                        \;\;\;\;\left(\frac{1}{2} \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.7000000000000001e-73 or 9.9999999999999997e-48 < y

                          1. Initial program 99.5%

                            \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                              \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.6%

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

                              \[\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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -1.7000000000000001e-73 < y < 9.9999999999999997e-48

                            1. Initial program 99.5%

                              \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                                \[\leadsto \left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                              2. 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 \]
                              3. 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.9%

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

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

                            Alternative 11: 29.6% accurate, 5.8× speedup?

                            \[\left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                            (FPCore (x y z t)
                              :precision binary64
                              (* (* (sqrt (+ z z)) (- y)) 1))
                            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), $MachinePrecision]
                            
                            \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1
                            
                            Derivation
                            1. Initial program 99.5%

                              \[\left(\left(x \cdot \frac{1}{2} - 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.7%

                                \[\leadsto \left(\left(x \cdot \frac{1}{2} - 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.6%

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

                                \[\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. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Reproduce

                              ?
                              herbie shell --seed 2025271 -o generate:evaluate
                              (FPCore (x y z t)
                                :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
                                :precision binary64
                                (* (* (- (* x 1/2) y) (sqrt (* z 2))) (exp (/ (* t t) 2))))