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

Percentage Accurate: 99.5% → 99.8%
Time: 8.1s
Alternatives: 18
Speedup: 1.1×

Specification

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

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t):
	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0)))
end
function tmp = code(x, y, z, t)
	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 18 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 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
(FPCore (x y z t)
  :precision binary64
  (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
	return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t):
	return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t)
	return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0)))
end
function tmp = code(x, y, z, t)
	tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0));
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}

Alternative 1: 99.8% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.3% accurate, 1.0× speedup?

\[\begin{array}{l} t_1 := \sqrt{z + z}\\ \mathbf{if}\;\left|t\right| \leq 1.45 \cdot 10^{-12}:\\ \;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(t\_1 \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(e^{\left(\left|t\right| \cdot \left|t\right|\right) \cdot 0.5} \cdot \left(-y\right)\right) \cdot t\_1\\ \end{array} \]
(FPCore (x y z t)
  :precision binary64
  (let* ((t_1 (sqrt (+ z z))))
  (if (<= (fabs t) 1.45e-12)
    (* (- (* x 0.5) y) (* t_1 1.0))
    (* (* (exp (* (* (fabs t) (fabs t)) 0.5)) (- y)) t_1))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((z + z));
	double tmp;
	if (fabs(t) <= 1.45e-12) {
		tmp = ((x * 0.5) - y) * (t_1 * 1.0);
	} else {
		tmp = (exp(((fabs(t) * fabs(t)) * 0.5)) * -y) * 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))
    if (abs(t) <= 1.45d-12) then
        tmp = ((x * 0.5d0) - y) * (t_1 * 1.0d0)
    else
        tmp = (exp(((abs(t) * abs(t)) * 0.5d0)) * -y) * 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));
	double tmp;
	if (Math.abs(t) <= 1.45e-12) {
		tmp = ((x * 0.5) - y) * (t_1 * 1.0);
	} else {
		tmp = (Math.exp(((Math.abs(t) * Math.abs(t)) * 0.5)) * -y) * t_1;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.sqrt((z + z))
	tmp = 0
	if math.fabs(t) <= 1.45e-12:
		tmp = ((x * 0.5) - y) * (t_1 * 1.0)
	else:
		tmp = (math.exp(((math.fabs(t) * math.fabs(t)) * 0.5)) * -y) * t_1
	return tmp
function code(x, y, z, t)
	t_1 = sqrt(Float64(z + z))
	tmp = 0.0
	if (abs(t) <= 1.45e-12)
		tmp = Float64(Float64(Float64(x * 0.5) - y) * Float64(t_1 * 1.0));
	else
		tmp = Float64(Float64(exp(Float64(Float64(abs(t) * abs(t)) * 0.5)) * Float64(-y)) * t_1);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((z + z));
	tmp = 0.0;
	if (abs(t) <= 1.45e-12)
		tmp = ((x * 0.5) - y) * (t_1 * 1.0);
	else
		tmp = (exp(((abs(t) * abs(t)) * 0.5)) * -y) * t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 1.45e-12], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[Exp[N[(N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision] * t$95$1), $MachinePrecision]]]
\begin{array}{l}
t_1 := \sqrt{z + z}\\
\mathbf{if}\;\left|t\right| \leq 1.45 \cdot 10^{-12}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \left(t\_1 \cdot 1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(e^{\left(\left|t\right| \cdot \left|t\right|\right) \cdot 0.5} \cdot \left(-y\right)\right) \cdot t\_1\\


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

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.4500000000000001e-12 < t

      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(e^{\left(t \cdot t\right) \cdot \frac{1}{2}} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot \sqrt{z + z} \]
        3. lower-neg.f6463.0%

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

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

    Alternative 5: 86.3% accurate, 1.0× speedup?

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

      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.4500000000000001e-12 < t

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 76.5% accurate, 1.0× speedup?

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

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.5000000000000001e24 < t < 5e79

          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(x \cdot \left(\frac{1}{2} \cdot \sqrt{2 \cdot z} + \left(\mathsf{neg}\left(\frac{y \cdot \sqrt{2 \cdot z}}{x}\right)\right)\right)\right) \cdot 1 \]
              5. sub-flip-reverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot \left(x \cdot 0.5 - y\right)\right)\right) \cdot 1 \]
            8. Applied rewrites45.3%

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

            if 5e79 < t

            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \sqrt{\left(1 + \color{blue}{{t}^{2}}\right) \cdot \left(z + z\right)} \cdot \left(-y\right) \]
              2. lower-pow.f6450.9%

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

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

          Alternative 7: 67.2% accurate, 1.1× speedup?

          \[\begin{array}{l} t_1 := \frac{t \cdot t}{2}\\ t_2 := \sqrt{\frac{2}{z}}\\ t_3 := x \cdot 0.5 - y\\ \mathbf{if}\;t\_1 \leq 3.1 \cdot 10^{+49}:\\ \;\;\;\;t\_3 \cdot \left(\sqrt{z + z} \cdot 1\right)\\ \mathbf{elif}\;t\_1 \leq 4.5 \cdot 10^{+157}:\\ \;\;\;\;\left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot t\_3\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(z \cdot \left(-1 \cdot \frac{y \cdot t\_2}{x} + 0.5 \cdot t\_2\right)\right)\right) \cdot 1\\ \end{array} \]
          (FPCore (x y z t)
            :precision binary64
            (let* ((t_1 (/ (* t t) 2.0))
                 (t_2 (sqrt (/ 2.0 z)))
                 (t_3 (- (* x 0.5) y)))
            (if (<= t_1 3.1e+49)
              (* t_3 (* (sqrt (+ z z)) 1.0))
              (if (<= t_1 4.5e+157)
                (* (* x (* (/ (sqrt (sqrt (* (+ z z) (+ z z)))) x) t_3)) 1.0)
                (* (* x (* z (+ (* -1.0 (/ (* y t_2) x)) (* 0.5 t_2)))) 1.0)))))
          double code(double x, double y, double z, double t) {
          	double t_1 = (t * t) / 2.0;
          	double t_2 = sqrt((2.0 / z));
          	double t_3 = (x * 0.5) - y;
          	double tmp;
          	if (t_1 <= 3.1e+49) {
          		tmp = t_3 * (sqrt((z + z)) * 1.0);
          	} else if (t_1 <= 4.5e+157) {
          		tmp = (x * ((sqrt(sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0;
          	} else {
          		tmp = (x * (z * ((-1.0 * ((y * t_2) / x)) + (0.5 * t_2)))) * 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) :: t_2
              real(8) :: t_3
              real(8) :: tmp
              t_1 = (t * t) / 2.0d0
              t_2 = sqrt((2.0d0 / z))
              t_3 = (x * 0.5d0) - y
              if (t_1 <= 3.1d+49) then
                  tmp = t_3 * (sqrt((z + z)) * 1.0d0)
              else if (t_1 <= 4.5d+157) then
                  tmp = (x * ((sqrt(sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0d0
              else
                  tmp = (x * (z * (((-1.0d0) * ((y * t_2) / x)) + (0.5d0 * t_2)))) * 1.0d0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = (t * t) / 2.0;
          	double t_2 = Math.sqrt((2.0 / z));
          	double t_3 = (x * 0.5) - y;
          	double tmp;
          	if (t_1 <= 3.1e+49) {
          		tmp = t_3 * (Math.sqrt((z + z)) * 1.0);
          	} else if (t_1 <= 4.5e+157) {
          		tmp = (x * ((Math.sqrt(Math.sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0;
          	} else {
          		tmp = (x * (z * ((-1.0 * ((y * t_2) / x)) + (0.5 * t_2)))) * 1.0;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = (t * t) / 2.0
          	t_2 = math.sqrt((2.0 / z))
          	t_3 = (x * 0.5) - y
          	tmp = 0
          	if t_1 <= 3.1e+49:
          		tmp = t_3 * (math.sqrt((z + z)) * 1.0)
          	elif t_1 <= 4.5e+157:
          		tmp = (x * ((math.sqrt(math.sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0
          	else:
          		tmp = (x * (z * ((-1.0 * ((y * t_2) / x)) + (0.5 * t_2)))) * 1.0
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = Float64(Float64(t * t) / 2.0)
          	t_2 = sqrt(Float64(2.0 / z))
          	t_3 = Float64(Float64(x * 0.5) - y)
          	tmp = 0.0
          	if (t_1 <= 3.1e+49)
          		tmp = Float64(t_3 * Float64(sqrt(Float64(z + z)) * 1.0));
          	elseif (t_1 <= 4.5e+157)
          		tmp = Float64(Float64(x * Float64(Float64(sqrt(sqrt(Float64(Float64(z + z) * Float64(z + z)))) / x) * t_3)) * 1.0);
          	else
          		tmp = Float64(Float64(x * Float64(z * Float64(Float64(-1.0 * Float64(Float64(y * t_2) / x)) + Float64(0.5 * t_2)))) * 1.0);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = (t * t) / 2.0;
          	t_2 = sqrt((2.0 / z));
          	t_3 = (x * 0.5) - y;
          	tmp = 0.0;
          	if (t_1 <= 3.1e+49)
          		tmp = t_3 * (sqrt((z + z)) * 1.0);
          	elseif (t_1 <= 4.5e+157)
          		tmp = (x * ((sqrt(sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0;
          	else
          		tmp = (x * (z * ((-1.0 * ((y * t_2) / x)) + (0.5 * t_2)))) * 1.0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 / z), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, 3.1e+49], N[(t$95$3 * N[(N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4.5e+157], N[(N[(x * N[(N[(N[Sqrt[N[Sqrt[N[(N[(z + z), $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / x), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(x * N[(z * N[(N[(-1.0 * N[(N[(y * t$95$2), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] + N[(0.5 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]]]
          
          \begin{array}{l}
          t_1 := \frac{t \cdot t}{2}\\
          t_2 := \sqrt{\frac{2}{z}}\\
          t_3 := x \cdot 0.5 - y\\
          \mathbf{if}\;t\_1 \leq 3.1 \cdot 10^{+49}:\\
          \;\;\;\;t\_3 \cdot \left(\sqrt{z + z} \cdot 1\right)\\
          
          \mathbf{elif}\;t\_1 \leq 4.5 \cdot 10^{+157}:\\
          \;\;\;\;\left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot t\_3\right)\right) \cdot 1\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(x \cdot \left(z \cdot \left(-1 \cdot \frac{y \cdot t\_2}{x} + 0.5 \cdot t\_2\right)\right)\right) \cdot 1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (/.f64 (*.f64 t t) #s(literal 2 binary64)) < 3.0999999999999999e49

            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 3.0999999999999999e49 < (/.f64 (*.f64 t t) #s(literal 2 binary64)) < 4.4999999999999998e157

              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(x \cdot \left(\frac{1}{2} \cdot \sqrt{2 \cdot z} + \left(\mathsf{neg}\left(\frac{y \cdot \sqrt{2 \cdot z}}{x}\right)\right)\right)\right) \cdot 1 \]
                  5. sub-flip-reverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot \left(x \cdot 0.5 - y\right)\right)\right) \cdot 1 \]
                8. Applied rewrites45.3%

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

                if 4.4999999999999998e157 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(x \cdot \left(z \cdot \left(-1 \cdot \frac{y \cdot \sqrt{\frac{2}{z}}}{x} + \frac{1}{2} \cdot \sqrt{\frac{2}{z}}\right)\right)\right) \cdot 1 \]
                    10. lower-/.f6457.5%

                      \[\leadsto \left(x \cdot \left(z \cdot \left(-1 \cdot \frac{y \cdot \sqrt{\frac{2}{z}}}{x} + 0.5 \cdot \sqrt{\frac{2}{z}}\right)\right)\right) \cdot 1 \]
                  7. Applied rewrites57.5%

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

                Alternative 8: 67.2% accurate, 1.4× speedup?

                \[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := \frac{t \cdot t}{2}\\ t_3 := x \cdot 0.5 - y\\ \mathbf{if}\;t\_2 \leq 3.1 \cdot 10^{+49}:\\ \;\;\;\;t\_3 \cdot \left(t\_1 \cdot 1\right)\\ \mathbf{elif}\;t\_2 \leq 4.5 \cdot 10^{+157}:\\ \;\;\;\;\left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot t\_3\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{x}{\left(t\_3 \cdot x\right) \cdot t\_1}} \cdot 1\\ \end{array} \]
                (FPCore (x y z t)
                  :precision binary64
                  (let* ((t_1 (sqrt (+ z z)))
                       (t_2 (/ (* t t) 2.0))
                       (t_3 (- (* x 0.5) y)))
                  (if (<= t_2 3.1e+49)
                    (* t_3 (* t_1 1.0))
                    (if (<= t_2 4.5e+157)
                      (* (* x (* (/ (sqrt (sqrt (* (+ z z) (+ z z)))) x) t_3)) 1.0)
                      (* (/ 1.0 (/ x (* (* t_3 x) t_1))) 1.0)))))
                double code(double x, double y, double z, double t) {
                	double t_1 = sqrt((z + z));
                	double t_2 = (t * t) / 2.0;
                	double t_3 = (x * 0.5) - y;
                	double tmp;
                	if (t_2 <= 3.1e+49) {
                		tmp = t_3 * (t_1 * 1.0);
                	} else if (t_2 <= 4.5e+157) {
                		tmp = (x * ((sqrt(sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0;
                	} else {
                		tmp = (1.0 / (x / ((t_3 * 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) :: t_2
                    real(8) :: t_3
                    real(8) :: tmp
                    t_1 = sqrt((z + z))
                    t_2 = (t * t) / 2.0d0
                    t_3 = (x * 0.5d0) - y
                    if (t_2 <= 3.1d+49) then
                        tmp = t_3 * (t_1 * 1.0d0)
                    else if (t_2 <= 4.5d+157) then
                        tmp = (x * ((sqrt(sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0d0
                    else
                        tmp = (1.0d0 / (x / ((t_3 * 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((z + z));
                	double t_2 = (t * t) / 2.0;
                	double t_3 = (x * 0.5) - y;
                	double tmp;
                	if (t_2 <= 3.1e+49) {
                		tmp = t_3 * (t_1 * 1.0);
                	} else if (t_2 <= 4.5e+157) {
                		tmp = (x * ((Math.sqrt(Math.sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0;
                	} else {
                		tmp = (1.0 / (x / ((t_3 * x) * t_1))) * 1.0;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	t_1 = math.sqrt((z + z))
                	t_2 = (t * t) / 2.0
                	t_3 = (x * 0.5) - y
                	tmp = 0
                	if t_2 <= 3.1e+49:
                		tmp = t_3 * (t_1 * 1.0)
                	elif t_2 <= 4.5e+157:
                		tmp = (x * ((math.sqrt(math.sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0
                	else:
                		tmp = (1.0 / (x / ((t_3 * x) * t_1))) * 1.0
                	return tmp
                
                function code(x, y, z, t)
                	t_1 = sqrt(Float64(z + z))
                	t_2 = Float64(Float64(t * t) / 2.0)
                	t_3 = Float64(Float64(x * 0.5) - y)
                	tmp = 0.0
                	if (t_2 <= 3.1e+49)
                		tmp = Float64(t_3 * Float64(t_1 * 1.0));
                	elseif (t_2 <= 4.5e+157)
                		tmp = Float64(Float64(x * Float64(Float64(sqrt(sqrt(Float64(Float64(z + z) * Float64(z + z)))) / x) * t_3)) * 1.0);
                	else
                		tmp = Float64(Float64(1.0 / Float64(x / Float64(Float64(t_3 * x) * t_1))) * 1.0);
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t)
                	t_1 = sqrt((z + z));
                	t_2 = (t * t) / 2.0;
                	t_3 = (x * 0.5) - y;
                	tmp = 0.0;
                	if (t_2 <= 3.1e+49)
                		tmp = t_3 * (t_1 * 1.0);
                	elseif (t_2 <= 4.5e+157)
                		tmp = (x * ((sqrt(sqrt(((z + z) * (z + z)))) / x) * t_3)) * 1.0;
                	else
                		tmp = (1.0 / (x / ((t_3 * x) * t_1))) * 1.0;
                	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[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$2, 3.1e+49], N[(t$95$3 * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4.5e+157], N[(N[(x * N[(N[(N[Sqrt[N[Sqrt[N[(N[(z + z), $MachinePrecision] * N[(z + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / x), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(1.0 / N[(x / N[(N[(t$95$3 * x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]]]
                
                \begin{array}{l}
                t_1 := \sqrt{z + z}\\
                t_2 := \frac{t \cdot t}{2}\\
                t_3 := x \cdot 0.5 - y\\
                \mathbf{if}\;t\_2 \leq 3.1 \cdot 10^{+49}:\\
                \;\;\;\;t\_3 \cdot \left(t\_1 \cdot 1\right)\\
                
                \mathbf{elif}\;t\_2 \leq 4.5 \cdot 10^{+157}:\\
                \;\;\;\;\left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot t\_3\right)\right) \cdot 1\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{1}{\frac{x}{\left(t\_3 \cdot x\right) \cdot t\_1}} \cdot 1\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (/.f64 (*.f64 t t) #s(literal 2 binary64)) < 3.0999999999999999e49

                  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.0999999999999999e49 < (/.f64 (*.f64 t t) #s(literal 2 binary64)) < 4.4999999999999998e157

                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(x \cdot \left(\frac{1}{2} \cdot \sqrt{2 \cdot z} + \left(\mathsf{neg}\left(\frac{y \cdot \sqrt{2 \cdot z}}{x}\right)\right)\right)\right) \cdot 1 \]
                        5. sub-flip-reverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(x \cdot \left(\frac{\sqrt{\sqrt{\left(z + z\right) \cdot \left(z + z\right)}}}{x} \cdot \left(x \cdot 0.5 - y\right)\right)\right) \cdot 1 \]
                      8. Applied rewrites45.3%

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

                      if 4.4999999999999998e157 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 9: 66.7% accurate, 2.7× speedup?

                      \[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := x \cdot 0.5 - y\\ \mathbf{if}\;\left|t\right| \leq 46000000:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t\_2 \cdot x\right) \cdot t\_1}{x} \cdot 1\\ \end{array} \]
                      (FPCore (x y z t)
                        :precision binary64
                        (let* ((t_1 (sqrt (+ z z))) (t_2 (- (* x 0.5) y)))
                        (if (<= (fabs t) 46000000.0)
                          (* t_2 (* t_1 1.0))
                          (* (/ (* (* t_2 x) t_1) x) 1.0))))
                      double code(double x, double y, double z, double t) {
                      	double t_1 = sqrt((z + z));
                      	double t_2 = (x * 0.5) - y;
                      	double tmp;
                      	if (fabs(t) <= 46000000.0) {
                      		tmp = t_2 * (t_1 * 1.0);
                      	} else {
                      		tmp = (((t_2 * x) * t_1) / x) * 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) :: t_2
                          real(8) :: tmp
                          t_1 = sqrt((z + z))
                          t_2 = (x * 0.5d0) - y
                          if (abs(t) <= 46000000.0d0) then
                              tmp = t_2 * (t_1 * 1.0d0)
                          else
                              tmp = (((t_2 * x) * t_1) / x) * 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((z + z));
                      	double t_2 = (x * 0.5) - y;
                      	double tmp;
                      	if (Math.abs(t) <= 46000000.0) {
                      		tmp = t_2 * (t_1 * 1.0);
                      	} else {
                      		tmp = (((t_2 * x) * t_1) / x) * 1.0;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z, t):
                      	t_1 = math.sqrt((z + z))
                      	t_2 = (x * 0.5) - y
                      	tmp = 0
                      	if math.fabs(t) <= 46000000.0:
                      		tmp = t_2 * (t_1 * 1.0)
                      	else:
                      		tmp = (((t_2 * x) * t_1) / x) * 1.0
                      	return tmp
                      
                      function code(x, y, z, t)
                      	t_1 = sqrt(Float64(z + z))
                      	t_2 = Float64(Float64(x * 0.5) - y)
                      	tmp = 0.0
                      	if (abs(t) <= 46000000.0)
                      		tmp = Float64(t_2 * Float64(t_1 * 1.0));
                      	else
                      		tmp = Float64(Float64(Float64(Float64(t_2 * x) * t_1) / x) * 1.0);
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z, t)
                      	t_1 = sqrt((z + z));
                      	t_2 = (x * 0.5) - y;
                      	tmp = 0.0;
                      	if (abs(t) <= 46000000.0)
                      		tmp = t_2 * (t_1 * 1.0);
                      	else
                      		tmp = (((t_2 * x) * t_1) / x) * 1.0;
                      	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[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 46000000.0], N[(t$95$2 * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t$95$2 * x), $MachinePrecision] * t$95$1), $MachinePrecision] / x), $MachinePrecision] * 1.0), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      t_1 := \sqrt{z + z}\\
                      t_2 := x \cdot 0.5 - y\\
                      \mathbf{if}\;\left|t\right| \leq 46000000:\\
                      \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{\left(t\_2 \cdot x\right) \cdot t\_1}{x} \cdot 1\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if t < 4.6e7

                        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 4.6e7 < t

                          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 10: 65.8% accurate, 2.2× speedup?

                          \[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := x \cdot 0.5 - y\\ \mathbf{if}\;\left|t\right| \leq 46000000:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{x}{\left(t\_2 \cdot x\right) \cdot t\_1}} \cdot 1\\ \end{array} \]
                          (FPCore (x y z t)
                            :precision binary64
                            (let* ((t_1 (sqrt (+ z z))) (t_2 (- (* x 0.5) y)))
                            (if (<= (fabs t) 46000000.0)
                              (* t_2 (* t_1 1.0))
                              (* (/ 1.0 (/ x (* (* t_2 x) t_1))) 1.0))))
                          double code(double x, double y, double z, double t) {
                          	double t_1 = sqrt((z + z));
                          	double t_2 = (x * 0.5) - y;
                          	double tmp;
                          	if (fabs(t) <= 46000000.0) {
                          		tmp = t_2 * (t_1 * 1.0);
                          	} else {
                          		tmp = (1.0 / (x / ((t_2 * 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) :: t_2
                              real(8) :: tmp
                              t_1 = sqrt((z + z))
                              t_2 = (x * 0.5d0) - y
                              if (abs(t) <= 46000000.0d0) then
                                  tmp = t_2 * (t_1 * 1.0d0)
                              else
                                  tmp = (1.0d0 / (x / ((t_2 * 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((z + z));
                          	double t_2 = (x * 0.5) - y;
                          	double tmp;
                          	if (Math.abs(t) <= 46000000.0) {
                          		tmp = t_2 * (t_1 * 1.0);
                          	} else {
                          		tmp = (1.0 / (x / ((t_2 * x) * t_1))) * 1.0;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t):
                          	t_1 = math.sqrt((z + z))
                          	t_2 = (x * 0.5) - y
                          	tmp = 0
                          	if math.fabs(t) <= 46000000.0:
                          		tmp = t_2 * (t_1 * 1.0)
                          	else:
                          		tmp = (1.0 / (x / ((t_2 * x) * t_1))) * 1.0
                          	return tmp
                          
                          function code(x, y, z, t)
                          	t_1 = sqrt(Float64(z + z))
                          	t_2 = Float64(Float64(x * 0.5) - y)
                          	tmp = 0.0
                          	if (abs(t) <= 46000000.0)
                          		tmp = Float64(t_2 * Float64(t_1 * 1.0));
                          	else
                          		tmp = Float64(Float64(1.0 / Float64(x / Float64(Float64(t_2 * x) * t_1))) * 1.0);
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z, t)
                          	t_1 = sqrt((z + z));
                          	t_2 = (x * 0.5) - y;
                          	tmp = 0.0;
                          	if (abs(t) <= 46000000.0)
                          		tmp = t_2 * (t_1 * 1.0);
                          	else
                          		tmp = (1.0 / (x / ((t_2 * x) * t_1))) * 1.0;
                          	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[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 46000000.0], N[(t$95$2 * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / N[(x / N[(N[(t$95$2 * x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          t_1 := \sqrt{z + z}\\
                          t_2 := x \cdot 0.5 - y\\
                          \mathbf{if}\;\left|t\right| \leq 46000000:\\
                          \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{1}{\frac{x}{\left(t\_2 \cdot x\right) \cdot t\_1}} \cdot 1\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < 4.6e7

                            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 4.6e7 < t

                              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 11: 64.4% accurate, 2.3× speedup?

                              \[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := x \cdot 0.5 - y\\ t_3 := \frac{t\_1}{x}\\ \mathbf{if}\;\left|t\right| \leq 8 \cdot 10^{+21}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\ \mathbf{elif}\;\left|t\right| \leq 2.7 \cdot 10^{+165}:\\ \;\;\;\;\left(x \cdot \left(t\_3 \cdot t\_2\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(t\_3 \cdot \left(t\_2 \cdot x\right)\right) \cdot 1\\ \end{array} \]
                              (FPCore (x y z t)
                                :precision binary64
                                (let* ((t_1 (sqrt (+ z z))) (t_2 (- (* x 0.5) y)) (t_3 (/ t_1 x)))
                                (if (<= (fabs t) 8e+21)
                                  (* t_2 (* t_1 1.0))
                                  (if (<= (fabs t) 2.7e+165)
                                    (* (* x (* t_3 t_2)) 1.0)
                                    (* (* t_3 (* t_2 x)) 1.0)))))
                              double code(double x, double y, double z, double t) {
                              	double t_1 = sqrt((z + z));
                              	double t_2 = (x * 0.5) - y;
                              	double t_3 = t_1 / x;
                              	double tmp;
                              	if (fabs(t) <= 8e+21) {
                              		tmp = t_2 * (t_1 * 1.0);
                              	} else if (fabs(t) <= 2.7e+165) {
                              		tmp = (x * (t_3 * t_2)) * 1.0;
                              	} else {
                              		tmp = (t_3 * (t_2 * x)) * 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) :: t_2
                                  real(8) :: t_3
                                  real(8) :: tmp
                                  t_1 = sqrt((z + z))
                                  t_2 = (x * 0.5d0) - y
                                  t_3 = t_1 / x
                                  if (abs(t) <= 8d+21) then
                                      tmp = t_2 * (t_1 * 1.0d0)
                                  else if (abs(t) <= 2.7d+165) then
                                      tmp = (x * (t_3 * t_2)) * 1.0d0
                                  else
                                      tmp = (t_3 * (t_2 * x)) * 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((z + z));
                              	double t_2 = (x * 0.5) - y;
                              	double t_3 = t_1 / x;
                              	double tmp;
                              	if (Math.abs(t) <= 8e+21) {
                              		tmp = t_2 * (t_1 * 1.0);
                              	} else if (Math.abs(t) <= 2.7e+165) {
                              		tmp = (x * (t_3 * t_2)) * 1.0;
                              	} else {
                              		tmp = (t_3 * (t_2 * x)) * 1.0;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t):
                              	t_1 = math.sqrt((z + z))
                              	t_2 = (x * 0.5) - y
                              	t_3 = t_1 / x
                              	tmp = 0
                              	if math.fabs(t) <= 8e+21:
                              		tmp = t_2 * (t_1 * 1.0)
                              	elif math.fabs(t) <= 2.7e+165:
                              		tmp = (x * (t_3 * t_2)) * 1.0
                              	else:
                              		tmp = (t_3 * (t_2 * x)) * 1.0
                              	return tmp
                              
                              function code(x, y, z, t)
                              	t_1 = sqrt(Float64(z + z))
                              	t_2 = Float64(Float64(x * 0.5) - y)
                              	t_3 = Float64(t_1 / x)
                              	tmp = 0.0
                              	if (abs(t) <= 8e+21)
                              		tmp = Float64(t_2 * Float64(t_1 * 1.0));
                              	elseif (abs(t) <= 2.7e+165)
                              		tmp = Float64(Float64(x * Float64(t_3 * t_2)) * 1.0);
                              	else
                              		tmp = Float64(Float64(t_3 * Float64(t_2 * x)) * 1.0);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t)
                              	t_1 = sqrt((z + z));
                              	t_2 = (x * 0.5) - y;
                              	t_3 = t_1 / x;
                              	tmp = 0.0;
                              	if (abs(t) <= 8e+21)
                              		tmp = t_2 * (t_1 * 1.0);
                              	elseif (abs(t) <= 2.7e+165)
                              		tmp = (x * (t_3 * t_2)) * 1.0;
                              	else
                              		tmp = (t_3 * (t_2 * x)) * 1.0;
                              	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[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / x), $MachinePrecision]}, If[LessEqual[N[Abs[t], $MachinePrecision], 8e+21], N[(t$95$2 * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 2.7e+165], N[(N[(x * N[(t$95$3 * t$95$2), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(t$95$3 * N[(t$95$2 * x), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]]]
                              
                              \begin{array}{l}
                              t_1 := \sqrt{z + z}\\
                              t_2 := x \cdot 0.5 - y\\
                              t_3 := \frac{t\_1}{x}\\
                              \mathbf{if}\;\left|t\right| \leq 8 \cdot 10^{+21}:\\
                              \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\
                              
                              \mathbf{elif}\;\left|t\right| \leq 2.7 \cdot 10^{+165}:\\
                              \;\;\;\;\left(x \cdot \left(t\_3 \cdot t\_2\right)\right) \cdot 1\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(t\_3 \cdot \left(t\_2 \cdot x\right)\right) \cdot 1\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 3 regimes
                              2. if t < 8e21

                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 8e21 < t < 2.7e165

                                  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(x \cdot \left(\frac{1}{2} \cdot \sqrt{2 \cdot z} + \left(\mathsf{neg}\left(\frac{y \cdot \sqrt{2 \cdot z}}{x}\right)\right)\right)\right) \cdot 1 \]
                                      5. sub-flip-reverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 2.7e165 < t

                                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(x \cdot \left(\frac{1}{2} \cdot \sqrt{2 \cdot z} + \left(\mathsf{neg}\left(\frac{y \cdot \sqrt{2 \cdot z}}{x}\right)\right)\right)\right) \cdot 1 \]
                                        6. sub-flip-reverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 12: 63.7% accurate, 2.1× speedup?

                                    \[\begin{array}{l} t_1 := \sqrt{z + z}\\ t_2 := x \cdot 0.5 - y\\ \mathbf{if}\;\frac{t \cdot t}{2} \leq 3.6 \cdot 10^{+48}:\\ \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \left(\frac{t\_1}{x} \cdot t\_2\right)\right) \cdot 1\\ \end{array} \]
                                    (FPCore (x y z t)
                                      :precision binary64
                                      (let* ((t_1 (sqrt (+ z z))) (t_2 (- (* x 0.5) y)))
                                      (if (<= (/ (* t t) 2.0) 3.6e+48)
                                        (* t_2 (* t_1 1.0))
                                        (* (* x (* (/ t_1 x) t_2)) 1.0))))
                                    double code(double x, double y, double z, double t) {
                                    	double t_1 = sqrt((z + z));
                                    	double t_2 = (x * 0.5) - y;
                                    	double tmp;
                                    	if (((t * t) / 2.0) <= 3.6e+48) {
                                    		tmp = t_2 * (t_1 * 1.0);
                                    	} else {
                                    		tmp = (x * ((t_1 / x) * t_2)) * 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) :: t_2
                                        real(8) :: tmp
                                        t_1 = sqrt((z + z))
                                        t_2 = (x * 0.5d0) - y
                                        if (((t * t) / 2.0d0) <= 3.6d+48) then
                                            tmp = t_2 * (t_1 * 1.0d0)
                                        else
                                            tmp = (x * ((t_1 / x) * t_2)) * 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((z + z));
                                    	double t_2 = (x * 0.5) - y;
                                    	double tmp;
                                    	if (((t * t) / 2.0) <= 3.6e+48) {
                                    		tmp = t_2 * (t_1 * 1.0);
                                    	} else {
                                    		tmp = (x * ((t_1 / x) * t_2)) * 1.0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z, t):
                                    	t_1 = math.sqrt((z + z))
                                    	t_2 = (x * 0.5) - y
                                    	tmp = 0
                                    	if ((t * t) / 2.0) <= 3.6e+48:
                                    		tmp = t_2 * (t_1 * 1.0)
                                    	else:
                                    		tmp = (x * ((t_1 / x) * t_2)) * 1.0
                                    	return tmp
                                    
                                    function code(x, y, z, t)
                                    	t_1 = sqrt(Float64(z + z))
                                    	t_2 = Float64(Float64(x * 0.5) - y)
                                    	tmp = 0.0
                                    	if (Float64(Float64(t * t) / 2.0) <= 3.6e+48)
                                    		tmp = Float64(t_2 * Float64(t_1 * 1.0));
                                    	else
                                    		tmp = Float64(Float64(x * Float64(Float64(t_1 / x) * t_2)) * 1.0);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z, t)
                                    	t_1 = sqrt((z + z));
                                    	t_2 = (x * 0.5) - y;
                                    	tmp = 0.0;
                                    	if (((t * t) / 2.0) <= 3.6e+48)
                                    		tmp = t_2 * (t_1 * 1.0);
                                    	else
                                    		tmp = (x * ((t_1 / x) * t_2)) * 1.0;
                                    	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[(x * 0.5), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision], 3.6e+48], N[(t$95$2 * N[(t$95$1 * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(t$95$1 / x), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
                                    
                                    \begin{array}{l}
                                    t_1 := \sqrt{z + z}\\
                                    t_2 := x \cdot 0.5 - y\\
                                    \mathbf{if}\;\frac{t \cdot t}{2} \leq 3.6 \cdot 10^{+48}:\\
                                    \;\;\;\;t\_2 \cdot \left(t\_1 \cdot 1\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left(x \cdot \left(\frac{t\_1}{x} \cdot t\_2\right)\right) \cdot 1\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if (/.f64 (*.f64 t t) #s(literal 2 binary64)) < 3.5999999999999998e48

                                      1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if 3.5999999999999998e48 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                                        1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(x \cdot \left(\frac{1}{2} \cdot \sqrt{2 \cdot z} + \left(\mathsf{neg}\left(\frac{y \cdot \sqrt{2 \cdot z}}{x}\right)\right)\right)\right) \cdot 1 \]
                                            5. sub-flip-reverseN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 13: 63.2% accurate, 2.2× speedup?

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

                                          1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(-y\right)}\right) \cdot 1 \]
                                              7. Taylor expanded in 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 \]
                                              8. 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.6%

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

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

                                            Alternative 14: 62.4% accurate, 2.3× speedup?

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

                                              1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 2.5000000000000001e-9 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                                                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 15: 59.9% accurate, 2.3× speedup?

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

                                                  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 3.0999999999999999e49 < (/.f64 (*.f64 t t) #s(literal 2 binary64))

                                                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          \[\leadsto \left(\left(\sqrt{z + z} \cdot 1\right) \cdot \left(-\color{blue}{y}\right)\right) \cdot 1 \]
                                                        3. *-inversesN/A

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

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

                                                          \[\leadsto \left(\frac{x \cdot \sqrt{z + z}}{x} \cdot \left(-y\right)\right) \cdot 1 \]
                                                        6. associate-*r/N/A

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

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

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

                                                          \[\leadsto \left(x \cdot \color{blue}{\left(\frac{\sqrt{z + z}}{x} \cdot \left(-y\right)\right)}\right) \cdot 1 \]
                                                        10. lower-*.f6430.5%

                                                          \[\leadsto \left(x \cdot \left(\frac{\sqrt{z + z}}{x} \cdot \color{blue}{\left(-y\right)}\right)\right) \cdot 1 \]
                                                      8. Applied rewrites30.5%

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

                                                    Alternative 16: 57.2% accurate, 4.7× speedup?

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

                                                      \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                                    2. Taylor expanded in t around 0

                                                      \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites57.2%

                                                        \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                      2. Step-by-step derivation
                                                        1. lift-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot 1} \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\left(x \cdot \frac{1}{2} - y\right) \cdot \sqrt{z \cdot 2}\right)} \cdot 1 \]
                                                        3. associate-*l*N/A

                                                          \[\leadsto \color{blue}{\left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right)} \]
                                                        4. lift-*.f64N/A

                                                          \[\leadsto \left(\color{blue}{x \cdot \frac{1}{2}} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right) \]
                                                        5. *-commutativeN/A

                                                          \[\leadsto \left(\color{blue}{\frac{1}{2} \cdot x} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right) \]
                                                        6. lift-*.f64N/A

                                                          \[\leadsto \left(\color{blue}{\frac{1}{2} \cdot x} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right) \]
                                                        7. lower-*.f64N/A

                                                          \[\leadsto \color{blue}{\left(\frac{1}{2} \cdot x - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right)} \]
                                                        8. lift-*.f64N/A

                                                          \[\leadsto \left(\color{blue}{\frac{1}{2} \cdot x} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right) \]
                                                        9. *-commutativeN/A

                                                          \[\leadsto \left(\color{blue}{x \cdot \frac{1}{2}} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right) \]
                                                        10. lift-*.f64N/A

                                                          \[\leadsto \left(\color{blue}{x \cdot \frac{1}{2}} - y\right) \cdot \left(\sqrt{z \cdot 2} \cdot 1\right) \]
                                                        11. lift-*.f64N/A

                                                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z \cdot 2}} \cdot 1\right) \]
                                                        12. *-commutativeN/A

                                                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
                                                        13. lift-*.f64N/A

                                                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
                                                        14. lower-*.f6457.2%

                                                          \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \color{blue}{\left(\sqrt{2 \cdot z} \cdot 1\right)} \]
                                                        15. lift-*.f64N/A

                                                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{2 \cdot z}} \cdot 1\right) \]
                                                        16. count-2-revN/A

                                                          \[\leadsto \left(x \cdot \frac{1}{2} - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
                                                        17. lift-+.f6457.2%

                                                          \[\leadsto \left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{\color{blue}{z + z}} \cdot 1\right) \]
                                                      3. Applied rewrites57.2%

                                                        \[\leadsto \color{blue}{\left(x \cdot 0.5 - y\right) \cdot \left(\sqrt{z + z} \cdot 1\right)} \]
                                                      4. Add Preprocessing

                                                      Alternative 17: 44.3% accurate, 3.5× speedup?

                                                      \[\begin{array}{l} t_1 := \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1\\ \mathbf{if}\;x \leq -3.5 \cdot 10^{+47}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-24}:\\ \;\;\;\;\left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                      (FPCore (x y z t)
                                                        :precision binary64
                                                        (let* ((t_1 (* (* 0.5 (* x (sqrt (* 2.0 z)))) 1.0)))
                                                        (if (<= x -3.5e+47)
                                                          t_1
                                                          (if (<= x 4.2e-24) (* (* (sqrt (+ z z)) (- y)) 1.0) t_1))))
                                                      double code(double x, double y, double z, double t) {
                                                      	double t_1 = (0.5 * (x * sqrt((2.0 * z)))) * 1.0;
                                                      	double tmp;
                                                      	if (x <= -3.5e+47) {
                                                      		tmp = t_1;
                                                      	} else if (x <= 4.2e-24) {
                                                      		tmp = (sqrt((z + z)) * -y) * 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 = (0.5d0 * (x * sqrt((2.0d0 * z)))) * 1.0d0
                                                          if (x <= (-3.5d+47)) then
                                                              tmp = t_1
                                                          else if (x <= 4.2d-24) then
                                                              tmp = (sqrt((z + z)) * -y) * 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 = (0.5 * (x * Math.sqrt((2.0 * z)))) * 1.0;
                                                      	double tmp;
                                                      	if (x <= -3.5e+47) {
                                                      		tmp = t_1;
                                                      	} else if (x <= 4.2e-24) {
                                                      		tmp = (Math.sqrt((z + z)) * -y) * 1.0;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z, t):
                                                      	t_1 = (0.5 * (x * math.sqrt((2.0 * z)))) * 1.0
                                                      	tmp = 0
                                                      	if x <= -3.5e+47:
                                                      		tmp = t_1
                                                      	elif x <= 4.2e-24:
                                                      		tmp = (math.sqrt((z + z)) * -y) * 1.0
                                                      	else:
                                                      		tmp = t_1
                                                      	return tmp
                                                      
                                                      function code(x, y, z, t)
                                                      	t_1 = Float64(Float64(0.5 * Float64(x * sqrt(Float64(2.0 * z)))) * 1.0)
                                                      	tmp = 0.0
                                                      	if (x <= -3.5e+47)
                                                      		tmp = t_1;
                                                      	elseif (x <= 4.2e-24)
                                                      		tmp = Float64(Float64(sqrt(Float64(z + z)) * Float64(-y)) * 1.0);
                                                      	else
                                                      		tmp = t_1;
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x, y, z, t)
                                                      	t_1 = (0.5 * (x * sqrt((2.0 * z)))) * 1.0;
                                                      	tmp = 0.0;
                                                      	if (x <= -3.5e+47)
                                                      		tmp = t_1;
                                                      	elseif (x <= 4.2e-24)
                                                      		tmp = (sqrt((z + z)) * -y) * 1.0;
                                                      	else
                                                      		tmp = t_1;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(0.5 * N[(x * N[Sqrt[N[(2.0 * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]}, If[LessEqual[x, -3.5e+47], t$95$1, If[LessEqual[x, 4.2e-24], N[(N[(N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision] * 1.0), $MachinePrecision], t$95$1]]]
                                                      
                                                      \begin{array}{l}
                                                      t_1 := \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1\\
                                                      \mathbf{if}\;x \leq -3.5 \cdot 10^{+47}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{elif}\;x \leq 4.2 \cdot 10^{-24}:\\
                                                      \;\;\;\;\left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if x < -3.5000000000000002e47 or 4.1999999999999999e-24 < x

                                                        1. Initial program 99.5%

                                                          \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                                        2. Taylor expanded in t around 0

                                                          \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites57.2%

                                                            \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                          2. Taylor expanded in x around 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-*.f6430.4%

                                                              \[\leadsto \left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                          4. Applied rewrites30.4%

                                                            \[\leadsto \color{blue}{\left(0.5 \cdot \left(x \cdot \sqrt{2 \cdot z}\right)\right)} \cdot 1 \]

                                                          if -3.5000000000000002e47 < x < 4.1999999999999999e-24

                                                          1. Initial program 99.5%

                                                            \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                                          2. Taylor expanded in t around 0

                                                            \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites57.2%

                                                              \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                            2. Taylor expanded in x around 0

                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right)} \cdot 1 \]
                                                            3. Step-by-step derivation
                                                              1. lower-*.f64N/A

                                                                \[\leadsto \left(-1 \cdot \color{blue}{\left(y \cdot \sqrt{2 \cdot z}\right)}\right) \cdot 1 \]
                                                              2. lower-*.f64N/A

                                                                \[\leadsto \left(-1 \cdot \left(y \cdot \color{blue}{\sqrt{2 \cdot z}}\right)\right) \cdot 1 \]
                                                              3. lower-sqrt.f64N/A

                                                                \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                              4. lower-*.f6429.7%

                                                                \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                            4. Applied rewrites29.7%

                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right)} \cdot 1 \]
                                                            5. Step-by-step derivation
                                                              1. lift-*.f64N/A

                                                                \[\leadsto \left(-1 \cdot \color{blue}{\left(y \cdot \sqrt{2 \cdot z}\right)}\right) \cdot 1 \]
                                                              2. mul-1-negN/A

                                                                \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                              3. lift-*.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                              4. *-commutativeN/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                                              5. lift-sqrt.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                                              6. pow1/2N/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(2 \cdot z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              7. lift-*.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(2 \cdot z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              8. *-commutativeN/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(z \cdot 2\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              9. *-commutativeN/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(2 \cdot z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              10. count-2-revN/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              11. lift-+.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              12. pow1/2N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                                              13. lift-sqrt.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                                              14. distribute-rgt-neg-inN/A

                                                                \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \cdot 1 \]
                                                              15. lower-*.f64N/A

                                                                \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \cdot 1 \]
                                                              16. lower-neg.f6429.7%

                                                                \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                                                            6. Applied rewrites29.7%

                                                              \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(-y\right)}\right) \cdot 1 \]
                                                          4. Recombined 2 regimes into one program.
                                                          5. Add Preprocessing

                                                          Alternative 18: 29.7% 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.0))
                                                          double code(double x, double y, double z, double t) {
                                                          	return (sqrt((z + z)) * -y) * 1.0;
                                                          }
                                                          
                                                          module fmin_fmax_functions
                                                              implicit none
                                                              private
                                                              public fmax
                                                              public fmin
                                                          
                                                              interface fmax
                                                                  module procedure fmax88
                                                                  module procedure fmax44
                                                                  module procedure fmax84
                                                                  module procedure fmax48
                                                              end interface
                                                              interface fmin
                                                                  module procedure fmin88
                                                                  module procedure fmin44
                                                                  module procedure fmin84
                                                                  module procedure fmin48
                                                              end interface
                                                          contains
                                                              real(8) function fmax88(x, y) result (res)
                                                                  real(8), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                              end function
                                                              real(4) function fmax44(x, y) result (res)
                                                                  real(4), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmax84(x, y) result(res)
                                                                  real(8), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmax48(x, y) result(res)
                                                                  real(4), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin88(x, y) result (res)
                                                                  real(8), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                              end function
                                                              real(4) function fmin44(x, y) result (res)
                                                                  real(4), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin84(x, y) result(res)
                                                                  real(8), intent (in) :: x
                                                                  real(4), intent (in) :: y
                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                              end function
                                                              real(8) function fmin48(x, y) result(res)
                                                                  real(4), intent (in) :: x
                                                                  real(8), intent (in) :: y
                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                              end function
                                                          end module
                                                          
                                                          real(8) function code(x, y, z, t)
                                                          use fmin_fmax_functions
                                                              real(8), intent (in) :: x
                                                              real(8), intent (in) :: y
                                                              real(8), intent (in) :: z
                                                              real(8), intent (in) :: t
                                                              code = (sqrt((z + z)) * -y) * 1.0d0
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t) {
                                                          	return (Math.sqrt((z + z)) * -y) * 1.0;
                                                          }
                                                          
                                                          def code(x, y, z, t):
                                                          	return (math.sqrt((z + z)) * -y) * 1.0
                                                          
                                                          function code(x, y, z, t)
                                                          	return Float64(Float64(sqrt(Float64(z + z)) * Float64(-y)) * 1.0)
                                                          end
                                                          
                                                          function tmp = code(x, y, z, t)
                                                          	tmp = (sqrt((z + z)) * -y) * 1.0;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_] := N[(N[(N[Sqrt[N[(z + z), $MachinePrecision]], $MachinePrecision] * (-y)), $MachinePrecision] * 1.0), $MachinePrecision]
                                                          
                                                          \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1
                                                          
                                                          Derivation
                                                          1. Initial program 99.5%

                                                            \[\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}} \]
                                                          2. Taylor expanded in t around 0

                                                            \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites57.2%

                                                              \[\leadsto \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot \color{blue}{1} \]
                                                            2. Taylor expanded in x around 0

                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right)} \cdot 1 \]
                                                            3. Step-by-step derivation
                                                              1. lower-*.f64N/A

                                                                \[\leadsto \left(-1 \cdot \color{blue}{\left(y \cdot \sqrt{2 \cdot z}\right)}\right) \cdot 1 \]
                                                              2. lower-*.f64N/A

                                                                \[\leadsto \left(-1 \cdot \left(y \cdot \color{blue}{\sqrt{2 \cdot z}}\right)\right) \cdot 1 \]
                                                              3. lower-sqrt.f64N/A

                                                                \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                              4. lower-*.f6429.7%

                                                                \[\leadsto \left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                            4. Applied rewrites29.7%

                                                              \[\leadsto \color{blue}{\left(-1 \cdot \left(y \cdot \sqrt{2 \cdot z}\right)\right)} \cdot 1 \]
                                                            5. Step-by-step derivation
                                                              1. lift-*.f64N/A

                                                                \[\leadsto \left(-1 \cdot \color{blue}{\left(y \cdot \sqrt{2 \cdot z}\right)}\right) \cdot 1 \]
                                                              2. mul-1-negN/A

                                                                \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                              3. lift-*.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(y \cdot \sqrt{2 \cdot z}\right)\right) \cdot 1 \]
                                                              4. *-commutativeN/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                                              5. lift-sqrt.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{2 \cdot z} \cdot y\right)\right) \cdot 1 \]
                                                              6. pow1/2N/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(2 \cdot z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              7. lift-*.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(2 \cdot z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              8. *-commutativeN/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(z \cdot 2\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              9. *-commutativeN/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(2 \cdot z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              10. count-2-revN/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              11. lift-+.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left({\left(z + z\right)}^{\frac{1}{2}} \cdot y\right)\right) \cdot 1 \]
                                                              12. pow1/2N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                                              13. lift-sqrt.f64N/A

                                                                \[\leadsto \left(\mathsf{neg}\left(\sqrt{z + z} \cdot y\right)\right) \cdot 1 \]
                                                              14. distribute-rgt-neg-inN/A

                                                                \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \cdot 1 \]
                                                              15. lower-*.f64N/A

                                                                \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \cdot 1 \]
                                                              16. lower-neg.f6429.7%

                                                                \[\leadsto \left(\sqrt{z + z} \cdot \left(-y\right)\right) \cdot 1 \]
                                                            6. Applied rewrites29.7%

                                                              \[\leadsto \left(\sqrt{z + z} \cdot \color{blue}{\left(-y\right)}\right) \cdot 1 \]
                                                            7. Add Preprocessing

                                                            Reproduce

                                                            ?
                                                            herbie shell --seed 2025258 
                                                            (FPCore (x y z t)
                                                              :name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
                                                              :precision binary64
                                                              (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))