Main:z from

Percentage Accurate: 91.6% → 97.3%
Time: 17.2s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 97.3% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := \sqrt{\mathsf{max}\left(y, z\right)}\\ t_2 := \mathsf{min}\left(\mathsf{min}\left(y, z\right), \mathsf{max}\left(x, t\right)\right)\\ t_3 := t\_2 - -1\\ t_4 := \sqrt{t\_2}\\ t_5 := \sqrt{t\_3} + t\_4\\ t_6 := \mathsf{max}\left(\mathsf{min}\left(y, z\right), \mathsf{max}\left(x, t\right)\right)\\ t_7 := \sqrt{t\_6 + 1} - \sqrt{t\_6}\\ \mathbf{if}\;\mathsf{min}\left(x, t\right) \leq 2.5:\\ \;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\mathsf{max}\left(y, z\right) - -1} - t\_1, t\_5, \mathsf{fma}\left(t\_5, \sqrt{\mathsf{min}\left(x, t\right) - -1} - \sqrt{\mathsf{min}\left(x, t\right)}, t\_3 - t\_2\right)\right)}{t\_5} + t\_7\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sqrt{1 + \mathsf{max}\left(y, z\right)} - t\_1\right) + \mathsf{fma}\left(0.5, \frac{1}{\mathsf{min}\left(x, t\right) \cdot \sqrt{\frac{1}{\mathsf{min}\left(x, t\right)}}}, \frac{1}{t\_4 + \sqrt{1 + t\_2}}\right)\right) + t\_7\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (sqrt (fmax y z)))
        (t_2 (fmin (fmin y z) (fmax x t)))
        (t_3 (- t_2 -1.0))
        (t_4 (sqrt t_2))
        (t_5 (+ (sqrt t_3) t_4))
        (t_6 (fmax (fmin y z) (fmax x t)))
        (t_7 (- (sqrt (+ t_6 1.0)) (sqrt t_6))))
   (if (<= (fmin x t) 2.5)
     (+
      (/
       (fma
        (- (sqrt (- (fmax y z) -1.0)) t_1)
        t_5
        (fma t_5 (- (sqrt (- (fmin x t) -1.0)) (sqrt (fmin x t))) (- t_3 t_2)))
       t_5)
      t_7)
     (+
      (+
       (- (sqrt (+ 1.0 (fmax y z))) t_1)
       (fma
        0.5
        (/ 1.0 (* (fmin x t) (sqrt (/ 1.0 (fmin x t)))))
        (/ 1.0 (+ t_4 (sqrt (+ 1.0 t_2))))))
      t_7))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt(fmax(y, z));
	double t_2 = fmin(fmin(y, z), fmax(x, t));
	double t_3 = t_2 - -1.0;
	double t_4 = sqrt(t_2);
	double t_5 = sqrt(t_3) + t_4;
	double t_6 = fmax(fmin(y, z), fmax(x, t));
	double t_7 = sqrt((t_6 + 1.0)) - sqrt(t_6);
	double tmp;
	if (fmin(x, t) <= 2.5) {
		tmp = (fma((sqrt((fmax(y, z) - -1.0)) - t_1), t_5, fma(t_5, (sqrt((fmin(x, t) - -1.0)) - sqrt(fmin(x, t))), (t_3 - t_2))) / t_5) + t_7;
	} else {
		tmp = ((sqrt((1.0 + fmax(y, z))) - t_1) + fma(0.5, (1.0 / (fmin(x, t) * sqrt((1.0 / fmin(x, t))))), (1.0 / (t_4 + sqrt((1.0 + t_2)))))) + t_7;
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = sqrt(fmax(y, z))
	t_2 = fmin(fmin(y, z), fmax(x, t))
	t_3 = Float64(t_2 - -1.0)
	t_4 = sqrt(t_2)
	t_5 = Float64(sqrt(t_3) + t_4)
	t_6 = fmax(fmin(y, z), fmax(x, t))
	t_7 = Float64(sqrt(Float64(t_6 + 1.0)) - sqrt(t_6))
	tmp = 0.0
	if (fmin(x, t) <= 2.5)
		tmp = Float64(Float64(fma(Float64(sqrt(Float64(fmax(y, z) - -1.0)) - t_1), t_5, fma(t_5, Float64(sqrt(Float64(fmin(x, t) - -1.0)) - sqrt(fmin(x, t))), Float64(t_3 - t_2))) / t_5) + t_7);
	else
		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + fmax(y, z))) - t_1) + fma(0.5, Float64(1.0 / Float64(fmin(x, t) * sqrt(Float64(1.0 / fmin(x, t))))), Float64(1.0 / Float64(t_4 + sqrt(Float64(1.0 + t_2)))))) + t_7);
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[Max[y, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Min[y, z], $MachinePrecision], N[Max[x, t], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - -1.0), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[t$95$3], $MachinePrecision] + t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[Max[N[Min[y, z], $MachinePrecision], N[Max[x, t], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[(N[Sqrt[N[(t$95$6 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$6], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Min[x, t], $MachinePrecision], 2.5], N[(N[(N[(N[(N[Sqrt[N[(N[Max[y, z], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision] - t$95$1), $MachinePrecision] * t$95$5 + N[(t$95$5 * N[(N[Sqrt[N[(N[Min[x, t], $MachinePrecision] - -1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[N[Min[x, t], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(t$95$3 - t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$5), $MachinePrecision] + t$95$7), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(1.0 + N[Max[y, z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t$95$1), $MachinePrecision] + N[(0.5 * N[(1.0 / N[(N[Min[x, t], $MachinePrecision] * N[Sqrt[N[(1.0 / N[Min[x, t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$4 + N[Sqrt[N[(1.0 + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$7), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_1 := \sqrt{\mathsf{max}\left(y, z\right)}\\
t_2 := \mathsf{min}\left(\mathsf{min}\left(y, z\right), \mathsf{max}\left(x, t\right)\right)\\
t_3 := t\_2 - -1\\
t_4 := \sqrt{t\_2}\\
t_5 := \sqrt{t\_3} + t\_4\\
t_6 := \mathsf{max}\left(\mathsf{min}\left(y, z\right), \mathsf{max}\left(x, t\right)\right)\\
t_7 := \sqrt{t\_6 + 1} - \sqrt{t\_6}\\
\mathbf{if}\;\mathsf{min}\left(x, t\right) \leq 2.5:\\
\;\;\;\;\frac{\mathsf{fma}\left(\sqrt{\mathsf{max}\left(y, z\right) - -1} - t\_1, t\_5, \mathsf{fma}\left(t\_5, \sqrt{\mathsf{min}\left(x, t\right) - -1} - \sqrt{\mathsf{min}\left(x, t\right)}, t\_3 - t\_2\right)\right)}{t\_5} + t\_7\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{1 + \mathsf{max}\left(y, z\right)} - t\_1\right) + \mathsf{fma}\left(0.5, \frac{1}{\mathsf{min}\left(x, t\right) \cdot \sqrt{\frac{1}{\mathsf{min}\left(x, t\right)}}}, \frac{1}{t\_4 + \sqrt{1 + t\_2}}\right)\right) + t\_7\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.5

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\sqrt{y + 1} \cdot \color{blue}{\sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      9. rem-square-sqrtN/A

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      13. metadata-evalN/A

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      15. lower-unsound-+.f6472.7%

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      19. metadata-eval72.7%

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - -1} + \sqrt{y}}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      5. add-to-fractionN/A

        \[\leadsto \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \color{blue}{\frac{\left(\sqrt{x + 1} - \sqrt{x}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}\right)}{\sqrt{y - -1} + \sqrt{y}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      6. add-to-fractionN/A

        \[\leadsto \color{blue}{\frac{\left(\sqrt{z + 1} - \sqrt{z}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(\sqrt{x + 1} - \sqrt{x}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}\right)\right)}{\sqrt{y - -1} + \sqrt{y}}} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    5. Applied rewrites92.0%

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

    if 2.5 < x

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\sqrt{y + 1} \cdot \color{blue}{\sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      9. rem-square-sqrtN/A

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      13. metadata-evalN/A

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      15. lower-unsound-+.f6472.7%

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      19. metadata-eval72.7%

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - -1} + \sqrt{y}}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      5. add-to-fractionN/A

        \[\leadsto \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \color{blue}{\frac{\left(\sqrt{x + 1} - \sqrt{x}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}\right)}{\sqrt{y - -1} + \sqrt{y}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      6. add-to-fractionN/A

        \[\leadsto \color{blue}{\frac{\left(\sqrt{z + 1} - \sqrt{z}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(\sqrt{x + 1} - \sqrt{x}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}\right)\right)}{\sqrt{y - -1} + \sqrt{y}}} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    5. Applied rewrites92.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{z - -1} - \sqrt{z}, \sqrt{y - -1} + \sqrt{y}, \mathsf{fma}\left(\sqrt{y - -1} + \sqrt{y}, \sqrt{x - -1} - \sqrt{x}, \left(y - -1\right) - y\right)\right)}{\sqrt{y - -1} + \sqrt{y}}} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    6. Taylor expanded in x around inf

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{1}{x \cdot \sqrt{\frac{1}{x}}}}, \frac{1}{\sqrt{y} + \sqrt{1 + y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    8. Applied rewrites49.0%

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

Alternative 2: 97.1% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(y, z\right), t\right)\\ t_2 := \sqrt{t\_1}\\ t_3 := \mathsf{min}\left(\mathsf{min}\left(y, z\right), t\right)\\ t_4 := \sqrt{\mathsf{max}\left(y, z\right)}\\ t_5 := \sqrt{t\_1 + 1} - t\_2\\ t_6 := \sqrt{t\_3}\\ t_7 := \left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{t\_3 + 1} - t\_6\right)\right) + \left(\sqrt{\mathsf{max}\left(y, z\right) + 1} - t\_4\right)\\ \mathbf{if}\;t\_7 + t\_5 \leq 5 \cdot 10^{-6}:\\ \;\;\;\;\left(\left(\sqrt{1 + \mathsf{max}\left(y, z\right)} - t\_4\right) + \mathsf{fma}\left(0.5, \frac{1}{x \cdot \sqrt{\frac{1}{x}}}, \frac{1}{t\_6 + \sqrt{1 + t\_3}}\right)\right) + t\_5\\ \mathbf{else}:\\ \;\;\;\;t\_7 + \frac{1 + \left(t\_1 - t\_1\right)}{\sqrt{t\_1 - -1} + t\_2}\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (fmax (fmin y z) t))
        (t_2 (sqrt t_1))
        (t_3 (fmin (fmin y z) t))
        (t_4 (sqrt (fmax y z)))
        (t_5 (- (sqrt (+ t_1 1.0)) t_2))
        (t_6 (sqrt t_3))
        (t_7
         (+
          (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ t_3 1.0)) t_6))
          (- (sqrt (+ (fmax y z) 1.0)) t_4))))
   (if (<= (+ t_7 t_5) 5e-6)
     (+
      (+
       (- (sqrt (+ 1.0 (fmax y z))) t_4)
       (fma
        0.5
        (/ 1.0 (* x (sqrt (/ 1.0 x))))
        (/ 1.0 (+ t_6 (sqrt (+ 1.0 t_3))))))
      t_5)
     (+ t_7 (/ (+ 1.0 (- t_1 t_1)) (+ (sqrt (- t_1 -1.0)) t_2))))))
double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(y, z), t);
	double t_2 = sqrt(t_1);
	double t_3 = fmin(fmin(y, z), t);
	double t_4 = sqrt(fmax(y, z));
	double t_5 = sqrt((t_1 + 1.0)) - t_2;
	double t_6 = sqrt(t_3);
	double t_7 = ((sqrt((x + 1.0)) - sqrt(x)) + (sqrt((t_3 + 1.0)) - t_6)) + (sqrt((fmax(y, z) + 1.0)) - t_4);
	double tmp;
	if ((t_7 + t_5) <= 5e-6) {
		tmp = ((sqrt((1.0 + fmax(y, z))) - t_4) + fma(0.5, (1.0 / (x * sqrt((1.0 / x)))), (1.0 / (t_6 + sqrt((1.0 + t_3)))))) + t_5;
	} else {
		tmp = t_7 + ((1.0 + (t_1 - t_1)) / (sqrt((t_1 - -1.0)) + t_2));
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = fmax(fmin(y, z), t)
	t_2 = sqrt(t_1)
	t_3 = fmin(fmin(y, z), t)
	t_4 = sqrt(fmax(y, z))
	t_5 = Float64(sqrt(Float64(t_1 + 1.0)) - t_2)
	t_6 = sqrt(t_3)
	t_7 = Float64(Float64(Float64(sqrt(Float64(x + 1.0)) - sqrt(x)) + Float64(sqrt(Float64(t_3 + 1.0)) - t_6)) + Float64(sqrt(Float64(fmax(y, z) + 1.0)) - t_4))
	tmp = 0.0
	if (Float64(t_7 + t_5) <= 5e-6)
		tmp = Float64(Float64(Float64(sqrt(Float64(1.0 + fmax(y, z))) - t_4) + fma(0.5, Float64(1.0 / Float64(x * sqrt(Float64(1.0 / x)))), Float64(1.0 / Float64(t_6 + sqrt(Float64(1.0 + t_3)))))) + t_5);
	else
		tmp = Float64(t_7 + Float64(Float64(1.0 + Float64(t_1 - t_1)) / Float64(sqrt(Float64(t_1 - -1.0)) + t_2)));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[y, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Min[y, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[Max[y, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[N[(t$95$1 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$3], $MachinePrecision]}, Block[{t$95$7 = N[(N[(N[(N[Sqrt[N[(x + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$3 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(N[Max[y, z], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$7 + t$95$5), $MachinePrecision], 5e-6], N[(N[(N[(N[Sqrt[N[(1.0 + N[Max[y, z], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t$95$4), $MachinePrecision] + N[(0.5 * N[(1.0 / N[(x * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(t$95$6 + N[Sqrt[N[(1.0 + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision], N[(t$95$7 + N[(N[(1.0 + N[(t$95$1 - t$95$1), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(t$95$1 - -1.0), $MachinePrecision]], $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_1 := \mathsf{max}\left(\mathsf{min}\left(y, z\right), t\right)\\
t_2 := \sqrt{t\_1}\\
t_3 := \mathsf{min}\left(\mathsf{min}\left(y, z\right), t\right)\\
t_4 := \sqrt{\mathsf{max}\left(y, z\right)}\\
t_5 := \sqrt{t\_1 + 1} - t\_2\\
t_6 := \sqrt{t\_3}\\
t_7 := \left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{t\_3 + 1} - t\_6\right)\right) + \left(\sqrt{\mathsf{max}\left(y, z\right) + 1} - t\_4\right)\\
\mathbf{if}\;t\_7 + t\_5 \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(\left(\sqrt{1 + \mathsf{max}\left(y, z\right)} - t\_4\right) + \mathsf{fma}\left(0.5, \frac{1}{x \cdot \sqrt{\frac{1}{x}}}, \frac{1}{t\_6 + \sqrt{1 + t\_3}}\right)\right) + t\_5\\

\mathbf{else}:\\
\;\;\;\;t\_7 + \frac{1 + \left(t\_1 - t\_1\right)}{\sqrt{t\_1 - -1} + t\_2}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 5.0000000000000004e-6

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\sqrt{y + 1} \cdot \color{blue}{\sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      9. rem-square-sqrtN/A

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      13. metadata-evalN/A

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      15. lower-unsound-+.f6472.7%

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      19. metadata-eval72.7%

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - -1} + \sqrt{y}}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      5. add-to-fractionN/A

        \[\leadsto \left(\left(\sqrt{z + 1} - \sqrt{z}\right) + \color{blue}{\frac{\left(\sqrt{x + 1} - \sqrt{x}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}\right)}{\sqrt{y - -1} + \sqrt{y}}}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      6. add-to-fractionN/A

        \[\leadsto \color{blue}{\frac{\left(\sqrt{z + 1} - \sqrt{z}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(\sqrt{x + 1} - \sqrt{x}\right) \cdot \left(\sqrt{y - -1} + \sqrt{y}\right) + \left(\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}\right)\right)}{\sqrt{y - -1} + \sqrt{y}}} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    5. Applied rewrites92.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\sqrt{z - -1} - \sqrt{z}, \sqrt{y - -1} + \sqrt{y}, \mathsf{fma}\left(\sqrt{y - -1} + \sqrt{y}, \sqrt{x - -1} - \sqrt{x}, \left(y - -1\right) - y\right)\right)}{\sqrt{y - -1} + \sqrt{y}}} + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    6. Taylor expanded in x around inf

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + z} - \sqrt{z}\right) + \mathsf{fma}\left(\frac{1}{2}, \color{blue}{\frac{1}{x \cdot \sqrt{\frac{1}{x}}}}, \frac{1}{\sqrt{y} + \sqrt{1 + y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    8. Applied rewrites49.0%

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

    if 5.0000000000000004e-6 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

    1. Initial program 91.6%

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \color{blue}{\left(\left(\mathsf{neg}\left(\sqrt{t}\right)\right) + \sqrt{t + 1}\right)} \]
      4. sum-to-multN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(1 + \frac{\sqrt{t - -1}}{\color{blue}{-\sqrt{t}}}\right) \cdot \left(\mathsf{neg}\left(\sqrt{t}\right)\right) \]
      13. lower-neg.f6491.6%

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(1 + \color{blue}{\frac{\sqrt{t - -1}}{-\sqrt{t}}}\right) \cdot \left(-\sqrt{t}\right) \]
      4. sum-to-mult-revN/A

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \color{blue}{\left(\sqrt{t + 1} - \sqrt{t}\right)} \]
      12. flip--N/A

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \frac{\sqrt{t - -1} \cdot \color{blue}{\sqrt{t - -1}} - \sqrt{t} \cdot \sqrt{t}}{\sqrt{t - -1} + \sqrt{t}} \]
      5. rem-square-sqrtN/A

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \frac{\left(1 + t\right) - \sqrt{t} \cdot \color{blue}{\sqrt{t}}}{\sqrt{t - -1} + \sqrt{t}} \]
      13. rem-square-sqrtN/A

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \frac{\color{blue}{1 + \left(t - t\right)}}{\sqrt{t - -1} + \sqrt{t}} \]
      16. lower--.f6493.6%

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

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

Alternative 3: 96.9% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := \sqrt{\mathsf{max}\left(x, y\right) + 1} - \sqrt{\mathsf{max}\left(x, y\right)}\\ t_2 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_3 := \mathsf{max}\left(t\_2, t\right)\\ t_4 := \sqrt{t\_3}\\ t_5 := \mathsf{min}\left(t\_2, t\right)\\ t_6 := \sqrt{t\_3 + 1} - t\_4\\ t_7 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_8 := \sqrt{t\_7 + 1} - \sqrt{t\_7}\\ t_9 := \left(\left(\sqrt{t\_5 + 1} - \sqrt{t\_5}\right) + t\_1\right) + t\_8\\ \mathbf{if}\;t\_9 + t\_6 \leq 5 \cdot 10^{-6}:\\ \;\;\;\;\left(\left(\frac{0.5}{t\_5 \cdot \sqrt{\frac{1}{t\_5}}} + t\_1\right) + t\_8\right) + t\_6\\ \mathbf{else}:\\ \;\;\;\;t\_9 + \frac{1 + \left(t\_3 - t\_3\right)}{\sqrt{t\_3 - -1} + t\_4}\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (- (sqrt (+ (fmax x y) 1.0)) (sqrt (fmax x y))))
        (t_2 (fmin (fmin x y) z))
        (t_3 (fmax t_2 t))
        (t_4 (sqrt t_3))
        (t_5 (fmin t_2 t))
        (t_6 (- (sqrt (+ t_3 1.0)) t_4))
        (t_7 (fmax (fmin x y) z))
        (t_8 (- (sqrt (+ t_7 1.0)) (sqrt t_7)))
        (t_9 (+ (+ (- (sqrt (+ t_5 1.0)) (sqrt t_5)) t_1) t_8)))
   (if (<= (+ t_9 t_6) 5e-6)
     (+ (+ (+ (/ 0.5 (* t_5 (sqrt (/ 1.0 t_5)))) t_1) t_8) t_6)
     (+ t_9 (/ (+ 1.0 (- t_3 t_3)) (+ (sqrt (- t_3 -1.0)) t_4))))))
double code(double x, double y, double z, double t) {
	double t_1 = sqrt((fmax(x, y) + 1.0)) - sqrt(fmax(x, y));
	double t_2 = fmin(fmin(x, y), z);
	double t_3 = fmax(t_2, t);
	double t_4 = sqrt(t_3);
	double t_5 = fmin(t_2, t);
	double t_6 = sqrt((t_3 + 1.0)) - t_4;
	double t_7 = fmax(fmin(x, y), z);
	double t_8 = sqrt((t_7 + 1.0)) - sqrt(t_7);
	double t_9 = ((sqrt((t_5 + 1.0)) - sqrt(t_5)) + t_1) + t_8;
	double tmp;
	if ((t_9 + t_6) <= 5e-6) {
		tmp = (((0.5 / (t_5 * sqrt((1.0 / t_5)))) + t_1) + t_8) + t_6;
	} else {
		tmp = t_9 + ((1.0 + (t_3 - t_3)) / (sqrt((t_3 - -1.0)) + t_4));
	}
	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) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_1 = sqrt((fmax(x, y) + 1.0d0)) - sqrt(fmax(x, y))
    t_2 = fmin(fmin(x, y), z)
    t_3 = fmax(t_2, t)
    t_4 = sqrt(t_3)
    t_5 = fmin(t_2, t)
    t_6 = sqrt((t_3 + 1.0d0)) - t_4
    t_7 = fmax(fmin(x, y), z)
    t_8 = sqrt((t_7 + 1.0d0)) - sqrt(t_7)
    t_9 = ((sqrt((t_5 + 1.0d0)) - sqrt(t_5)) + t_1) + t_8
    if ((t_9 + t_6) <= 5d-6) then
        tmp = (((0.5d0 / (t_5 * sqrt((1.0d0 / t_5)))) + t_1) + t_8) + t_6
    else
        tmp = t_9 + ((1.0d0 + (t_3 - t_3)) / (sqrt((t_3 - (-1.0d0))) + t_4))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = Math.sqrt((fmax(x, y) + 1.0)) - Math.sqrt(fmax(x, y));
	double t_2 = fmin(fmin(x, y), z);
	double t_3 = fmax(t_2, t);
	double t_4 = Math.sqrt(t_3);
	double t_5 = fmin(t_2, t);
	double t_6 = Math.sqrt((t_3 + 1.0)) - t_4;
	double t_7 = fmax(fmin(x, y), z);
	double t_8 = Math.sqrt((t_7 + 1.0)) - Math.sqrt(t_7);
	double t_9 = ((Math.sqrt((t_5 + 1.0)) - Math.sqrt(t_5)) + t_1) + t_8;
	double tmp;
	if ((t_9 + t_6) <= 5e-6) {
		tmp = (((0.5 / (t_5 * Math.sqrt((1.0 / t_5)))) + t_1) + t_8) + t_6;
	} else {
		tmp = t_9 + ((1.0 + (t_3 - t_3)) / (Math.sqrt((t_3 - -1.0)) + t_4));
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = math.sqrt((fmax(x, y) + 1.0)) - math.sqrt(fmax(x, y))
	t_2 = fmin(fmin(x, y), z)
	t_3 = fmax(t_2, t)
	t_4 = math.sqrt(t_3)
	t_5 = fmin(t_2, t)
	t_6 = math.sqrt((t_3 + 1.0)) - t_4
	t_7 = fmax(fmin(x, y), z)
	t_8 = math.sqrt((t_7 + 1.0)) - math.sqrt(t_7)
	t_9 = ((math.sqrt((t_5 + 1.0)) - math.sqrt(t_5)) + t_1) + t_8
	tmp = 0
	if (t_9 + t_6) <= 5e-6:
		tmp = (((0.5 / (t_5 * math.sqrt((1.0 / t_5)))) + t_1) + t_8) + t_6
	else:
		tmp = t_9 + ((1.0 + (t_3 - t_3)) / (math.sqrt((t_3 - -1.0)) + t_4))
	return tmp
function code(x, y, z, t)
	t_1 = Float64(sqrt(Float64(fmax(x, y) + 1.0)) - sqrt(fmax(x, y)))
	t_2 = fmin(fmin(x, y), z)
	t_3 = fmax(t_2, t)
	t_4 = sqrt(t_3)
	t_5 = fmin(t_2, t)
	t_6 = Float64(sqrt(Float64(t_3 + 1.0)) - t_4)
	t_7 = fmax(fmin(x, y), z)
	t_8 = Float64(sqrt(Float64(t_7 + 1.0)) - sqrt(t_7))
	t_9 = Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - sqrt(t_5)) + t_1) + t_8)
	tmp = 0.0
	if (Float64(t_9 + t_6) <= 5e-6)
		tmp = Float64(Float64(Float64(Float64(0.5 / Float64(t_5 * sqrt(Float64(1.0 / t_5)))) + t_1) + t_8) + t_6);
	else
		tmp = Float64(t_9 + Float64(Float64(1.0 + Float64(t_3 - t_3)) / Float64(sqrt(Float64(t_3 - -1.0)) + t_4)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = sqrt((max(x, y) + 1.0)) - sqrt(max(x, y));
	t_2 = min(min(x, y), z);
	t_3 = max(t_2, t);
	t_4 = sqrt(t_3);
	t_5 = min(t_2, t);
	t_6 = sqrt((t_3 + 1.0)) - t_4;
	t_7 = max(min(x, y), z);
	t_8 = sqrt((t_7 + 1.0)) - sqrt(t_7);
	t_9 = ((sqrt((t_5 + 1.0)) - sqrt(t_5)) + t_1) + t_8;
	tmp = 0.0;
	if ((t_9 + t_6) <= 5e-6)
		tmp = (((0.5 / (t_5 * sqrt((1.0 / t_5)))) + t_1) + t_8) + t_6;
	else
		tmp = t_9 + ((1.0 + (t_3 - t_3)) / (sqrt((t_3 - -1.0)) + t_4));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Sqrt[N[(N[Max[x, y], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[N[Max[x, y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$3 = N[Max[t$95$2, t], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$2, t], $MachinePrecision]}, Block[{t$95$6 = N[(N[Sqrt[N[(t$95$3 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$4), $MachinePrecision]}, Block[{t$95$7 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$8 = N[(N[Sqrt[N[(t$95$7 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$7], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$5], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$8), $MachinePrecision]}, If[LessEqual[N[(t$95$9 + t$95$6), $MachinePrecision], 5e-6], N[(N[(N[(N[(0.5 / N[(t$95$5 * N[Sqrt[N[(1.0 / t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$8), $MachinePrecision] + t$95$6), $MachinePrecision], N[(t$95$9 + N[(N[(1.0 + N[(t$95$3 - t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[N[(t$95$3 - -1.0), $MachinePrecision]], $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
t_1 := \sqrt{\mathsf{max}\left(x, y\right) + 1} - \sqrt{\mathsf{max}\left(x, y\right)}\\
t_2 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
t_3 := \mathsf{max}\left(t\_2, t\right)\\
t_4 := \sqrt{t\_3}\\
t_5 := \mathsf{min}\left(t\_2, t\right)\\
t_6 := \sqrt{t\_3 + 1} - t\_4\\
t_7 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
t_8 := \sqrt{t\_7 + 1} - \sqrt{t\_7}\\
t_9 := \left(\left(\sqrt{t\_5 + 1} - \sqrt{t\_5}\right) + t\_1\right) + t\_8\\
\mathbf{if}\;t\_9 + t\_6 \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(\left(\frac{0.5}{t\_5 \cdot \sqrt{\frac{1}{t\_5}}} + t\_1\right) + t\_8\right) + t\_6\\

\mathbf{else}:\\
\;\;\;\;t\_9 + \frac{1 + \left(t\_3 - t\_3\right)}{\sqrt{t\_3 - -1} + t\_4}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 5.0000000000000004e-6

    1. Initial program 91.6%

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

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

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

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

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

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

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

    if 5.0000000000000004e-6 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

    1. Initial program 91.6%

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \color{blue}{\left(\left(\mathsf{neg}\left(\sqrt{t}\right)\right) + \sqrt{t + 1}\right)} \]
      4. sum-to-multN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(1 + \frac{\sqrt{t - -1}}{\color{blue}{-\sqrt{t}}}\right) \cdot \left(\mathsf{neg}\left(\sqrt{t}\right)\right) \]
      13. lower-neg.f6491.6%

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(1 + \color{blue}{\frac{\sqrt{t - -1}}{-\sqrt{t}}}\right) \cdot \left(-\sqrt{t}\right) \]
      4. sum-to-mult-revN/A

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \color{blue}{\left(\sqrt{t + 1} - \sqrt{t}\right)} \]
      12. flip--N/A

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \frac{\sqrt{t - -1} \cdot \color{blue}{\sqrt{t - -1}} - \sqrt{t} \cdot \sqrt{t}}{\sqrt{t - -1} + \sqrt{t}} \]
      5. rem-square-sqrtN/A

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \frac{\left(1 + t\right) - \sqrt{t} \cdot \color{blue}{\sqrt{t}}}{\sqrt{t - -1} + \sqrt{t}} \]
      13. rem-square-sqrtN/A

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \frac{\color{blue}{1 + \left(t - t\right)}}{\sqrt{t - -1} + \sqrt{t}} \]
      16. lower--.f6493.6%

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

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

Alternative 4: 94.8% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \sqrt{t\_3}\\ t_5 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), t\right)\\ t_6 := \sqrt{t\_2}\\ \mathbf{if}\;t\_5 \leq 2.5:\\ \;\;\;\;\mathsf{fma}\left(\sqrt{\frac{t\_2 - -1}{t\_2}} - 1, t\_6, \left(\left(\sqrt{z - -1} - \sqrt{z}\right) + \sqrt{t\_5 - -1}\right) - \left(\sqrt{t\_5} + \left(t\_4 - \sqrt{t\_3 - -1}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{0.5}{t\_5 \cdot \sqrt{\frac{1}{t\_5}}} + \left(\sqrt{t\_3 + 1} - t\_4\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t\_2 + 1} - t\_6\right)\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (fmax (fmin x y) t))
        (t_2 (fmax (fmax x y) t_1))
        (t_3 (fmin (fmax x y) t_1))
        (t_4 (sqrt t_3))
        (t_5 (fmin (fmin x y) t))
        (t_6 (sqrt t_2)))
   (if (<= t_5 2.5)
     (fma
      (- (sqrt (/ (- t_2 -1.0) t_2)) 1.0)
      t_6
      (-
       (+ (- (sqrt (- z -1.0)) (sqrt z)) (sqrt (- t_5 -1.0)))
       (+ (sqrt t_5) (- t_4 (sqrt (- t_3 -1.0))))))
     (+
      (+
       (+ (/ 0.5 (* t_5 (sqrt (/ 1.0 t_5)))) (- (sqrt (+ t_3 1.0)) t_4))
       (- (sqrt (+ z 1.0)) (sqrt z)))
      (- (sqrt (+ t_2 1.0)) t_6)))))
double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), t);
	double t_2 = fmax(fmax(x, y), t_1);
	double t_3 = fmin(fmax(x, y), t_1);
	double t_4 = sqrt(t_3);
	double t_5 = fmin(fmin(x, y), t);
	double t_6 = sqrt(t_2);
	double tmp;
	if (t_5 <= 2.5) {
		tmp = fma((sqrt(((t_2 - -1.0) / t_2)) - 1.0), t_6, (((sqrt((z - -1.0)) - sqrt(z)) + sqrt((t_5 - -1.0))) - (sqrt(t_5) + (t_4 - sqrt((t_3 - -1.0))))));
	} else {
		tmp = (((0.5 / (t_5 * sqrt((1.0 / t_5)))) + (sqrt((t_3 + 1.0)) - t_4)) + (sqrt((z + 1.0)) - sqrt(z))) + (sqrt((t_2 + 1.0)) - t_6);
	}
	return tmp;
}
function code(x, y, z, t)
	t_1 = fmax(fmin(x, y), t)
	t_2 = fmax(fmax(x, y), t_1)
	t_3 = fmin(fmax(x, y), t_1)
	t_4 = sqrt(t_3)
	t_5 = fmin(fmin(x, y), t)
	t_6 = sqrt(t_2)
	tmp = 0.0
	if (t_5 <= 2.5)
		tmp = fma(Float64(sqrt(Float64(Float64(t_2 - -1.0) / t_2)) - 1.0), t_6, Float64(Float64(Float64(sqrt(Float64(z - -1.0)) - sqrt(z)) + sqrt(Float64(t_5 - -1.0))) - Float64(sqrt(t_5) + Float64(t_4 - sqrt(Float64(t_3 - -1.0))))));
	else
		tmp = Float64(Float64(Float64(Float64(0.5 / Float64(t_5 * sqrt(Float64(1.0 / t_5)))) + Float64(sqrt(Float64(t_3 + 1.0)) - t_4)) + Float64(sqrt(Float64(z + 1.0)) - sqrt(z))) + Float64(sqrt(Float64(t_2 + 1.0)) - t_6));
	end
	return tmp
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Min[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$2], $MachinePrecision]}, If[LessEqual[t$95$5, 2.5], N[(N[(N[Sqrt[N[(N[(t$95$2 - -1.0), $MachinePrecision] / t$95$2), $MachinePrecision]], $MachinePrecision] - 1.0), $MachinePrecision] * t$95$6 + N[(N[(N[(N[Sqrt[N[(z - -1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[t$95$5], $MachinePrecision] + N[(t$95$4 - N[Sqrt[N[(t$95$3 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.5 / N[(t$95$5 * N[Sqrt[N[(1.0 / t$95$5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$3 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$2 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\\
t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
t_4 := \sqrt{t\_3}\\
t_5 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), t\right)\\
t_6 := \sqrt{t\_2}\\
\mathbf{if}\;t\_5 \leq 2.5:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{\frac{t\_2 - -1}{t\_2}} - 1, t\_6, \left(\left(\sqrt{z - -1} - \sqrt{z}\right) + \sqrt{t\_5 - -1}\right) - \left(\sqrt{t\_5} + \left(t\_4 - \sqrt{t\_3 - -1}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\frac{0.5}{t\_5 \cdot \sqrt{\frac{1}{t\_5}}} + \left(\sqrt{t\_3 + 1} - t\_4\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t\_2 + 1} - t\_6\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.5

    1. Initial program 91.6%

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \color{blue}{\left(\left(\mathsf{neg}\left(\sqrt{t}\right)\right) + \sqrt{t + 1}\right)} \]
      4. sum-to-multN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(1 + \frac{\sqrt{t - -1}}{\color{blue}{-\sqrt{t}}}\right) \cdot \left(\mathsf{neg}\left(\sqrt{t}\right)\right) \]
      13. lower-neg.f6491.6%

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

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

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

    if 2.5 < x

    1. Initial program 91.6%

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

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

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

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

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

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

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

Alternative 5: 94.8% accurate, 0.5× speedup?

\[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\\ t_2 := \sqrt{\mathsf{max}\left(x, y\right) + 1} - \sqrt{\mathsf{max}\left(x, y\right)}\\ t_3 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), t\right)\\ t_4 := \sqrt{z + 1} - \sqrt{z}\\ t_5 := \sqrt{t\_1 + 1} - \sqrt{t\_1}\\ \mathbf{if}\;t\_3 \leq 2.5:\\ \;\;\;\;\left(\left(\left(\sqrt{t\_3 + 1} - \sqrt{t\_3}\right) + t\_2\right) + t\_4\right) + t\_5\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{0.5}{t\_3 \cdot \sqrt{\frac{1}{t\_3}}} + t\_2\right) + t\_4\right) + t\_5\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (fmax (fmin x y) t))
        (t_2 (- (sqrt (+ (fmax x y) 1.0)) (sqrt (fmax x y))))
        (t_3 (fmin (fmin x y) t))
        (t_4 (- (sqrt (+ z 1.0)) (sqrt z)))
        (t_5 (- (sqrt (+ t_1 1.0)) (sqrt t_1))))
   (if (<= t_3 2.5)
     (+ (+ (+ (- (sqrt (+ t_3 1.0)) (sqrt t_3)) t_2) t_4) t_5)
     (+ (+ (+ (/ 0.5 (* t_3 (sqrt (/ 1.0 t_3)))) t_2) t_4) t_5))))
double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), t);
	double t_2 = sqrt((fmax(x, y) + 1.0)) - sqrt(fmax(x, y));
	double t_3 = fmin(fmin(x, y), t);
	double t_4 = sqrt((z + 1.0)) - sqrt(z);
	double t_5 = sqrt((t_1 + 1.0)) - sqrt(t_1);
	double tmp;
	if (t_3 <= 2.5) {
		tmp = (((sqrt((t_3 + 1.0)) - sqrt(t_3)) + t_2) + t_4) + t_5;
	} else {
		tmp = (((0.5 / (t_3 * sqrt((1.0 / t_3)))) + t_2) + t_4) + t_5;
	}
	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) :: t_4
    real(8) :: t_5
    real(8) :: tmp
    t_1 = fmax(fmin(x, y), t)
    t_2 = sqrt((fmax(x, y) + 1.0d0)) - sqrt(fmax(x, y))
    t_3 = fmin(fmin(x, y), t)
    t_4 = sqrt((z + 1.0d0)) - sqrt(z)
    t_5 = sqrt((t_1 + 1.0d0)) - sqrt(t_1)
    if (t_3 <= 2.5d0) then
        tmp = (((sqrt((t_3 + 1.0d0)) - sqrt(t_3)) + t_2) + t_4) + t_5
    else
        tmp = (((0.5d0 / (t_3 * sqrt((1.0d0 / t_3)))) + t_2) + t_4) + t_5
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), t);
	double t_2 = Math.sqrt((fmax(x, y) + 1.0)) - Math.sqrt(fmax(x, y));
	double t_3 = fmin(fmin(x, y), t);
	double t_4 = Math.sqrt((z + 1.0)) - Math.sqrt(z);
	double t_5 = Math.sqrt((t_1 + 1.0)) - Math.sqrt(t_1);
	double tmp;
	if (t_3 <= 2.5) {
		tmp = (((Math.sqrt((t_3 + 1.0)) - Math.sqrt(t_3)) + t_2) + t_4) + t_5;
	} else {
		tmp = (((0.5 / (t_3 * Math.sqrt((1.0 / t_3)))) + t_2) + t_4) + t_5;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = fmax(fmin(x, y), t)
	t_2 = math.sqrt((fmax(x, y) + 1.0)) - math.sqrt(fmax(x, y))
	t_3 = fmin(fmin(x, y), t)
	t_4 = math.sqrt((z + 1.0)) - math.sqrt(z)
	t_5 = math.sqrt((t_1 + 1.0)) - math.sqrt(t_1)
	tmp = 0
	if t_3 <= 2.5:
		tmp = (((math.sqrt((t_3 + 1.0)) - math.sqrt(t_3)) + t_2) + t_4) + t_5
	else:
		tmp = (((0.5 / (t_3 * math.sqrt((1.0 / t_3)))) + t_2) + t_4) + t_5
	return tmp
function code(x, y, z, t)
	t_1 = fmax(fmin(x, y), t)
	t_2 = Float64(sqrt(Float64(fmax(x, y) + 1.0)) - sqrt(fmax(x, y)))
	t_3 = fmin(fmin(x, y), t)
	t_4 = Float64(sqrt(Float64(z + 1.0)) - sqrt(z))
	t_5 = Float64(sqrt(Float64(t_1 + 1.0)) - sqrt(t_1))
	tmp = 0.0
	if (t_3 <= 2.5)
		tmp = Float64(Float64(Float64(Float64(sqrt(Float64(t_3 + 1.0)) - sqrt(t_3)) + t_2) + t_4) + t_5);
	else
		tmp = Float64(Float64(Float64(Float64(0.5 / Float64(t_3 * sqrt(Float64(1.0 / t_3)))) + t_2) + t_4) + t_5);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = max(min(x, y), t);
	t_2 = sqrt((max(x, y) + 1.0)) - sqrt(max(x, y));
	t_3 = min(min(x, y), t);
	t_4 = sqrt((z + 1.0)) - sqrt(z);
	t_5 = sqrt((t_1 + 1.0)) - sqrt(t_1);
	tmp = 0.0;
	if (t_3 <= 2.5)
		tmp = (((sqrt((t_3 + 1.0)) - sqrt(t_3)) + t_2) + t_4) + t_5;
	else
		tmp = (((0.5 / (t_3 * sqrt((1.0 / t_3)))) + t_2) + t_4) + t_5;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[N[(N[Max[x, y], $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[N[Max[x, y], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[N[(z + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[Sqrt[N[(t$95$1 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 2.5], N[(N[(N[(N[(N[Sqrt[N[(t$95$3 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$5), $MachinePrecision], N[(N[(N[(N[(0.5 / N[(t$95$3 * N[Sqrt[N[(1.0 / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision] + t$95$5), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\\
t_2 := \sqrt{\mathsf{max}\left(x, y\right) + 1} - \sqrt{\mathsf{max}\left(x, y\right)}\\
t_3 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), t\right)\\
t_4 := \sqrt{z + 1} - \sqrt{z}\\
t_5 := \sqrt{t\_1 + 1} - \sqrt{t\_1}\\
\mathbf{if}\;t\_3 \leq 2.5:\\
\;\;\;\;\left(\left(\left(\sqrt{t\_3 + 1} - \sqrt{t\_3}\right) + t\_2\right) + t\_4\right) + t\_5\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\frac{0.5}{t\_3 \cdot \sqrt{\frac{1}{t\_3}}} + t\_2\right) + t\_4\right) + t\_5\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 2.5

    1. Initial program 91.6%

      \[\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]

    if 2.5 < x

    1. Initial program 91.6%

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

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

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

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

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

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

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

Alternative 6: 92.3% accurate, 0.1× speedup?

\[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_5 := \mathsf{min}\left(t\_4, t\right)\\ t_6 := \sqrt{1 + t\_5}\\ t_7 := \sqrt{t\_5}\\ t_8 := \mathsf{max}\left(t\_4, t\right)\\ t_9 := \mathsf{max}\left(t\_3, t\_8\right)\\ t_10 := \mathsf{min}\left(t\_2, t\_9\right)\\ t_11 := \sqrt{t\_10}\\ t_12 := \mathsf{min}\left(t\_3, t\_8\right)\\ t_13 := \mathsf{max}\left(t\_2, t\_9\right)\\ t_14 := \sqrt{t\_13}\\ t_15 := \sqrt{t\_13 + 1} - t\_14\\ t_16 := \sqrt{t\_12}\\ t_17 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_7\right) + \left(\sqrt{t\_12 + 1} - t\_16\right)\right) + \left(\sqrt{t\_10 + 1} - t\_11\right)\right) + t\_15\\ \mathbf{if}\;t\_17 \leq 1.002:\\ \;\;\;\;\left(\left(t\_6 + 0.5 \cdot \frac{1}{t\_12 \cdot \sqrt{\frac{1}{t\_12}}}\right) - t\_7\right) + t\_15\\ \mathbf{elif}\;t\_17 \leq 2:\\ \;\;\;\;\left(\left(t\_6 + \sqrt{1 + t\_12}\right) - \left(t\_7 + t\_16\right)\right) + t\_15\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sqrt{t\_13 - -1} - t\_14\right) + \left(\left(\sqrt{t\_5 - -1} - t\_7\right) - \left(t\_16 - \left(1 + \sqrt{1 + t\_10}\right)\right)\right)\right) - t\_11\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (fmax (fmin x y) z))
        (t_2 (fmax (fmax x y) t_1))
        (t_3 (fmin (fmax x y) t_1))
        (t_4 (fmin (fmin x y) z))
        (t_5 (fmin t_4 t))
        (t_6 (sqrt (+ 1.0 t_5)))
        (t_7 (sqrt t_5))
        (t_8 (fmax t_4 t))
        (t_9 (fmax t_3 t_8))
        (t_10 (fmin t_2 t_9))
        (t_11 (sqrt t_10))
        (t_12 (fmin t_3 t_8))
        (t_13 (fmax t_2 t_9))
        (t_14 (sqrt t_13))
        (t_15 (- (sqrt (+ t_13 1.0)) t_14))
        (t_16 (sqrt t_12))
        (t_17
         (+
          (+
           (+ (- (sqrt (+ t_5 1.0)) t_7) (- (sqrt (+ t_12 1.0)) t_16))
           (- (sqrt (+ t_10 1.0)) t_11))
          t_15)))
   (if (<= t_17 1.002)
     (+ (- (+ t_6 (* 0.5 (/ 1.0 (* t_12 (sqrt (/ 1.0 t_12)))))) t_7) t_15)
     (if (<= t_17 2.0)
       (+ (- (+ t_6 (sqrt (+ 1.0 t_12))) (+ t_7 t_16)) t_15)
       (-
        (+
         (- (sqrt (- t_13 -1.0)) t_14)
         (- (- (sqrt (- t_5 -1.0)) t_7) (- t_16 (+ 1.0 (sqrt (+ 1.0 t_10))))))
        t_11)))))
double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), z);
	double t_2 = fmax(fmax(x, y), t_1);
	double t_3 = fmin(fmax(x, y), t_1);
	double t_4 = fmin(fmin(x, y), z);
	double t_5 = fmin(t_4, t);
	double t_6 = sqrt((1.0 + t_5));
	double t_7 = sqrt(t_5);
	double t_8 = fmax(t_4, t);
	double t_9 = fmax(t_3, t_8);
	double t_10 = fmin(t_2, t_9);
	double t_11 = sqrt(t_10);
	double t_12 = fmin(t_3, t_8);
	double t_13 = fmax(t_2, t_9);
	double t_14 = sqrt(t_13);
	double t_15 = sqrt((t_13 + 1.0)) - t_14;
	double t_16 = sqrt(t_12);
	double t_17 = (((sqrt((t_5 + 1.0)) - t_7) + (sqrt((t_12 + 1.0)) - t_16)) + (sqrt((t_10 + 1.0)) - t_11)) + t_15;
	double tmp;
	if (t_17 <= 1.002) {
		tmp = ((t_6 + (0.5 * (1.0 / (t_12 * sqrt((1.0 / t_12)))))) - t_7) + t_15;
	} else if (t_17 <= 2.0) {
		tmp = ((t_6 + sqrt((1.0 + t_12))) - (t_7 + t_16)) + t_15;
	} else {
		tmp = ((sqrt((t_13 - -1.0)) - t_14) + ((sqrt((t_5 - -1.0)) - t_7) - (t_16 - (1.0 + sqrt((1.0 + t_10)))))) - t_11;
	}
	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_10
    real(8) :: t_11
    real(8) :: t_12
    real(8) :: t_13
    real(8) :: t_14
    real(8) :: t_15
    real(8) :: t_16
    real(8) :: t_17
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_1 = fmax(fmin(x, y), z)
    t_2 = fmax(fmax(x, y), t_1)
    t_3 = fmin(fmax(x, y), t_1)
    t_4 = fmin(fmin(x, y), z)
    t_5 = fmin(t_4, t)
    t_6 = sqrt((1.0d0 + t_5))
    t_7 = sqrt(t_5)
    t_8 = fmax(t_4, t)
    t_9 = fmax(t_3, t_8)
    t_10 = fmin(t_2, t_9)
    t_11 = sqrt(t_10)
    t_12 = fmin(t_3, t_8)
    t_13 = fmax(t_2, t_9)
    t_14 = sqrt(t_13)
    t_15 = sqrt((t_13 + 1.0d0)) - t_14
    t_16 = sqrt(t_12)
    t_17 = (((sqrt((t_5 + 1.0d0)) - t_7) + (sqrt((t_12 + 1.0d0)) - t_16)) + (sqrt((t_10 + 1.0d0)) - t_11)) + t_15
    if (t_17 <= 1.002d0) then
        tmp = ((t_6 + (0.5d0 * (1.0d0 / (t_12 * sqrt((1.0d0 / t_12)))))) - t_7) + t_15
    else if (t_17 <= 2.0d0) then
        tmp = ((t_6 + sqrt((1.0d0 + t_12))) - (t_7 + t_16)) + t_15
    else
        tmp = ((sqrt((t_13 - (-1.0d0))) - t_14) + ((sqrt((t_5 - (-1.0d0))) - t_7) - (t_16 - (1.0d0 + sqrt((1.0d0 + t_10)))))) - t_11
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), z);
	double t_2 = fmax(fmax(x, y), t_1);
	double t_3 = fmin(fmax(x, y), t_1);
	double t_4 = fmin(fmin(x, y), z);
	double t_5 = fmin(t_4, t);
	double t_6 = Math.sqrt((1.0 + t_5));
	double t_7 = Math.sqrt(t_5);
	double t_8 = fmax(t_4, t);
	double t_9 = fmax(t_3, t_8);
	double t_10 = fmin(t_2, t_9);
	double t_11 = Math.sqrt(t_10);
	double t_12 = fmin(t_3, t_8);
	double t_13 = fmax(t_2, t_9);
	double t_14 = Math.sqrt(t_13);
	double t_15 = Math.sqrt((t_13 + 1.0)) - t_14;
	double t_16 = Math.sqrt(t_12);
	double t_17 = (((Math.sqrt((t_5 + 1.0)) - t_7) + (Math.sqrt((t_12 + 1.0)) - t_16)) + (Math.sqrt((t_10 + 1.0)) - t_11)) + t_15;
	double tmp;
	if (t_17 <= 1.002) {
		tmp = ((t_6 + (0.5 * (1.0 / (t_12 * Math.sqrt((1.0 / t_12)))))) - t_7) + t_15;
	} else if (t_17 <= 2.0) {
		tmp = ((t_6 + Math.sqrt((1.0 + t_12))) - (t_7 + t_16)) + t_15;
	} else {
		tmp = ((Math.sqrt((t_13 - -1.0)) - t_14) + ((Math.sqrt((t_5 - -1.0)) - t_7) - (t_16 - (1.0 + Math.sqrt((1.0 + t_10)))))) - t_11;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = fmax(fmin(x, y), z)
	t_2 = fmax(fmax(x, y), t_1)
	t_3 = fmin(fmax(x, y), t_1)
	t_4 = fmin(fmin(x, y), z)
	t_5 = fmin(t_4, t)
	t_6 = math.sqrt((1.0 + t_5))
	t_7 = math.sqrt(t_5)
	t_8 = fmax(t_4, t)
	t_9 = fmax(t_3, t_8)
	t_10 = fmin(t_2, t_9)
	t_11 = math.sqrt(t_10)
	t_12 = fmin(t_3, t_8)
	t_13 = fmax(t_2, t_9)
	t_14 = math.sqrt(t_13)
	t_15 = math.sqrt((t_13 + 1.0)) - t_14
	t_16 = math.sqrt(t_12)
	t_17 = (((math.sqrt((t_5 + 1.0)) - t_7) + (math.sqrt((t_12 + 1.0)) - t_16)) + (math.sqrt((t_10 + 1.0)) - t_11)) + t_15
	tmp = 0
	if t_17 <= 1.002:
		tmp = ((t_6 + (0.5 * (1.0 / (t_12 * math.sqrt((1.0 / t_12)))))) - t_7) + t_15
	elif t_17 <= 2.0:
		tmp = ((t_6 + math.sqrt((1.0 + t_12))) - (t_7 + t_16)) + t_15
	else:
		tmp = ((math.sqrt((t_13 - -1.0)) - t_14) + ((math.sqrt((t_5 - -1.0)) - t_7) - (t_16 - (1.0 + math.sqrt((1.0 + t_10)))))) - t_11
	return tmp
function code(x, y, z, t)
	t_1 = fmax(fmin(x, y), z)
	t_2 = fmax(fmax(x, y), t_1)
	t_3 = fmin(fmax(x, y), t_1)
	t_4 = fmin(fmin(x, y), z)
	t_5 = fmin(t_4, t)
	t_6 = sqrt(Float64(1.0 + t_5))
	t_7 = sqrt(t_5)
	t_8 = fmax(t_4, t)
	t_9 = fmax(t_3, t_8)
	t_10 = fmin(t_2, t_9)
	t_11 = sqrt(t_10)
	t_12 = fmin(t_3, t_8)
	t_13 = fmax(t_2, t_9)
	t_14 = sqrt(t_13)
	t_15 = Float64(sqrt(Float64(t_13 + 1.0)) - t_14)
	t_16 = sqrt(t_12)
	t_17 = Float64(Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - t_7) + Float64(sqrt(Float64(t_12 + 1.0)) - t_16)) + Float64(sqrt(Float64(t_10 + 1.0)) - t_11)) + t_15)
	tmp = 0.0
	if (t_17 <= 1.002)
		tmp = Float64(Float64(Float64(t_6 + Float64(0.5 * Float64(1.0 / Float64(t_12 * sqrt(Float64(1.0 / t_12)))))) - t_7) + t_15);
	elseif (t_17 <= 2.0)
		tmp = Float64(Float64(Float64(t_6 + sqrt(Float64(1.0 + t_12))) - Float64(t_7 + t_16)) + t_15);
	else
		tmp = Float64(Float64(Float64(sqrt(Float64(t_13 - -1.0)) - t_14) + Float64(Float64(sqrt(Float64(t_5 - -1.0)) - t_7) - Float64(t_16 - Float64(1.0 + sqrt(Float64(1.0 + t_10)))))) - t_11);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = max(min(x, y), z);
	t_2 = max(max(x, y), t_1);
	t_3 = min(max(x, y), t_1);
	t_4 = min(min(x, y), z);
	t_5 = min(t_4, t);
	t_6 = sqrt((1.0 + t_5));
	t_7 = sqrt(t_5);
	t_8 = max(t_4, t);
	t_9 = max(t_3, t_8);
	t_10 = min(t_2, t_9);
	t_11 = sqrt(t_10);
	t_12 = min(t_3, t_8);
	t_13 = max(t_2, t_9);
	t_14 = sqrt(t_13);
	t_15 = sqrt((t_13 + 1.0)) - t_14;
	t_16 = sqrt(t_12);
	t_17 = (((sqrt((t_5 + 1.0)) - t_7) + (sqrt((t_12 + 1.0)) - t_16)) + (sqrt((t_10 + 1.0)) - t_11)) + t_15;
	tmp = 0.0;
	if (t_17 <= 1.002)
		tmp = ((t_6 + (0.5 * (1.0 / (t_12 * sqrt((1.0 / t_12)))))) - t_7) + t_15;
	elseif (t_17 <= 2.0)
		tmp = ((t_6 + sqrt((1.0 + t_12))) - (t_7 + t_16)) + t_15;
	else
		tmp = ((sqrt((t_13 - -1.0)) - t_14) + ((sqrt((t_5 - -1.0)) - t_7) - (t_16 - (1.0 + sqrt((1.0 + t_10)))))) - t_11;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$4, t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[t$95$5], $MachinePrecision]}, Block[{t$95$8 = N[Max[t$95$4, t], $MachinePrecision]}, Block[{t$95$9 = N[Max[t$95$3, t$95$8], $MachinePrecision]}, Block[{t$95$10 = N[Min[t$95$2, t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Sqrt[t$95$10], $MachinePrecision]}, Block[{t$95$12 = N[Min[t$95$3, t$95$8], $MachinePrecision]}, Block[{t$95$13 = N[Max[t$95$2, t$95$9], $MachinePrecision]}, Block[{t$95$14 = N[Sqrt[t$95$13], $MachinePrecision]}, Block[{t$95$15 = N[(N[Sqrt[N[(t$95$13 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$14), $MachinePrecision]}, Block[{t$95$16 = N[Sqrt[t$95$12], $MachinePrecision]}, Block[{t$95$17 = N[(N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$7), $MachinePrecision] + N[(N[Sqrt[N[(t$95$12 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$16), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$10 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$11), $MachinePrecision]), $MachinePrecision] + t$95$15), $MachinePrecision]}, If[LessEqual[t$95$17, 1.002], N[(N[(N[(t$95$6 + N[(0.5 * N[(1.0 / N[(t$95$12 * N[Sqrt[N[(1.0 / t$95$12), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$7), $MachinePrecision] + t$95$15), $MachinePrecision], If[LessEqual[t$95$17, 2.0], N[(N[(N[(t$95$6 + N[Sqrt[N[(1.0 + t$95$12), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t$95$7 + t$95$16), $MachinePrecision]), $MachinePrecision] + t$95$15), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(t$95$13 - -1.0), $MachinePrecision]], $MachinePrecision] - t$95$14), $MachinePrecision] + N[(N[(N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision] - t$95$7), $MachinePrecision] - N[(t$95$16 - N[(1.0 + N[Sqrt[N[(1.0 + t$95$10), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$11), $MachinePrecision]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
t_5 := \mathsf{min}\left(t\_4, t\right)\\
t_6 := \sqrt{1 + t\_5}\\
t_7 := \sqrt{t\_5}\\
t_8 := \mathsf{max}\left(t\_4, t\right)\\
t_9 := \mathsf{max}\left(t\_3, t\_8\right)\\
t_10 := \mathsf{min}\left(t\_2, t\_9\right)\\
t_11 := \sqrt{t\_10}\\
t_12 := \mathsf{min}\left(t\_3, t\_8\right)\\
t_13 := \mathsf{max}\left(t\_2, t\_9\right)\\
t_14 := \sqrt{t\_13}\\
t_15 := \sqrt{t\_13 + 1} - t\_14\\
t_16 := \sqrt{t\_12}\\
t_17 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_7\right) + \left(\sqrt{t\_12 + 1} - t\_16\right)\right) + \left(\sqrt{t\_10 + 1} - t\_11\right)\right) + t\_15\\
\mathbf{if}\;t\_17 \leq 1.002:\\
\;\;\;\;\left(\left(t\_6 + 0.5 \cdot \frac{1}{t\_12 \cdot \sqrt{\frac{1}{t\_12}}}\right) - t\_7\right) + t\_15\\

\mathbf{elif}\;t\_17 \leq 2:\\
\;\;\;\;\left(\left(t\_6 + \sqrt{1 + t\_12}\right) - \left(t\_7 + t\_16\right)\right) + t\_15\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{t\_13 - -1} - t\_14\right) + \left(\left(\sqrt{t\_5 - -1} - t\_7\right) - \left(t\_16 - \left(1 + \sqrt{1 + t\_10}\right)\right)\right)\right) - t\_11\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 1.002

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + x} + 0.5 \cdot \frac{1}{y \cdot \sqrt{\frac{1}{y}}}\right) - \sqrt{x}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    10. Applied rewrites25.5%

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

    if 1.002 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2

    1. Initial program 91.6%

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      5. lower-sqrt.f64N/A

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{\color{blue}{y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      9. lower-sqrt.f6429.5%

        \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    4. Applied rewrites29.5%

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

    if 2 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
      3. lower-+.f6432.1%

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - \left(1 + \sqrt{1 + z}\right)\right)\right)\right) - \sqrt{z} \]
      5. lower-+.f6427.4%

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

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

Alternative 7: 92.2% accurate, 0.0× speedup?

\[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_5 := \mathsf{min}\left(t\_4, t\right)\\ t_6 := \sqrt{1 + t\_5}\\ t_7 := \sqrt{t\_5 - -1}\\ t_8 := \sqrt{t\_5}\\ t_9 := \mathsf{max}\left(t\_4, t\right)\\ t_10 := \mathsf{max}\left(t\_3, t\_9\right)\\ t_11 := \mathsf{min}\left(t\_2, t\_10\right)\\ t_12 := \sqrt{t\_11}\\ t_13 := \mathsf{min}\left(t\_3, t\_9\right)\\ t_14 := \mathsf{max}\left(t\_2, t\_10\right)\\ t_15 := \sqrt{t\_14}\\ t_16 := \sqrt{t\_14 + 1} - t\_15\\ t_17 := \sqrt{t\_13}\\ t_18 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_8\right) + \left(\sqrt{t\_13 + 1} - t\_17\right)\right) + \left(\sqrt{t\_11 + 1} - t\_12\right)\right) + t\_16\\ \mathbf{if}\;t\_18 \leq 1.002:\\ \;\;\;\;\left(\left(t\_6 + 0.5 \cdot \frac{1}{t\_13 \cdot \sqrt{\frac{1}{t\_13}}}\right) - t\_8\right) + t\_16\\ \mathbf{elif}\;t\_18 \leq 2:\\ \;\;\;\;\left(\left(t\_6 + \sqrt{1 + t\_13}\right) - \left(t\_8 + t\_17\right)\right) + t\_16\\ \mathbf{elif}\;t\_18 \leq 2.9999999:\\ \;\;\;\;t\_7 + \left(\left(\sqrt{t\_11 - -1} + \sqrt{t\_13 - -1}\right) - \left(\left(t\_12 + t\_17\right) + t\_8\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sqrt{t\_14 - -1} - t\_15\right) + \left(\left(t\_7 - t\_8\right) - \left(t\_17 - 2\right)\right)\right) - t\_12\\ \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (fmax (fmin x y) z))
        (t_2 (fmax (fmax x y) t_1))
        (t_3 (fmin (fmax x y) t_1))
        (t_4 (fmin (fmin x y) z))
        (t_5 (fmin t_4 t))
        (t_6 (sqrt (+ 1.0 t_5)))
        (t_7 (sqrt (- t_5 -1.0)))
        (t_8 (sqrt t_5))
        (t_9 (fmax t_4 t))
        (t_10 (fmax t_3 t_9))
        (t_11 (fmin t_2 t_10))
        (t_12 (sqrt t_11))
        (t_13 (fmin t_3 t_9))
        (t_14 (fmax t_2 t_10))
        (t_15 (sqrt t_14))
        (t_16 (- (sqrt (+ t_14 1.0)) t_15))
        (t_17 (sqrt t_13))
        (t_18
         (+
          (+
           (+ (- (sqrt (+ t_5 1.0)) t_8) (- (sqrt (+ t_13 1.0)) t_17))
           (- (sqrt (+ t_11 1.0)) t_12))
          t_16)))
   (if (<= t_18 1.002)
     (+ (- (+ t_6 (* 0.5 (/ 1.0 (* t_13 (sqrt (/ 1.0 t_13)))))) t_8) t_16)
     (if (<= t_18 2.0)
       (+ (- (+ t_6 (sqrt (+ 1.0 t_13))) (+ t_8 t_17)) t_16)
       (if (<= t_18 2.9999999)
         (+
          t_7
          (-
           (+ (sqrt (- t_11 -1.0)) (sqrt (- t_13 -1.0)))
           (+ (+ t_12 t_17) t_8)))
         (-
          (+ (- (sqrt (- t_14 -1.0)) t_15) (- (- t_7 t_8) (- t_17 2.0)))
          t_12))))))
double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), z);
	double t_2 = fmax(fmax(x, y), t_1);
	double t_3 = fmin(fmax(x, y), t_1);
	double t_4 = fmin(fmin(x, y), z);
	double t_5 = fmin(t_4, t);
	double t_6 = sqrt((1.0 + t_5));
	double t_7 = sqrt((t_5 - -1.0));
	double t_8 = sqrt(t_5);
	double t_9 = fmax(t_4, t);
	double t_10 = fmax(t_3, t_9);
	double t_11 = fmin(t_2, t_10);
	double t_12 = sqrt(t_11);
	double t_13 = fmin(t_3, t_9);
	double t_14 = fmax(t_2, t_10);
	double t_15 = sqrt(t_14);
	double t_16 = sqrt((t_14 + 1.0)) - t_15;
	double t_17 = sqrt(t_13);
	double t_18 = (((sqrt((t_5 + 1.0)) - t_8) + (sqrt((t_13 + 1.0)) - t_17)) + (sqrt((t_11 + 1.0)) - t_12)) + t_16;
	double tmp;
	if (t_18 <= 1.002) {
		tmp = ((t_6 + (0.5 * (1.0 / (t_13 * sqrt((1.0 / t_13)))))) - t_8) + t_16;
	} else if (t_18 <= 2.0) {
		tmp = ((t_6 + sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16;
	} else if (t_18 <= 2.9999999) {
		tmp = t_7 + ((sqrt((t_11 - -1.0)) + sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8));
	} else {
		tmp = ((sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12;
	}
	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_10
    real(8) :: t_11
    real(8) :: t_12
    real(8) :: t_13
    real(8) :: t_14
    real(8) :: t_15
    real(8) :: t_16
    real(8) :: t_17
    real(8) :: t_18
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: t_7
    real(8) :: t_8
    real(8) :: t_9
    real(8) :: tmp
    t_1 = fmax(fmin(x, y), z)
    t_2 = fmax(fmax(x, y), t_1)
    t_3 = fmin(fmax(x, y), t_1)
    t_4 = fmin(fmin(x, y), z)
    t_5 = fmin(t_4, t)
    t_6 = sqrt((1.0d0 + t_5))
    t_7 = sqrt((t_5 - (-1.0d0)))
    t_8 = sqrt(t_5)
    t_9 = fmax(t_4, t)
    t_10 = fmax(t_3, t_9)
    t_11 = fmin(t_2, t_10)
    t_12 = sqrt(t_11)
    t_13 = fmin(t_3, t_9)
    t_14 = fmax(t_2, t_10)
    t_15 = sqrt(t_14)
    t_16 = sqrt((t_14 + 1.0d0)) - t_15
    t_17 = sqrt(t_13)
    t_18 = (((sqrt((t_5 + 1.0d0)) - t_8) + (sqrt((t_13 + 1.0d0)) - t_17)) + (sqrt((t_11 + 1.0d0)) - t_12)) + t_16
    if (t_18 <= 1.002d0) then
        tmp = ((t_6 + (0.5d0 * (1.0d0 / (t_13 * sqrt((1.0d0 / t_13)))))) - t_8) + t_16
    else if (t_18 <= 2.0d0) then
        tmp = ((t_6 + sqrt((1.0d0 + t_13))) - (t_8 + t_17)) + t_16
    else if (t_18 <= 2.9999999d0) then
        tmp = t_7 + ((sqrt((t_11 - (-1.0d0))) + sqrt((t_13 - (-1.0d0)))) - ((t_12 + t_17) + t_8))
    else
        tmp = ((sqrt((t_14 - (-1.0d0))) - t_15) + ((t_7 - t_8) - (t_17 - 2.0d0))) - t_12
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = fmax(fmin(x, y), z);
	double t_2 = fmax(fmax(x, y), t_1);
	double t_3 = fmin(fmax(x, y), t_1);
	double t_4 = fmin(fmin(x, y), z);
	double t_5 = fmin(t_4, t);
	double t_6 = Math.sqrt((1.0 + t_5));
	double t_7 = Math.sqrt((t_5 - -1.0));
	double t_8 = Math.sqrt(t_5);
	double t_9 = fmax(t_4, t);
	double t_10 = fmax(t_3, t_9);
	double t_11 = fmin(t_2, t_10);
	double t_12 = Math.sqrt(t_11);
	double t_13 = fmin(t_3, t_9);
	double t_14 = fmax(t_2, t_10);
	double t_15 = Math.sqrt(t_14);
	double t_16 = Math.sqrt((t_14 + 1.0)) - t_15;
	double t_17 = Math.sqrt(t_13);
	double t_18 = (((Math.sqrt((t_5 + 1.0)) - t_8) + (Math.sqrt((t_13 + 1.0)) - t_17)) + (Math.sqrt((t_11 + 1.0)) - t_12)) + t_16;
	double tmp;
	if (t_18 <= 1.002) {
		tmp = ((t_6 + (0.5 * (1.0 / (t_13 * Math.sqrt((1.0 / t_13)))))) - t_8) + t_16;
	} else if (t_18 <= 2.0) {
		tmp = ((t_6 + Math.sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16;
	} else if (t_18 <= 2.9999999) {
		tmp = t_7 + ((Math.sqrt((t_11 - -1.0)) + Math.sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8));
	} else {
		tmp = ((Math.sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = fmax(fmin(x, y), z)
	t_2 = fmax(fmax(x, y), t_1)
	t_3 = fmin(fmax(x, y), t_1)
	t_4 = fmin(fmin(x, y), z)
	t_5 = fmin(t_4, t)
	t_6 = math.sqrt((1.0 + t_5))
	t_7 = math.sqrt((t_5 - -1.0))
	t_8 = math.sqrt(t_5)
	t_9 = fmax(t_4, t)
	t_10 = fmax(t_3, t_9)
	t_11 = fmin(t_2, t_10)
	t_12 = math.sqrt(t_11)
	t_13 = fmin(t_3, t_9)
	t_14 = fmax(t_2, t_10)
	t_15 = math.sqrt(t_14)
	t_16 = math.sqrt((t_14 + 1.0)) - t_15
	t_17 = math.sqrt(t_13)
	t_18 = (((math.sqrt((t_5 + 1.0)) - t_8) + (math.sqrt((t_13 + 1.0)) - t_17)) + (math.sqrt((t_11 + 1.0)) - t_12)) + t_16
	tmp = 0
	if t_18 <= 1.002:
		tmp = ((t_6 + (0.5 * (1.0 / (t_13 * math.sqrt((1.0 / t_13)))))) - t_8) + t_16
	elif t_18 <= 2.0:
		tmp = ((t_6 + math.sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16
	elif t_18 <= 2.9999999:
		tmp = t_7 + ((math.sqrt((t_11 - -1.0)) + math.sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8))
	else:
		tmp = ((math.sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12
	return tmp
function code(x, y, z, t)
	t_1 = fmax(fmin(x, y), z)
	t_2 = fmax(fmax(x, y), t_1)
	t_3 = fmin(fmax(x, y), t_1)
	t_4 = fmin(fmin(x, y), z)
	t_5 = fmin(t_4, t)
	t_6 = sqrt(Float64(1.0 + t_5))
	t_7 = sqrt(Float64(t_5 - -1.0))
	t_8 = sqrt(t_5)
	t_9 = fmax(t_4, t)
	t_10 = fmax(t_3, t_9)
	t_11 = fmin(t_2, t_10)
	t_12 = sqrt(t_11)
	t_13 = fmin(t_3, t_9)
	t_14 = fmax(t_2, t_10)
	t_15 = sqrt(t_14)
	t_16 = Float64(sqrt(Float64(t_14 + 1.0)) - t_15)
	t_17 = sqrt(t_13)
	t_18 = Float64(Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - t_8) + Float64(sqrt(Float64(t_13 + 1.0)) - t_17)) + Float64(sqrt(Float64(t_11 + 1.0)) - t_12)) + t_16)
	tmp = 0.0
	if (t_18 <= 1.002)
		tmp = Float64(Float64(Float64(t_6 + Float64(0.5 * Float64(1.0 / Float64(t_13 * sqrt(Float64(1.0 / t_13)))))) - t_8) + t_16);
	elseif (t_18 <= 2.0)
		tmp = Float64(Float64(Float64(t_6 + sqrt(Float64(1.0 + t_13))) - Float64(t_8 + t_17)) + t_16);
	elseif (t_18 <= 2.9999999)
		tmp = Float64(t_7 + Float64(Float64(sqrt(Float64(t_11 - -1.0)) + sqrt(Float64(t_13 - -1.0))) - Float64(Float64(t_12 + t_17) + t_8)));
	else
		tmp = Float64(Float64(Float64(sqrt(Float64(t_14 - -1.0)) - t_15) + Float64(Float64(t_7 - t_8) - Float64(t_17 - 2.0))) - t_12);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = max(min(x, y), z);
	t_2 = max(max(x, y), t_1);
	t_3 = min(max(x, y), t_1);
	t_4 = min(min(x, y), z);
	t_5 = min(t_4, t);
	t_6 = sqrt((1.0 + t_5));
	t_7 = sqrt((t_5 - -1.0));
	t_8 = sqrt(t_5);
	t_9 = max(t_4, t);
	t_10 = max(t_3, t_9);
	t_11 = min(t_2, t_10);
	t_12 = sqrt(t_11);
	t_13 = min(t_3, t_9);
	t_14 = max(t_2, t_10);
	t_15 = sqrt(t_14);
	t_16 = sqrt((t_14 + 1.0)) - t_15;
	t_17 = sqrt(t_13);
	t_18 = (((sqrt((t_5 + 1.0)) - t_8) + (sqrt((t_13 + 1.0)) - t_17)) + (sqrt((t_11 + 1.0)) - t_12)) + t_16;
	tmp = 0.0;
	if (t_18 <= 1.002)
		tmp = ((t_6 + (0.5 * (1.0 / (t_13 * sqrt((1.0 / t_13)))))) - t_8) + t_16;
	elseif (t_18 <= 2.0)
		tmp = ((t_6 + sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16;
	elseif (t_18 <= 2.9999999)
		tmp = t_7 + ((sqrt((t_11 - -1.0)) + sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8));
	else
		tmp = ((sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$4, t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[Sqrt[t$95$5], $MachinePrecision]}, Block[{t$95$9 = N[Max[t$95$4, t], $MachinePrecision]}, Block[{t$95$10 = N[Max[t$95$3, t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Min[t$95$2, t$95$10], $MachinePrecision]}, Block[{t$95$12 = N[Sqrt[t$95$11], $MachinePrecision]}, Block[{t$95$13 = N[Min[t$95$3, t$95$9], $MachinePrecision]}, Block[{t$95$14 = N[Max[t$95$2, t$95$10], $MachinePrecision]}, Block[{t$95$15 = N[Sqrt[t$95$14], $MachinePrecision]}, Block[{t$95$16 = N[(N[Sqrt[N[(t$95$14 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$15), $MachinePrecision]}, Block[{t$95$17 = N[Sqrt[t$95$13], $MachinePrecision]}, Block[{t$95$18 = N[(N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$8), $MachinePrecision] + N[(N[Sqrt[N[(t$95$13 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$17), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$11 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$12), $MachinePrecision]), $MachinePrecision] + t$95$16), $MachinePrecision]}, If[LessEqual[t$95$18, 1.002], N[(N[(N[(t$95$6 + N[(0.5 * N[(1.0 / N[(t$95$13 * N[Sqrt[N[(1.0 / t$95$13), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] + t$95$16), $MachinePrecision], If[LessEqual[t$95$18, 2.0], N[(N[(N[(t$95$6 + N[Sqrt[N[(1.0 + t$95$13), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t$95$8 + t$95$17), $MachinePrecision]), $MachinePrecision] + t$95$16), $MachinePrecision], If[LessEqual[t$95$18, 2.9999999], N[(t$95$7 + N[(N[(N[Sqrt[N[(t$95$11 - -1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(t$95$13 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$12 + t$95$17), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(t$95$14 - -1.0), $MachinePrecision]], $MachinePrecision] - t$95$15), $MachinePrecision] + N[(N[(t$95$7 - t$95$8), $MachinePrecision] - N[(t$95$17 - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$12), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
t_5 := \mathsf{min}\left(t\_4, t\right)\\
t_6 := \sqrt{1 + t\_5}\\
t_7 := \sqrt{t\_5 - -1}\\
t_8 := \sqrt{t\_5}\\
t_9 := \mathsf{max}\left(t\_4, t\right)\\
t_10 := \mathsf{max}\left(t\_3, t\_9\right)\\
t_11 := \mathsf{min}\left(t\_2, t\_10\right)\\
t_12 := \sqrt{t\_11}\\
t_13 := \mathsf{min}\left(t\_3, t\_9\right)\\
t_14 := \mathsf{max}\left(t\_2, t\_10\right)\\
t_15 := \sqrt{t\_14}\\
t_16 := \sqrt{t\_14 + 1} - t\_15\\
t_17 := \sqrt{t\_13}\\
t_18 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_8\right) + \left(\sqrt{t\_13 + 1} - t\_17\right)\right) + \left(\sqrt{t\_11 + 1} - t\_12\right)\right) + t\_16\\
\mathbf{if}\;t\_18 \leq 1.002:\\
\;\;\;\;\left(\left(t\_6 + 0.5 \cdot \frac{1}{t\_13 \cdot \sqrt{\frac{1}{t\_13}}}\right) - t\_8\right) + t\_16\\

\mathbf{elif}\;t\_18 \leq 2:\\
\;\;\;\;\left(\left(t\_6 + \sqrt{1 + t\_13}\right) - \left(t\_8 + t\_17\right)\right) + t\_16\\

\mathbf{elif}\;t\_18 \leq 2.9999999:\\
\;\;\;\;t\_7 + \left(\left(\sqrt{t\_11 - -1} + \sqrt{t\_13 - -1}\right) - \left(\left(t\_12 + t\_17\right) + t\_8\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\sqrt{t\_14 - -1} - t\_15\right) + \left(\left(t\_7 - t\_8\right) - \left(t\_17 - 2\right)\right)\right) - t\_12\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 1.002

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + x} + 0.5 \cdot \frac{1}{y \cdot \sqrt{\frac{1}{y}}}\right) - \sqrt{x}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    10. Applied rewrites25.5%

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

    if 1.002 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2

    1. Initial program 91.6%

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      5. lower-sqrt.f64N/A

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

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

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

        \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{\color{blue}{y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
      9. lower-sqrt.f6429.5%

        \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
    4. Applied rewrites29.5%

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

    if 2 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2.9999999000000002

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
      3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
    9. Applied rewrites12.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{x - \left(\mathsf{neg}\left(1\right)\right)} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
      10. metadata-evalN/A

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

        \[\leadsto \sqrt{x - -1} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
      12. lower--.f6422.5%

        \[\leadsto \sqrt{x - -1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \color{blue}{\left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)}\right) \]
    11. Applied rewrites22.5%

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

    if 2.9999999000000002 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
      3. lower-+.f6432.1%

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

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

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

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

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

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

        \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - \left(1 + \sqrt{1 + z}\right)\right)\right)\right) - \sqrt{z} \]
      5. lower-+.f6427.4%

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

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

      \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - 2\right)\right)\right) - \sqrt{z} \]
    11. Step-by-step derivation
      1. Applied rewrites24.2%

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

    Alternative 8: 91.5% accurate, 0.5× speedup?

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

      1. Initial program 91.6%

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

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

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

          \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \color{blue}{\left(\left(\mathsf{neg}\left(\sqrt{t}\right)\right) + \sqrt{t + 1}\right)} \]
        4. sum-to-multN/A

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(1 + \frac{\sqrt{t - -1}}{\color{blue}{-\sqrt{t}}}\right) \cdot \left(\mathsf{neg}\left(\sqrt{t}\right)\right) \]
        13. lower-neg.f6491.6%

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

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

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

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

        if 0.0 < (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))

        1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
          3. lower-+.f6432.1%

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

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - \left(1 + \sqrt{1 + z}\right)\right)\right)\right) - \sqrt{z} \]
          5. lower-+.f6427.4%

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

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

      Alternative 9: 91.3% accurate, 0.0× speedup?

      \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_5 := \mathsf{min}\left(t\_4, t\right)\\ t_6 := \sqrt{1 + t\_5}\\ t_7 := \sqrt{t\_5 - -1}\\ t_8 := \sqrt{t\_5}\\ t_9 := \mathsf{max}\left(t\_4, t\right)\\ t_10 := \mathsf{max}\left(t\_3, t\_9\right)\\ t_11 := \mathsf{min}\left(t\_2, t\_10\right)\\ t_12 := \sqrt{t\_11}\\ t_13 := \mathsf{min}\left(t\_3, t\_9\right)\\ t_14 := \mathsf{max}\left(t\_2, t\_10\right)\\ t_15 := \sqrt{t\_14}\\ t_16 := \sqrt{t\_14 + 1} - t\_15\\ t_17 := \sqrt{t\_13}\\ t_18 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_8\right) + \left(\sqrt{t\_13 + 1} - t\_17\right)\right) + \left(\sqrt{t\_11 + 1} - t\_12\right)\right) + t\_16\\ \mathbf{if}\;t\_18 \leq 1.00000002:\\ \;\;\;\;\left(\left(t\_6 + \frac{0.5}{t\_11 \cdot \sqrt{\frac{1}{t\_11}}}\right) - t\_8\right) + t\_16\\ \mathbf{elif}\;t\_18 \leq 2:\\ \;\;\;\;\left(\left(t\_6 + \sqrt{1 + t\_13}\right) - \left(t\_8 + t\_17\right)\right) + t\_16\\ \mathbf{elif}\;t\_18 \leq 2.9999999:\\ \;\;\;\;t\_7 + \left(\left(\sqrt{t\_11 - -1} + \sqrt{t\_13 - -1}\right) - \left(\left(t\_12 + t\_17\right) + t\_8\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sqrt{t\_14 - -1} - t\_15\right) + \left(\left(t\_7 - t\_8\right) - \left(t\_17 - 2\right)\right)\right) - t\_12\\ \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (fmax (fmin x y) z))
              (t_2 (fmax (fmax x y) t_1))
              (t_3 (fmin (fmax x y) t_1))
              (t_4 (fmin (fmin x y) z))
              (t_5 (fmin t_4 t))
              (t_6 (sqrt (+ 1.0 t_5)))
              (t_7 (sqrt (- t_5 -1.0)))
              (t_8 (sqrt t_5))
              (t_9 (fmax t_4 t))
              (t_10 (fmax t_3 t_9))
              (t_11 (fmin t_2 t_10))
              (t_12 (sqrt t_11))
              (t_13 (fmin t_3 t_9))
              (t_14 (fmax t_2 t_10))
              (t_15 (sqrt t_14))
              (t_16 (- (sqrt (+ t_14 1.0)) t_15))
              (t_17 (sqrt t_13))
              (t_18
               (+
                (+
                 (+ (- (sqrt (+ t_5 1.0)) t_8) (- (sqrt (+ t_13 1.0)) t_17))
                 (- (sqrt (+ t_11 1.0)) t_12))
                t_16)))
         (if (<= t_18 1.00000002)
           (+ (- (+ t_6 (/ 0.5 (* t_11 (sqrt (/ 1.0 t_11))))) t_8) t_16)
           (if (<= t_18 2.0)
             (+ (- (+ t_6 (sqrt (+ 1.0 t_13))) (+ t_8 t_17)) t_16)
             (if (<= t_18 2.9999999)
               (+
                t_7
                (-
                 (+ (sqrt (- t_11 -1.0)) (sqrt (- t_13 -1.0)))
                 (+ (+ t_12 t_17) t_8)))
               (-
                (+ (- (sqrt (- t_14 -1.0)) t_15) (- (- t_7 t_8) (- t_17 2.0)))
                t_12))))))
      double code(double x, double y, double z, double t) {
      	double t_1 = fmax(fmin(x, y), z);
      	double t_2 = fmax(fmax(x, y), t_1);
      	double t_3 = fmin(fmax(x, y), t_1);
      	double t_4 = fmin(fmin(x, y), z);
      	double t_5 = fmin(t_4, t);
      	double t_6 = sqrt((1.0 + t_5));
      	double t_7 = sqrt((t_5 - -1.0));
      	double t_8 = sqrt(t_5);
      	double t_9 = fmax(t_4, t);
      	double t_10 = fmax(t_3, t_9);
      	double t_11 = fmin(t_2, t_10);
      	double t_12 = sqrt(t_11);
      	double t_13 = fmin(t_3, t_9);
      	double t_14 = fmax(t_2, t_10);
      	double t_15 = sqrt(t_14);
      	double t_16 = sqrt((t_14 + 1.0)) - t_15;
      	double t_17 = sqrt(t_13);
      	double t_18 = (((sqrt((t_5 + 1.0)) - t_8) + (sqrt((t_13 + 1.0)) - t_17)) + (sqrt((t_11 + 1.0)) - t_12)) + t_16;
      	double tmp;
      	if (t_18 <= 1.00000002) {
      		tmp = ((t_6 + (0.5 / (t_11 * sqrt((1.0 / t_11))))) - t_8) + t_16;
      	} else if (t_18 <= 2.0) {
      		tmp = ((t_6 + sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16;
      	} else if (t_18 <= 2.9999999) {
      		tmp = t_7 + ((sqrt((t_11 - -1.0)) + sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8));
      	} else {
      		tmp = ((sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12;
      	}
      	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_10
          real(8) :: t_11
          real(8) :: t_12
          real(8) :: t_13
          real(8) :: t_14
          real(8) :: t_15
          real(8) :: t_16
          real(8) :: t_17
          real(8) :: t_18
          real(8) :: t_2
          real(8) :: t_3
          real(8) :: t_4
          real(8) :: t_5
          real(8) :: t_6
          real(8) :: t_7
          real(8) :: t_8
          real(8) :: t_9
          real(8) :: tmp
          t_1 = fmax(fmin(x, y), z)
          t_2 = fmax(fmax(x, y), t_1)
          t_3 = fmin(fmax(x, y), t_1)
          t_4 = fmin(fmin(x, y), z)
          t_5 = fmin(t_4, t)
          t_6 = sqrt((1.0d0 + t_5))
          t_7 = sqrt((t_5 - (-1.0d0)))
          t_8 = sqrt(t_5)
          t_9 = fmax(t_4, t)
          t_10 = fmax(t_3, t_9)
          t_11 = fmin(t_2, t_10)
          t_12 = sqrt(t_11)
          t_13 = fmin(t_3, t_9)
          t_14 = fmax(t_2, t_10)
          t_15 = sqrt(t_14)
          t_16 = sqrt((t_14 + 1.0d0)) - t_15
          t_17 = sqrt(t_13)
          t_18 = (((sqrt((t_5 + 1.0d0)) - t_8) + (sqrt((t_13 + 1.0d0)) - t_17)) + (sqrt((t_11 + 1.0d0)) - t_12)) + t_16
          if (t_18 <= 1.00000002d0) then
              tmp = ((t_6 + (0.5d0 / (t_11 * sqrt((1.0d0 / t_11))))) - t_8) + t_16
          else if (t_18 <= 2.0d0) then
              tmp = ((t_6 + sqrt((1.0d0 + t_13))) - (t_8 + t_17)) + t_16
          else if (t_18 <= 2.9999999d0) then
              tmp = t_7 + ((sqrt((t_11 - (-1.0d0))) + sqrt((t_13 - (-1.0d0)))) - ((t_12 + t_17) + t_8))
          else
              tmp = ((sqrt((t_14 - (-1.0d0))) - t_15) + ((t_7 - t_8) - (t_17 - 2.0d0))) - t_12
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = fmax(fmin(x, y), z);
      	double t_2 = fmax(fmax(x, y), t_1);
      	double t_3 = fmin(fmax(x, y), t_1);
      	double t_4 = fmin(fmin(x, y), z);
      	double t_5 = fmin(t_4, t);
      	double t_6 = Math.sqrt((1.0 + t_5));
      	double t_7 = Math.sqrt((t_5 - -1.0));
      	double t_8 = Math.sqrt(t_5);
      	double t_9 = fmax(t_4, t);
      	double t_10 = fmax(t_3, t_9);
      	double t_11 = fmin(t_2, t_10);
      	double t_12 = Math.sqrt(t_11);
      	double t_13 = fmin(t_3, t_9);
      	double t_14 = fmax(t_2, t_10);
      	double t_15 = Math.sqrt(t_14);
      	double t_16 = Math.sqrt((t_14 + 1.0)) - t_15;
      	double t_17 = Math.sqrt(t_13);
      	double t_18 = (((Math.sqrt((t_5 + 1.0)) - t_8) + (Math.sqrt((t_13 + 1.0)) - t_17)) + (Math.sqrt((t_11 + 1.0)) - t_12)) + t_16;
      	double tmp;
      	if (t_18 <= 1.00000002) {
      		tmp = ((t_6 + (0.5 / (t_11 * Math.sqrt((1.0 / t_11))))) - t_8) + t_16;
      	} else if (t_18 <= 2.0) {
      		tmp = ((t_6 + Math.sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16;
      	} else if (t_18 <= 2.9999999) {
      		tmp = t_7 + ((Math.sqrt((t_11 - -1.0)) + Math.sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8));
      	} else {
      		tmp = ((Math.sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = fmax(fmin(x, y), z)
      	t_2 = fmax(fmax(x, y), t_1)
      	t_3 = fmin(fmax(x, y), t_1)
      	t_4 = fmin(fmin(x, y), z)
      	t_5 = fmin(t_4, t)
      	t_6 = math.sqrt((1.0 + t_5))
      	t_7 = math.sqrt((t_5 - -1.0))
      	t_8 = math.sqrt(t_5)
      	t_9 = fmax(t_4, t)
      	t_10 = fmax(t_3, t_9)
      	t_11 = fmin(t_2, t_10)
      	t_12 = math.sqrt(t_11)
      	t_13 = fmin(t_3, t_9)
      	t_14 = fmax(t_2, t_10)
      	t_15 = math.sqrt(t_14)
      	t_16 = math.sqrt((t_14 + 1.0)) - t_15
      	t_17 = math.sqrt(t_13)
      	t_18 = (((math.sqrt((t_5 + 1.0)) - t_8) + (math.sqrt((t_13 + 1.0)) - t_17)) + (math.sqrt((t_11 + 1.0)) - t_12)) + t_16
      	tmp = 0
      	if t_18 <= 1.00000002:
      		tmp = ((t_6 + (0.5 / (t_11 * math.sqrt((1.0 / t_11))))) - t_8) + t_16
      	elif t_18 <= 2.0:
      		tmp = ((t_6 + math.sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16
      	elif t_18 <= 2.9999999:
      		tmp = t_7 + ((math.sqrt((t_11 - -1.0)) + math.sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8))
      	else:
      		tmp = ((math.sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = fmax(fmin(x, y), z)
      	t_2 = fmax(fmax(x, y), t_1)
      	t_3 = fmin(fmax(x, y), t_1)
      	t_4 = fmin(fmin(x, y), z)
      	t_5 = fmin(t_4, t)
      	t_6 = sqrt(Float64(1.0 + t_5))
      	t_7 = sqrt(Float64(t_5 - -1.0))
      	t_8 = sqrt(t_5)
      	t_9 = fmax(t_4, t)
      	t_10 = fmax(t_3, t_9)
      	t_11 = fmin(t_2, t_10)
      	t_12 = sqrt(t_11)
      	t_13 = fmin(t_3, t_9)
      	t_14 = fmax(t_2, t_10)
      	t_15 = sqrt(t_14)
      	t_16 = Float64(sqrt(Float64(t_14 + 1.0)) - t_15)
      	t_17 = sqrt(t_13)
      	t_18 = Float64(Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - t_8) + Float64(sqrt(Float64(t_13 + 1.0)) - t_17)) + Float64(sqrt(Float64(t_11 + 1.0)) - t_12)) + t_16)
      	tmp = 0.0
      	if (t_18 <= 1.00000002)
      		tmp = Float64(Float64(Float64(t_6 + Float64(0.5 / Float64(t_11 * sqrt(Float64(1.0 / t_11))))) - t_8) + t_16);
      	elseif (t_18 <= 2.0)
      		tmp = Float64(Float64(Float64(t_6 + sqrt(Float64(1.0 + t_13))) - Float64(t_8 + t_17)) + t_16);
      	elseif (t_18 <= 2.9999999)
      		tmp = Float64(t_7 + Float64(Float64(sqrt(Float64(t_11 - -1.0)) + sqrt(Float64(t_13 - -1.0))) - Float64(Float64(t_12 + t_17) + t_8)));
      	else
      		tmp = Float64(Float64(Float64(sqrt(Float64(t_14 - -1.0)) - t_15) + Float64(Float64(t_7 - t_8) - Float64(t_17 - 2.0))) - t_12);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = max(min(x, y), z);
      	t_2 = max(max(x, y), t_1);
      	t_3 = min(max(x, y), t_1);
      	t_4 = min(min(x, y), z);
      	t_5 = min(t_4, t);
      	t_6 = sqrt((1.0 + t_5));
      	t_7 = sqrt((t_5 - -1.0));
      	t_8 = sqrt(t_5);
      	t_9 = max(t_4, t);
      	t_10 = max(t_3, t_9);
      	t_11 = min(t_2, t_10);
      	t_12 = sqrt(t_11);
      	t_13 = min(t_3, t_9);
      	t_14 = max(t_2, t_10);
      	t_15 = sqrt(t_14);
      	t_16 = sqrt((t_14 + 1.0)) - t_15;
      	t_17 = sqrt(t_13);
      	t_18 = (((sqrt((t_5 + 1.0)) - t_8) + (sqrt((t_13 + 1.0)) - t_17)) + (sqrt((t_11 + 1.0)) - t_12)) + t_16;
      	tmp = 0.0;
      	if (t_18 <= 1.00000002)
      		tmp = ((t_6 + (0.5 / (t_11 * sqrt((1.0 / t_11))))) - t_8) + t_16;
      	elseif (t_18 <= 2.0)
      		tmp = ((t_6 + sqrt((1.0 + t_13))) - (t_8 + t_17)) + t_16;
      	elseif (t_18 <= 2.9999999)
      		tmp = t_7 + ((sqrt((t_11 - -1.0)) + sqrt((t_13 - -1.0))) - ((t_12 + t_17) + t_8));
      	else
      		tmp = ((sqrt((t_14 - -1.0)) - t_15) + ((t_7 - t_8) - (t_17 - 2.0))) - t_12;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$4, t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[Sqrt[t$95$5], $MachinePrecision]}, Block[{t$95$9 = N[Max[t$95$4, t], $MachinePrecision]}, Block[{t$95$10 = N[Max[t$95$3, t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Min[t$95$2, t$95$10], $MachinePrecision]}, Block[{t$95$12 = N[Sqrt[t$95$11], $MachinePrecision]}, Block[{t$95$13 = N[Min[t$95$3, t$95$9], $MachinePrecision]}, Block[{t$95$14 = N[Max[t$95$2, t$95$10], $MachinePrecision]}, Block[{t$95$15 = N[Sqrt[t$95$14], $MachinePrecision]}, Block[{t$95$16 = N[(N[Sqrt[N[(t$95$14 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$15), $MachinePrecision]}, Block[{t$95$17 = N[Sqrt[t$95$13], $MachinePrecision]}, Block[{t$95$18 = N[(N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$8), $MachinePrecision] + N[(N[Sqrt[N[(t$95$13 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$17), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$11 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$12), $MachinePrecision]), $MachinePrecision] + t$95$16), $MachinePrecision]}, If[LessEqual[t$95$18, 1.00000002], N[(N[(N[(t$95$6 + N[(0.5 / N[(t$95$11 * N[Sqrt[N[(1.0 / t$95$11), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$8), $MachinePrecision] + t$95$16), $MachinePrecision], If[LessEqual[t$95$18, 2.0], N[(N[(N[(t$95$6 + N[Sqrt[N[(1.0 + t$95$13), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t$95$8 + t$95$17), $MachinePrecision]), $MachinePrecision] + t$95$16), $MachinePrecision], If[LessEqual[t$95$18, 2.9999999], N[(t$95$7 + N[(N[(N[Sqrt[N[(t$95$11 - -1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(t$95$13 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$12 + t$95$17), $MachinePrecision] + t$95$8), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(t$95$14 - -1.0), $MachinePrecision]], $MachinePrecision] - t$95$15), $MachinePrecision] + N[(N[(t$95$7 - t$95$8), $MachinePrecision] - N[(t$95$17 - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$12), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]]
      
      \begin{array}{l}
      t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
      t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
      t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
      t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
      t_5 := \mathsf{min}\left(t\_4, t\right)\\
      t_6 := \sqrt{1 + t\_5}\\
      t_7 := \sqrt{t\_5 - -1}\\
      t_8 := \sqrt{t\_5}\\
      t_9 := \mathsf{max}\left(t\_4, t\right)\\
      t_10 := \mathsf{max}\left(t\_3, t\_9\right)\\
      t_11 := \mathsf{min}\left(t\_2, t\_10\right)\\
      t_12 := \sqrt{t\_11}\\
      t_13 := \mathsf{min}\left(t\_3, t\_9\right)\\
      t_14 := \mathsf{max}\left(t\_2, t\_10\right)\\
      t_15 := \sqrt{t\_14}\\
      t_16 := \sqrt{t\_14 + 1} - t\_15\\
      t_17 := \sqrt{t\_13}\\
      t_18 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_8\right) + \left(\sqrt{t\_13 + 1} - t\_17\right)\right) + \left(\sqrt{t\_11 + 1} - t\_12\right)\right) + t\_16\\
      \mathbf{if}\;t\_18 \leq 1.00000002:\\
      \;\;\;\;\left(\left(t\_6 + \frac{0.5}{t\_11 \cdot \sqrt{\frac{1}{t\_11}}}\right) - t\_8\right) + t\_16\\
      
      \mathbf{elif}\;t\_18 \leq 2:\\
      \;\;\;\;\left(\left(t\_6 + \sqrt{1 + t\_13}\right) - \left(t\_8 + t\_17\right)\right) + t\_16\\
      
      \mathbf{elif}\;t\_18 \leq 2.9999999:\\
      \;\;\;\;t\_7 + \left(\left(\sqrt{t\_11 - -1} + \sqrt{t\_13 - -1}\right) - \left(\left(t\_12 + t\_17\right) + t\_8\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(\sqrt{t\_14 - -1} - t\_15\right) + \left(\left(t\_7 - t\_8\right) - \left(t\_17 - 2\right)\right)\right) - t\_12\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 1.0000000200000001

        1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{1 + x} + \frac{0.5}{z \cdot \sqrt{\frac{1}{z}}}\right) - \sqrt{x}\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        10. Applied rewrites25.7%

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

        if 1.0000000200000001 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2

        1. Initial program 91.6%

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          5. lower-sqrt.f64N/A

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

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

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

            \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{\color{blue}{y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          9. lower-sqrt.f6429.5%

            \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
        4. Applied rewrites29.5%

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

        if 2 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2.9999999000000002

        1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
          3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
        9. Applied rewrites12.1%

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

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

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

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

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

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

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

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

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

            \[\leadsto \sqrt{x - \left(\mathsf{neg}\left(1\right)\right)} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
          10. metadata-evalN/A

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

            \[\leadsto \sqrt{x - -1} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
          12. lower--.f6422.5%

            \[\leadsto \sqrt{x - -1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \color{blue}{\left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)}\right) \]
        11. Applied rewrites22.5%

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

        if 2.9999999000000002 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

        1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
          3. lower-+.f6432.1%

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

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

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

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

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

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

            \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - \left(1 + \sqrt{1 + z}\right)\right)\right)\right) - \sqrt{z} \]
          5. lower-+.f6427.4%

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

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

          \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - 2\right)\right)\right) - \sqrt{z} \]
        11. Step-by-step derivation
          1. Applied rewrites24.2%

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

        Alternative 10: 91.3% accurate, 0.0× speedup?

        \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_5 := \mathsf{min}\left(t\_4, t\right)\\ t_6 := \sqrt{t\_5}\\ t_7 := \mathsf{max}\left(t\_4, t\right)\\ t_8 := \mathsf{max}\left(t\_3, t\_7\right)\\ t_9 := \mathsf{min}\left(t\_2, t\_8\right)\\ t_10 := \sqrt{t\_9}\\ t_11 := \mathsf{min}\left(t\_3, t\_7\right)\\ t_12 := \mathsf{max}\left(t\_2, t\_8\right)\\ t_13 := \sqrt{t\_12}\\ t_14 := \sqrt{t\_12 + 1} - t\_13\\ t_15 := \sqrt{t\_11}\\ t_16 := \sqrt{t\_5 - -1}\\ t_17 := \sqrt{t\_9 + 1} - t\_10\\ t_18 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_6\right) + \left(\sqrt{t\_11 + 1} - t\_15\right)\right) + t\_17\right) + t\_14\\ t_19 := \sqrt{1 + t\_5}\\ \mathbf{if}\;t\_18 \leq 1.00000002:\\ \;\;\;\;\left(\left(t\_19 - t\_6\right) + t\_17\right) + t\_14\\ \mathbf{elif}\;t\_18 \leq 2:\\ \;\;\;\;\left(\left(t\_19 + \sqrt{1 + t\_11}\right) - \left(t\_6 + t\_15\right)\right) + t\_14\\ \mathbf{elif}\;t\_18 \leq 2.9999999:\\ \;\;\;\;t\_16 + \left(\left(\sqrt{t\_9 - -1} + \sqrt{t\_11 - -1}\right) - \left(\left(t\_10 + t\_15\right) + t\_6\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sqrt{t\_12 - -1} - t\_13\right) + \left(\left(t\_16 - t\_6\right) - \left(t\_15 - 2\right)\right)\right) - t\_10\\ \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (let* ((t_1 (fmax (fmin x y) z))
                (t_2 (fmax (fmax x y) t_1))
                (t_3 (fmin (fmax x y) t_1))
                (t_4 (fmin (fmin x y) z))
                (t_5 (fmin t_4 t))
                (t_6 (sqrt t_5))
                (t_7 (fmax t_4 t))
                (t_8 (fmax t_3 t_7))
                (t_9 (fmin t_2 t_8))
                (t_10 (sqrt t_9))
                (t_11 (fmin t_3 t_7))
                (t_12 (fmax t_2 t_8))
                (t_13 (sqrt t_12))
                (t_14 (- (sqrt (+ t_12 1.0)) t_13))
                (t_15 (sqrt t_11))
                (t_16 (sqrt (- t_5 -1.0)))
                (t_17 (- (sqrt (+ t_9 1.0)) t_10))
                (t_18
                 (+
                  (+ (+ (- (sqrt (+ t_5 1.0)) t_6) (- (sqrt (+ t_11 1.0)) t_15)) t_17)
                  t_14))
                (t_19 (sqrt (+ 1.0 t_5))))
           (if (<= t_18 1.00000002)
             (+ (+ (- t_19 t_6) t_17) t_14)
             (if (<= t_18 2.0)
               (+ (- (+ t_19 (sqrt (+ 1.0 t_11))) (+ t_6 t_15)) t_14)
               (if (<= t_18 2.9999999)
                 (+
                  t_16
                  (-
                   (+ (sqrt (- t_9 -1.0)) (sqrt (- t_11 -1.0)))
                   (+ (+ t_10 t_15) t_6)))
                 (-
                  (+ (- (sqrt (- t_12 -1.0)) t_13) (- (- t_16 t_6) (- t_15 2.0)))
                  t_10))))))
        double code(double x, double y, double z, double t) {
        	double t_1 = fmax(fmin(x, y), z);
        	double t_2 = fmax(fmax(x, y), t_1);
        	double t_3 = fmin(fmax(x, y), t_1);
        	double t_4 = fmin(fmin(x, y), z);
        	double t_5 = fmin(t_4, t);
        	double t_6 = sqrt(t_5);
        	double t_7 = fmax(t_4, t);
        	double t_8 = fmax(t_3, t_7);
        	double t_9 = fmin(t_2, t_8);
        	double t_10 = sqrt(t_9);
        	double t_11 = fmin(t_3, t_7);
        	double t_12 = fmax(t_2, t_8);
        	double t_13 = sqrt(t_12);
        	double t_14 = sqrt((t_12 + 1.0)) - t_13;
        	double t_15 = sqrt(t_11);
        	double t_16 = sqrt((t_5 - -1.0));
        	double t_17 = sqrt((t_9 + 1.0)) - t_10;
        	double t_18 = (((sqrt((t_5 + 1.0)) - t_6) + (sqrt((t_11 + 1.0)) - t_15)) + t_17) + t_14;
        	double t_19 = sqrt((1.0 + t_5));
        	double tmp;
        	if (t_18 <= 1.00000002) {
        		tmp = ((t_19 - t_6) + t_17) + t_14;
        	} else if (t_18 <= 2.0) {
        		tmp = ((t_19 + sqrt((1.0 + t_11))) - (t_6 + t_15)) + t_14;
        	} else if (t_18 <= 2.9999999) {
        		tmp = t_16 + ((sqrt((t_9 - -1.0)) + sqrt((t_11 - -1.0))) - ((t_10 + t_15) + t_6));
        	} else {
        		tmp = ((sqrt((t_12 - -1.0)) - t_13) + ((t_16 - t_6) - (t_15 - 2.0))) - t_10;
        	}
        	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_10
            real(8) :: t_11
            real(8) :: t_12
            real(8) :: t_13
            real(8) :: t_14
            real(8) :: t_15
            real(8) :: t_16
            real(8) :: t_17
            real(8) :: t_18
            real(8) :: t_19
            real(8) :: t_2
            real(8) :: t_3
            real(8) :: t_4
            real(8) :: t_5
            real(8) :: t_6
            real(8) :: t_7
            real(8) :: t_8
            real(8) :: t_9
            real(8) :: tmp
            t_1 = fmax(fmin(x, y), z)
            t_2 = fmax(fmax(x, y), t_1)
            t_3 = fmin(fmax(x, y), t_1)
            t_4 = fmin(fmin(x, y), z)
            t_5 = fmin(t_4, t)
            t_6 = sqrt(t_5)
            t_7 = fmax(t_4, t)
            t_8 = fmax(t_3, t_7)
            t_9 = fmin(t_2, t_8)
            t_10 = sqrt(t_9)
            t_11 = fmin(t_3, t_7)
            t_12 = fmax(t_2, t_8)
            t_13 = sqrt(t_12)
            t_14 = sqrt((t_12 + 1.0d0)) - t_13
            t_15 = sqrt(t_11)
            t_16 = sqrt((t_5 - (-1.0d0)))
            t_17 = sqrt((t_9 + 1.0d0)) - t_10
            t_18 = (((sqrt((t_5 + 1.0d0)) - t_6) + (sqrt((t_11 + 1.0d0)) - t_15)) + t_17) + t_14
            t_19 = sqrt((1.0d0 + t_5))
            if (t_18 <= 1.00000002d0) then
                tmp = ((t_19 - t_6) + t_17) + t_14
            else if (t_18 <= 2.0d0) then
                tmp = ((t_19 + sqrt((1.0d0 + t_11))) - (t_6 + t_15)) + t_14
            else if (t_18 <= 2.9999999d0) then
                tmp = t_16 + ((sqrt((t_9 - (-1.0d0))) + sqrt((t_11 - (-1.0d0)))) - ((t_10 + t_15) + t_6))
            else
                tmp = ((sqrt((t_12 - (-1.0d0))) - t_13) + ((t_16 - t_6) - (t_15 - 2.0d0))) - t_10
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t) {
        	double t_1 = fmax(fmin(x, y), z);
        	double t_2 = fmax(fmax(x, y), t_1);
        	double t_3 = fmin(fmax(x, y), t_1);
        	double t_4 = fmin(fmin(x, y), z);
        	double t_5 = fmin(t_4, t);
        	double t_6 = Math.sqrt(t_5);
        	double t_7 = fmax(t_4, t);
        	double t_8 = fmax(t_3, t_7);
        	double t_9 = fmin(t_2, t_8);
        	double t_10 = Math.sqrt(t_9);
        	double t_11 = fmin(t_3, t_7);
        	double t_12 = fmax(t_2, t_8);
        	double t_13 = Math.sqrt(t_12);
        	double t_14 = Math.sqrt((t_12 + 1.0)) - t_13;
        	double t_15 = Math.sqrt(t_11);
        	double t_16 = Math.sqrt((t_5 - -1.0));
        	double t_17 = Math.sqrt((t_9 + 1.0)) - t_10;
        	double t_18 = (((Math.sqrt((t_5 + 1.0)) - t_6) + (Math.sqrt((t_11 + 1.0)) - t_15)) + t_17) + t_14;
        	double t_19 = Math.sqrt((1.0 + t_5));
        	double tmp;
        	if (t_18 <= 1.00000002) {
        		tmp = ((t_19 - t_6) + t_17) + t_14;
        	} else if (t_18 <= 2.0) {
        		tmp = ((t_19 + Math.sqrt((1.0 + t_11))) - (t_6 + t_15)) + t_14;
        	} else if (t_18 <= 2.9999999) {
        		tmp = t_16 + ((Math.sqrt((t_9 - -1.0)) + Math.sqrt((t_11 - -1.0))) - ((t_10 + t_15) + t_6));
        	} else {
        		tmp = ((Math.sqrt((t_12 - -1.0)) - t_13) + ((t_16 - t_6) - (t_15 - 2.0))) - t_10;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	t_1 = fmax(fmin(x, y), z)
        	t_2 = fmax(fmax(x, y), t_1)
        	t_3 = fmin(fmax(x, y), t_1)
        	t_4 = fmin(fmin(x, y), z)
        	t_5 = fmin(t_4, t)
        	t_6 = math.sqrt(t_5)
        	t_7 = fmax(t_4, t)
        	t_8 = fmax(t_3, t_7)
        	t_9 = fmin(t_2, t_8)
        	t_10 = math.sqrt(t_9)
        	t_11 = fmin(t_3, t_7)
        	t_12 = fmax(t_2, t_8)
        	t_13 = math.sqrt(t_12)
        	t_14 = math.sqrt((t_12 + 1.0)) - t_13
        	t_15 = math.sqrt(t_11)
        	t_16 = math.sqrt((t_5 - -1.0))
        	t_17 = math.sqrt((t_9 + 1.0)) - t_10
        	t_18 = (((math.sqrt((t_5 + 1.0)) - t_6) + (math.sqrt((t_11 + 1.0)) - t_15)) + t_17) + t_14
        	t_19 = math.sqrt((1.0 + t_5))
        	tmp = 0
        	if t_18 <= 1.00000002:
        		tmp = ((t_19 - t_6) + t_17) + t_14
        	elif t_18 <= 2.0:
        		tmp = ((t_19 + math.sqrt((1.0 + t_11))) - (t_6 + t_15)) + t_14
        	elif t_18 <= 2.9999999:
        		tmp = t_16 + ((math.sqrt((t_9 - -1.0)) + math.sqrt((t_11 - -1.0))) - ((t_10 + t_15) + t_6))
        	else:
        		tmp = ((math.sqrt((t_12 - -1.0)) - t_13) + ((t_16 - t_6) - (t_15 - 2.0))) - t_10
        	return tmp
        
        function code(x, y, z, t)
        	t_1 = fmax(fmin(x, y), z)
        	t_2 = fmax(fmax(x, y), t_1)
        	t_3 = fmin(fmax(x, y), t_1)
        	t_4 = fmin(fmin(x, y), z)
        	t_5 = fmin(t_4, t)
        	t_6 = sqrt(t_5)
        	t_7 = fmax(t_4, t)
        	t_8 = fmax(t_3, t_7)
        	t_9 = fmin(t_2, t_8)
        	t_10 = sqrt(t_9)
        	t_11 = fmin(t_3, t_7)
        	t_12 = fmax(t_2, t_8)
        	t_13 = sqrt(t_12)
        	t_14 = Float64(sqrt(Float64(t_12 + 1.0)) - t_13)
        	t_15 = sqrt(t_11)
        	t_16 = sqrt(Float64(t_5 - -1.0))
        	t_17 = Float64(sqrt(Float64(t_9 + 1.0)) - t_10)
        	t_18 = Float64(Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - t_6) + Float64(sqrt(Float64(t_11 + 1.0)) - t_15)) + t_17) + t_14)
        	t_19 = sqrt(Float64(1.0 + t_5))
        	tmp = 0.0
        	if (t_18 <= 1.00000002)
        		tmp = Float64(Float64(Float64(t_19 - t_6) + t_17) + t_14);
        	elseif (t_18 <= 2.0)
        		tmp = Float64(Float64(Float64(t_19 + sqrt(Float64(1.0 + t_11))) - Float64(t_6 + t_15)) + t_14);
        	elseif (t_18 <= 2.9999999)
        		tmp = Float64(t_16 + Float64(Float64(sqrt(Float64(t_9 - -1.0)) + sqrt(Float64(t_11 - -1.0))) - Float64(Float64(t_10 + t_15) + t_6)));
        	else
        		tmp = Float64(Float64(Float64(sqrt(Float64(t_12 - -1.0)) - t_13) + Float64(Float64(t_16 - t_6) - Float64(t_15 - 2.0))) - t_10);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t)
        	t_1 = max(min(x, y), z);
        	t_2 = max(max(x, y), t_1);
        	t_3 = min(max(x, y), t_1);
        	t_4 = min(min(x, y), z);
        	t_5 = min(t_4, t);
        	t_6 = sqrt(t_5);
        	t_7 = max(t_4, t);
        	t_8 = max(t_3, t_7);
        	t_9 = min(t_2, t_8);
        	t_10 = sqrt(t_9);
        	t_11 = min(t_3, t_7);
        	t_12 = max(t_2, t_8);
        	t_13 = sqrt(t_12);
        	t_14 = sqrt((t_12 + 1.0)) - t_13;
        	t_15 = sqrt(t_11);
        	t_16 = sqrt((t_5 - -1.0));
        	t_17 = sqrt((t_9 + 1.0)) - t_10;
        	t_18 = (((sqrt((t_5 + 1.0)) - t_6) + (sqrt((t_11 + 1.0)) - t_15)) + t_17) + t_14;
        	t_19 = sqrt((1.0 + t_5));
        	tmp = 0.0;
        	if (t_18 <= 1.00000002)
        		tmp = ((t_19 - t_6) + t_17) + t_14;
        	elseif (t_18 <= 2.0)
        		tmp = ((t_19 + sqrt((1.0 + t_11))) - (t_6 + t_15)) + t_14;
        	elseif (t_18 <= 2.9999999)
        		tmp = t_16 + ((sqrt((t_9 - -1.0)) + sqrt((t_11 - -1.0))) - ((t_10 + t_15) + t_6));
        	else
        		tmp = ((sqrt((t_12 - -1.0)) - t_13) + ((t_16 - t_6) - (t_15 - 2.0))) - t_10;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$4, t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$5], $MachinePrecision]}, Block[{t$95$7 = N[Max[t$95$4, t], $MachinePrecision]}, Block[{t$95$8 = N[Max[t$95$3, t$95$7], $MachinePrecision]}, Block[{t$95$9 = N[Min[t$95$2, t$95$8], $MachinePrecision]}, Block[{t$95$10 = N[Sqrt[t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Min[t$95$3, t$95$7], $MachinePrecision]}, Block[{t$95$12 = N[Max[t$95$2, t$95$8], $MachinePrecision]}, Block[{t$95$13 = N[Sqrt[t$95$12], $MachinePrecision]}, Block[{t$95$14 = N[(N[Sqrt[N[(t$95$12 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$13), $MachinePrecision]}, Block[{t$95$15 = N[Sqrt[t$95$11], $MachinePrecision]}, Block[{t$95$16 = N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$17 = N[(N[Sqrt[N[(t$95$9 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$10), $MachinePrecision]}, Block[{t$95$18 = N[(N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision] + N[(N[Sqrt[N[(t$95$11 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$15), $MachinePrecision]), $MachinePrecision] + t$95$17), $MachinePrecision] + t$95$14), $MachinePrecision]}, Block[{t$95$19 = N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$18, 1.00000002], N[(N[(N[(t$95$19 - t$95$6), $MachinePrecision] + t$95$17), $MachinePrecision] + t$95$14), $MachinePrecision], If[LessEqual[t$95$18, 2.0], N[(N[(N[(t$95$19 + N[Sqrt[N[(1.0 + t$95$11), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t$95$6 + t$95$15), $MachinePrecision]), $MachinePrecision] + t$95$14), $MachinePrecision], If[LessEqual[t$95$18, 2.9999999], N[(t$95$16 + N[(N[(N[Sqrt[N[(t$95$9 - -1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(t$95$11 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$10 + t$95$15), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sqrt[N[(t$95$12 - -1.0), $MachinePrecision]], $MachinePrecision] - t$95$13), $MachinePrecision] + N[(N[(t$95$16 - t$95$6), $MachinePrecision] - N[(t$95$15 - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$10), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]]]
        
        \begin{array}{l}
        t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
        t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
        t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
        t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
        t_5 := \mathsf{min}\left(t\_4, t\right)\\
        t_6 := \sqrt{t\_5}\\
        t_7 := \mathsf{max}\left(t\_4, t\right)\\
        t_8 := \mathsf{max}\left(t\_3, t\_7\right)\\
        t_9 := \mathsf{min}\left(t\_2, t\_8\right)\\
        t_10 := \sqrt{t\_9}\\
        t_11 := \mathsf{min}\left(t\_3, t\_7\right)\\
        t_12 := \mathsf{max}\left(t\_2, t\_8\right)\\
        t_13 := \sqrt{t\_12}\\
        t_14 := \sqrt{t\_12 + 1} - t\_13\\
        t_15 := \sqrt{t\_11}\\
        t_16 := \sqrt{t\_5 - -1}\\
        t_17 := \sqrt{t\_9 + 1} - t\_10\\
        t_18 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_6\right) + \left(\sqrt{t\_11 + 1} - t\_15\right)\right) + t\_17\right) + t\_14\\
        t_19 := \sqrt{1 + t\_5}\\
        \mathbf{if}\;t\_18 \leq 1.00000002:\\
        \;\;\;\;\left(\left(t\_19 - t\_6\right) + t\_17\right) + t\_14\\
        
        \mathbf{elif}\;t\_18 \leq 2:\\
        \;\;\;\;\left(\left(t\_19 + \sqrt{1 + t\_11}\right) - \left(t\_6 + t\_15\right)\right) + t\_14\\
        
        \mathbf{elif}\;t\_18 \leq 2.9999999:\\
        \;\;\;\;t\_16 + \left(\left(\sqrt{t\_9 - -1} + \sqrt{t\_11 - -1}\right) - \left(\left(t\_10 + t\_15\right) + t\_6\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\sqrt{t\_12 - -1} - t\_13\right) + \left(\left(t\_16 - t\_6\right) - \left(t\_15 - 2\right)\right)\right) - t\_10\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 1.0000000200000001

          1. Initial program 91.6%

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

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

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

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

              \[\leadsto \left(\left(\sqrt{1 + x} - \sqrt{x}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. lower-sqrt.f6450.6%

              \[\leadsto \left(\left(\sqrt{1 + x} - \sqrt{x}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. Applied rewrites50.6%

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

          if 1.0000000200000001 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2

          1. Initial program 91.6%

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

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

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

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

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

              \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. lower-sqrt.f64N/A

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

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

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

              \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{\color{blue}{y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            9. lower-sqrt.f6429.5%

              \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. Applied rewrites29.5%

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

          if 2 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2.9999999000000002

          1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
            3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
          9. Applied rewrites12.1%

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

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

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

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

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

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

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

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

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

              \[\leadsto \sqrt{x - \left(\mathsf{neg}\left(1\right)\right)} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
            10. metadata-evalN/A

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

              \[\leadsto \sqrt{x - -1} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
            12. lower--.f6422.5%

              \[\leadsto \sqrt{x - -1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \color{blue}{\left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)}\right) \]
          11. Applied rewrites22.5%

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

          if 2.9999999000000002 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

          1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
            3. lower-+.f6432.1%

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

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

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

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

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

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

              \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - \left(1 + \sqrt{1 + z}\right)\right)\right)\right) - \sqrt{z} \]
            5. lower-+.f6427.4%

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

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

            \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\sqrt{y} - 2\right)\right)\right) - \sqrt{z} \]
          11. Step-by-step derivation
            1. Applied rewrites24.2%

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

          Alternative 11: 85.7% accurate, 0.1× speedup?

          \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_5 := \mathsf{min}\left(t\_4, t\right)\\ t_6 := \sqrt{t\_5}\\ t_7 := \mathsf{max}\left(t\_4, t\right)\\ t_8 := \mathsf{max}\left(t\_3, t\_7\right)\\ t_9 := \mathsf{min}\left(t\_2, t\_8\right)\\ t_10 := \sqrt{t\_9}\\ t_11 := \mathsf{min}\left(t\_3, t\_7\right)\\ t_12 := \mathsf{max}\left(t\_2, t\_8\right)\\ t_13 := \sqrt{t\_12 + 1} - \sqrt{t\_12}\\ t_14 := \sqrt{t\_11}\\ t_15 := \sqrt{t\_9 + 1} - t\_10\\ t_16 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_6\right) + \left(\sqrt{t\_11 + 1} - t\_14\right)\right) + t\_15\right) + t\_13\\ t_17 := \sqrt{1 + t\_5}\\ \mathbf{if}\;t\_16 \leq 1.00000002:\\ \;\;\;\;\left(\left(t\_17 - t\_6\right) + t\_15\right) + t\_13\\ \mathbf{elif}\;t\_16 \leq 2:\\ \;\;\;\;\left(\left(t\_17 + \sqrt{1 + t\_11}\right) - \left(t\_6 + t\_14\right)\right) + t\_13\\ \mathbf{else}:\\ \;\;\;\;\left(t\_17 + \left(1 + \sqrt{1 + t\_9}\right)\right) - \left(t\_6 + \left(t\_14 + t\_10\right)\right)\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmax (fmin x y) z))
                  (t_2 (fmax (fmax x y) t_1))
                  (t_3 (fmin (fmax x y) t_1))
                  (t_4 (fmin (fmin x y) z))
                  (t_5 (fmin t_4 t))
                  (t_6 (sqrt t_5))
                  (t_7 (fmax t_4 t))
                  (t_8 (fmax t_3 t_7))
                  (t_9 (fmin t_2 t_8))
                  (t_10 (sqrt t_9))
                  (t_11 (fmin t_3 t_7))
                  (t_12 (fmax t_2 t_8))
                  (t_13 (- (sqrt (+ t_12 1.0)) (sqrt t_12)))
                  (t_14 (sqrt t_11))
                  (t_15 (- (sqrt (+ t_9 1.0)) t_10))
                  (t_16
                   (+
                    (+ (+ (- (sqrt (+ t_5 1.0)) t_6) (- (sqrt (+ t_11 1.0)) t_14)) t_15)
                    t_13))
                  (t_17 (sqrt (+ 1.0 t_5))))
             (if (<= t_16 1.00000002)
               (+ (+ (- t_17 t_6) t_15) t_13)
               (if (<= t_16 2.0)
                 (+ (- (+ t_17 (sqrt (+ 1.0 t_11))) (+ t_6 t_14)) t_13)
                 (- (+ t_17 (+ 1.0 (sqrt (+ 1.0 t_9)))) (+ t_6 (+ t_14 t_10)))))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, y), z);
          	double t_2 = fmax(fmax(x, y), t_1);
          	double t_3 = fmin(fmax(x, y), t_1);
          	double t_4 = fmin(fmin(x, y), z);
          	double t_5 = fmin(t_4, t);
          	double t_6 = sqrt(t_5);
          	double t_7 = fmax(t_4, t);
          	double t_8 = fmax(t_3, t_7);
          	double t_9 = fmin(t_2, t_8);
          	double t_10 = sqrt(t_9);
          	double t_11 = fmin(t_3, t_7);
          	double t_12 = fmax(t_2, t_8);
          	double t_13 = sqrt((t_12 + 1.0)) - sqrt(t_12);
          	double t_14 = sqrt(t_11);
          	double t_15 = sqrt((t_9 + 1.0)) - t_10;
          	double t_16 = (((sqrt((t_5 + 1.0)) - t_6) + (sqrt((t_11 + 1.0)) - t_14)) + t_15) + t_13;
          	double t_17 = sqrt((1.0 + t_5));
          	double tmp;
          	if (t_16 <= 1.00000002) {
          		tmp = ((t_17 - t_6) + t_15) + t_13;
          	} else if (t_16 <= 2.0) {
          		tmp = ((t_17 + sqrt((1.0 + t_11))) - (t_6 + t_14)) + t_13;
          	} else {
          		tmp = (t_17 + (1.0 + sqrt((1.0 + t_9)))) - (t_6 + (t_14 + t_10));
          	}
          	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_10
              real(8) :: t_11
              real(8) :: t_12
              real(8) :: t_13
              real(8) :: t_14
              real(8) :: t_15
              real(8) :: t_16
              real(8) :: t_17
              real(8) :: t_2
              real(8) :: t_3
              real(8) :: t_4
              real(8) :: t_5
              real(8) :: t_6
              real(8) :: t_7
              real(8) :: t_8
              real(8) :: t_9
              real(8) :: tmp
              t_1 = fmax(fmin(x, y), z)
              t_2 = fmax(fmax(x, y), t_1)
              t_3 = fmin(fmax(x, y), t_1)
              t_4 = fmin(fmin(x, y), z)
              t_5 = fmin(t_4, t)
              t_6 = sqrt(t_5)
              t_7 = fmax(t_4, t)
              t_8 = fmax(t_3, t_7)
              t_9 = fmin(t_2, t_8)
              t_10 = sqrt(t_9)
              t_11 = fmin(t_3, t_7)
              t_12 = fmax(t_2, t_8)
              t_13 = sqrt((t_12 + 1.0d0)) - sqrt(t_12)
              t_14 = sqrt(t_11)
              t_15 = sqrt((t_9 + 1.0d0)) - t_10
              t_16 = (((sqrt((t_5 + 1.0d0)) - t_6) + (sqrt((t_11 + 1.0d0)) - t_14)) + t_15) + t_13
              t_17 = sqrt((1.0d0 + t_5))
              if (t_16 <= 1.00000002d0) then
                  tmp = ((t_17 - t_6) + t_15) + t_13
              else if (t_16 <= 2.0d0) then
                  tmp = ((t_17 + sqrt((1.0d0 + t_11))) - (t_6 + t_14)) + t_13
              else
                  tmp = (t_17 + (1.0d0 + sqrt((1.0d0 + t_9)))) - (t_6 + (t_14 + t_10))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, y), z);
          	double t_2 = fmax(fmax(x, y), t_1);
          	double t_3 = fmin(fmax(x, y), t_1);
          	double t_4 = fmin(fmin(x, y), z);
          	double t_5 = fmin(t_4, t);
          	double t_6 = Math.sqrt(t_5);
          	double t_7 = fmax(t_4, t);
          	double t_8 = fmax(t_3, t_7);
          	double t_9 = fmin(t_2, t_8);
          	double t_10 = Math.sqrt(t_9);
          	double t_11 = fmin(t_3, t_7);
          	double t_12 = fmax(t_2, t_8);
          	double t_13 = Math.sqrt((t_12 + 1.0)) - Math.sqrt(t_12);
          	double t_14 = Math.sqrt(t_11);
          	double t_15 = Math.sqrt((t_9 + 1.0)) - t_10;
          	double t_16 = (((Math.sqrt((t_5 + 1.0)) - t_6) + (Math.sqrt((t_11 + 1.0)) - t_14)) + t_15) + t_13;
          	double t_17 = Math.sqrt((1.0 + t_5));
          	double tmp;
          	if (t_16 <= 1.00000002) {
          		tmp = ((t_17 - t_6) + t_15) + t_13;
          	} else if (t_16 <= 2.0) {
          		tmp = ((t_17 + Math.sqrt((1.0 + t_11))) - (t_6 + t_14)) + t_13;
          	} else {
          		tmp = (t_17 + (1.0 + Math.sqrt((1.0 + t_9)))) - (t_6 + (t_14 + t_10));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmax(fmin(x, y), z)
          	t_2 = fmax(fmax(x, y), t_1)
          	t_3 = fmin(fmax(x, y), t_1)
          	t_4 = fmin(fmin(x, y), z)
          	t_5 = fmin(t_4, t)
          	t_6 = math.sqrt(t_5)
          	t_7 = fmax(t_4, t)
          	t_8 = fmax(t_3, t_7)
          	t_9 = fmin(t_2, t_8)
          	t_10 = math.sqrt(t_9)
          	t_11 = fmin(t_3, t_7)
          	t_12 = fmax(t_2, t_8)
          	t_13 = math.sqrt((t_12 + 1.0)) - math.sqrt(t_12)
          	t_14 = math.sqrt(t_11)
          	t_15 = math.sqrt((t_9 + 1.0)) - t_10
          	t_16 = (((math.sqrt((t_5 + 1.0)) - t_6) + (math.sqrt((t_11 + 1.0)) - t_14)) + t_15) + t_13
          	t_17 = math.sqrt((1.0 + t_5))
          	tmp = 0
          	if t_16 <= 1.00000002:
          		tmp = ((t_17 - t_6) + t_15) + t_13
          	elif t_16 <= 2.0:
          		tmp = ((t_17 + math.sqrt((1.0 + t_11))) - (t_6 + t_14)) + t_13
          	else:
          		tmp = (t_17 + (1.0 + math.sqrt((1.0 + t_9)))) - (t_6 + (t_14 + t_10))
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmax(fmin(x, y), z)
          	t_2 = fmax(fmax(x, y), t_1)
          	t_3 = fmin(fmax(x, y), t_1)
          	t_4 = fmin(fmin(x, y), z)
          	t_5 = fmin(t_4, t)
          	t_6 = sqrt(t_5)
          	t_7 = fmax(t_4, t)
          	t_8 = fmax(t_3, t_7)
          	t_9 = fmin(t_2, t_8)
          	t_10 = sqrt(t_9)
          	t_11 = fmin(t_3, t_7)
          	t_12 = fmax(t_2, t_8)
          	t_13 = Float64(sqrt(Float64(t_12 + 1.0)) - sqrt(t_12))
          	t_14 = sqrt(t_11)
          	t_15 = Float64(sqrt(Float64(t_9 + 1.0)) - t_10)
          	t_16 = Float64(Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - t_6) + Float64(sqrt(Float64(t_11 + 1.0)) - t_14)) + t_15) + t_13)
          	t_17 = sqrt(Float64(1.0 + t_5))
          	tmp = 0.0
          	if (t_16 <= 1.00000002)
          		tmp = Float64(Float64(Float64(t_17 - t_6) + t_15) + t_13);
          	elseif (t_16 <= 2.0)
          		tmp = Float64(Float64(Float64(t_17 + sqrt(Float64(1.0 + t_11))) - Float64(t_6 + t_14)) + t_13);
          	else
          		tmp = Float64(Float64(t_17 + Float64(1.0 + sqrt(Float64(1.0 + t_9)))) - Float64(t_6 + Float64(t_14 + t_10)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = max(min(x, y), z);
          	t_2 = max(max(x, y), t_1);
          	t_3 = min(max(x, y), t_1);
          	t_4 = min(min(x, y), z);
          	t_5 = min(t_4, t);
          	t_6 = sqrt(t_5);
          	t_7 = max(t_4, t);
          	t_8 = max(t_3, t_7);
          	t_9 = min(t_2, t_8);
          	t_10 = sqrt(t_9);
          	t_11 = min(t_3, t_7);
          	t_12 = max(t_2, t_8);
          	t_13 = sqrt((t_12 + 1.0)) - sqrt(t_12);
          	t_14 = sqrt(t_11);
          	t_15 = sqrt((t_9 + 1.0)) - t_10;
          	t_16 = (((sqrt((t_5 + 1.0)) - t_6) + (sqrt((t_11 + 1.0)) - t_14)) + t_15) + t_13;
          	t_17 = sqrt((1.0 + t_5));
          	tmp = 0.0;
          	if (t_16 <= 1.00000002)
          		tmp = ((t_17 - t_6) + t_15) + t_13;
          	elseif (t_16 <= 2.0)
          		tmp = ((t_17 + sqrt((1.0 + t_11))) - (t_6 + t_14)) + t_13;
          	else
          		tmp = (t_17 + (1.0 + sqrt((1.0 + t_9)))) - (t_6 + (t_14 + t_10));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$4, t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$5], $MachinePrecision]}, Block[{t$95$7 = N[Max[t$95$4, t], $MachinePrecision]}, Block[{t$95$8 = N[Max[t$95$3, t$95$7], $MachinePrecision]}, Block[{t$95$9 = N[Min[t$95$2, t$95$8], $MachinePrecision]}, Block[{t$95$10 = N[Sqrt[t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Min[t$95$3, t$95$7], $MachinePrecision]}, Block[{t$95$12 = N[Max[t$95$2, t$95$8], $MachinePrecision]}, Block[{t$95$13 = N[(N[Sqrt[N[(t$95$12 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$12], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$14 = N[Sqrt[t$95$11], $MachinePrecision]}, Block[{t$95$15 = N[(N[Sqrt[N[(t$95$9 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$10), $MachinePrecision]}, Block[{t$95$16 = N[(N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision] + N[(N[Sqrt[N[(t$95$11 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision] + t$95$15), $MachinePrecision] + t$95$13), $MachinePrecision]}, Block[{t$95$17 = N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$16, 1.00000002], N[(N[(N[(t$95$17 - t$95$6), $MachinePrecision] + t$95$15), $MachinePrecision] + t$95$13), $MachinePrecision], If[LessEqual[t$95$16, 2.0], N[(N[(N[(t$95$17 + N[Sqrt[N[(1.0 + t$95$11), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t$95$6 + t$95$14), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision], N[(N[(t$95$17 + N[(1.0 + N[Sqrt[N[(1.0 + t$95$9), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 + N[(t$95$14 + t$95$10), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
          t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
          t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
          t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
          t_5 := \mathsf{min}\left(t\_4, t\right)\\
          t_6 := \sqrt{t\_5}\\
          t_7 := \mathsf{max}\left(t\_4, t\right)\\
          t_8 := \mathsf{max}\left(t\_3, t\_7\right)\\
          t_9 := \mathsf{min}\left(t\_2, t\_8\right)\\
          t_10 := \sqrt{t\_9}\\
          t_11 := \mathsf{min}\left(t\_3, t\_7\right)\\
          t_12 := \mathsf{max}\left(t\_2, t\_8\right)\\
          t_13 := \sqrt{t\_12 + 1} - \sqrt{t\_12}\\
          t_14 := \sqrt{t\_11}\\
          t_15 := \sqrt{t\_9 + 1} - t\_10\\
          t_16 := \left(\left(\left(\sqrt{t\_5 + 1} - t\_6\right) + \left(\sqrt{t\_11 + 1} - t\_14\right)\right) + t\_15\right) + t\_13\\
          t_17 := \sqrt{1 + t\_5}\\
          \mathbf{if}\;t\_16 \leq 1.00000002:\\
          \;\;\;\;\left(\left(t\_17 - t\_6\right) + t\_15\right) + t\_13\\
          
          \mathbf{elif}\;t\_16 \leq 2:\\
          \;\;\;\;\left(\left(t\_17 + \sqrt{1 + t\_11}\right) - \left(t\_6 + t\_14\right)\right) + t\_13\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(t\_17 + \left(1 + \sqrt{1 + t\_9}\right)\right) - \left(t\_6 + \left(t\_14 + t\_10\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 1.0000000200000001

            1. Initial program 91.6%

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

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} - \sqrt{x}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. lower-sqrt.f6450.6%

                \[\leadsto \left(\left(\sqrt{1 + x} - \sqrt{x}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Applied rewrites50.6%

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

            if 1.0000000200000001 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t))) < 2

            1. Initial program 91.6%

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. lower-sqrt.f64N/A

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{\color{blue}{y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              9. lower-sqrt.f6429.5%

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Applied rewrites29.5%

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

            if 2 < (+.f64 (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) (-.f64 (sqrt.f64 (+.f64 t #s(literal 1 binary64))) (sqrt.f64 t)))

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            11. Step-by-step derivation
              1. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-+.f6410.6%

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

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

          Alternative 12: 84.5% accurate, 0.1× speedup?

          \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \sqrt{t\_2}\\ t_4 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_5 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_6 := \mathsf{min}\left(t\_5, t\right)\\ t_7 := \sqrt{t\_6}\\ t_8 := \sqrt{1 + t\_6}\\ t_9 := \mathsf{max}\left(t\_5, t\right)\\ t_10 := \mathsf{min}\left(t\_4, t\_9\right)\\ t_11 := \mathsf{max}\left(t\_4, t\_9\right)\\ t_12 := \sqrt{t\_10}\\ t_13 := \left(\left(\sqrt{t\_6 + 1} - t\_7\right) + \left(\sqrt{t\_10 + 1} - t\_12\right)\right) + \left(\sqrt{t\_2 + 1} - t\_3\right)\\ \mathbf{if}\;t\_13 \leq 1.00000002:\\ \;\;\;\;\sqrt{t\_6 - -1} + \left(\left(\sqrt{t\_2 - -1} + \sqrt{t\_10 - -1}\right) - \left(\left(t\_3 + t\_12\right) + t\_7\right)\right)\\ \mathbf{elif}\;t\_13 \leq 2:\\ \;\;\;\;\left(\left(t\_8 + \sqrt{1 + t\_10}\right) - \left(t\_7 + t\_12\right)\right) + \left(\sqrt{t\_11 + 1} - \sqrt{t\_11}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_8 + \left(1 + \sqrt{1 + t\_2}\right)\right) - \left(t\_7 + \left(t\_12 + t\_3\right)\right)\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmax (fmin x y) z))
                  (t_2 (fmax (fmax x y) t_1))
                  (t_3 (sqrt t_2))
                  (t_4 (fmin (fmax x y) t_1))
                  (t_5 (fmin (fmin x y) z))
                  (t_6 (fmin t_5 t))
                  (t_7 (sqrt t_6))
                  (t_8 (sqrt (+ 1.0 t_6)))
                  (t_9 (fmax t_5 t))
                  (t_10 (fmin t_4 t_9))
                  (t_11 (fmax t_4 t_9))
                  (t_12 (sqrt t_10))
                  (t_13
                   (+
                    (+ (- (sqrt (+ t_6 1.0)) t_7) (- (sqrt (+ t_10 1.0)) t_12))
                    (- (sqrt (+ t_2 1.0)) t_3))))
             (if (<= t_13 1.00000002)
               (+
                (sqrt (- t_6 -1.0))
                (- (+ (sqrt (- t_2 -1.0)) (sqrt (- t_10 -1.0))) (+ (+ t_3 t_12) t_7)))
               (if (<= t_13 2.0)
                 (+
                  (- (+ t_8 (sqrt (+ 1.0 t_10))) (+ t_7 t_12))
                  (- (sqrt (+ t_11 1.0)) (sqrt t_11)))
                 (- (+ t_8 (+ 1.0 (sqrt (+ 1.0 t_2)))) (+ t_7 (+ t_12 t_3)))))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, y), z);
          	double t_2 = fmax(fmax(x, y), t_1);
          	double t_3 = sqrt(t_2);
          	double t_4 = fmin(fmax(x, y), t_1);
          	double t_5 = fmin(fmin(x, y), z);
          	double t_6 = fmin(t_5, t);
          	double t_7 = sqrt(t_6);
          	double t_8 = sqrt((1.0 + t_6));
          	double t_9 = fmax(t_5, t);
          	double t_10 = fmin(t_4, t_9);
          	double t_11 = fmax(t_4, t_9);
          	double t_12 = sqrt(t_10);
          	double t_13 = ((sqrt((t_6 + 1.0)) - t_7) + (sqrt((t_10 + 1.0)) - t_12)) + (sqrt((t_2 + 1.0)) - t_3);
          	double tmp;
          	if (t_13 <= 1.00000002) {
          		tmp = sqrt((t_6 - -1.0)) + ((sqrt((t_2 - -1.0)) + sqrt((t_10 - -1.0))) - ((t_3 + t_12) + t_7));
          	} else if (t_13 <= 2.0) {
          		tmp = ((t_8 + sqrt((1.0 + t_10))) - (t_7 + t_12)) + (sqrt((t_11 + 1.0)) - sqrt(t_11));
          	} else {
          		tmp = (t_8 + (1.0 + sqrt((1.0 + t_2)))) - (t_7 + (t_12 + t_3));
          	}
          	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_10
              real(8) :: t_11
              real(8) :: t_12
              real(8) :: t_13
              real(8) :: t_2
              real(8) :: t_3
              real(8) :: t_4
              real(8) :: t_5
              real(8) :: t_6
              real(8) :: t_7
              real(8) :: t_8
              real(8) :: t_9
              real(8) :: tmp
              t_1 = fmax(fmin(x, y), z)
              t_2 = fmax(fmax(x, y), t_1)
              t_3 = sqrt(t_2)
              t_4 = fmin(fmax(x, y), t_1)
              t_5 = fmin(fmin(x, y), z)
              t_6 = fmin(t_5, t)
              t_7 = sqrt(t_6)
              t_8 = sqrt((1.0d0 + t_6))
              t_9 = fmax(t_5, t)
              t_10 = fmin(t_4, t_9)
              t_11 = fmax(t_4, t_9)
              t_12 = sqrt(t_10)
              t_13 = ((sqrt((t_6 + 1.0d0)) - t_7) + (sqrt((t_10 + 1.0d0)) - t_12)) + (sqrt((t_2 + 1.0d0)) - t_3)
              if (t_13 <= 1.00000002d0) then
                  tmp = sqrt((t_6 - (-1.0d0))) + ((sqrt((t_2 - (-1.0d0))) + sqrt((t_10 - (-1.0d0)))) - ((t_3 + t_12) + t_7))
              else if (t_13 <= 2.0d0) then
                  tmp = ((t_8 + sqrt((1.0d0 + t_10))) - (t_7 + t_12)) + (sqrt((t_11 + 1.0d0)) - sqrt(t_11))
              else
                  tmp = (t_8 + (1.0d0 + sqrt((1.0d0 + t_2)))) - (t_7 + (t_12 + t_3))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, y), z);
          	double t_2 = fmax(fmax(x, y), t_1);
          	double t_3 = Math.sqrt(t_2);
          	double t_4 = fmin(fmax(x, y), t_1);
          	double t_5 = fmin(fmin(x, y), z);
          	double t_6 = fmin(t_5, t);
          	double t_7 = Math.sqrt(t_6);
          	double t_8 = Math.sqrt((1.0 + t_6));
          	double t_9 = fmax(t_5, t);
          	double t_10 = fmin(t_4, t_9);
          	double t_11 = fmax(t_4, t_9);
          	double t_12 = Math.sqrt(t_10);
          	double t_13 = ((Math.sqrt((t_6 + 1.0)) - t_7) + (Math.sqrt((t_10 + 1.0)) - t_12)) + (Math.sqrt((t_2 + 1.0)) - t_3);
          	double tmp;
          	if (t_13 <= 1.00000002) {
          		tmp = Math.sqrt((t_6 - -1.0)) + ((Math.sqrt((t_2 - -1.0)) + Math.sqrt((t_10 - -1.0))) - ((t_3 + t_12) + t_7));
          	} else if (t_13 <= 2.0) {
          		tmp = ((t_8 + Math.sqrt((1.0 + t_10))) - (t_7 + t_12)) + (Math.sqrt((t_11 + 1.0)) - Math.sqrt(t_11));
          	} else {
          		tmp = (t_8 + (1.0 + Math.sqrt((1.0 + t_2)))) - (t_7 + (t_12 + t_3));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmax(fmin(x, y), z)
          	t_2 = fmax(fmax(x, y), t_1)
          	t_3 = math.sqrt(t_2)
          	t_4 = fmin(fmax(x, y), t_1)
          	t_5 = fmin(fmin(x, y), z)
          	t_6 = fmin(t_5, t)
          	t_7 = math.sqrt(t_6)
          	t_8 = math.sqrt((1.0 + t_6))
          	t_9 = fmax(t_5, t)
          	t_10 = fmin(t_4, t_9)
          	t_11 = fmax(t_4, t_9)
          	t_12 = math.sqrt(t_10)
          	t_13 = ((math.sqrt((t_6 + 1.0)) - t_7) + (math.sqrt((t_10 + 1.0)) - t_12)) + (math.sqrt((t_2 + 1.0)) - t_3)
          	tmp = 0
          	if t_13 <= 1.00000002:
          		tmp = math.sqrt((t_6 - -1.0)) + ((math.sqrt((t_2 - -1.0)) + math.sqrt((t_10 - -1.0))) - ((t_3 + t_12) + t_7))
          	elif t_13 <= 2.0:
          		tmp = ((t_8 + math.sqrt((1.0 + t_10))) - (t_7 + t_12)) + (math.sqrt((t_11 + 1.0)) - math.sqrt(t_11))
          	else:
          		tmp = (t_8 + (1.0 + math.sqrt((1.0 + t_2)))) - (t_7 + (t_12 + t_3))
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmax(fmin(x, y), z)
          	t_2 = fmax(fmax(x, y), t_1)
          	t_3 = sqrt(t_2)
          	t_4 = fmin(fmax(x, y), t_1)
          	t_5 = fmin(fmin(x, y), z)
          	t_6 = fmin(t_5, t)
          	t_7 = sqrt(t_6)
          	t_8 = sqrt(Float64(1.0 + t_6))
          	t_9 = fmax(t_5, t)
          	t_10 = fmin(t_4, t_9)
          	t_11 = fmax(t_4, t_9)
          	t_12 = sqrt(t_10)
          	t_13 = Float64(Float64(Float64(sqrt(Float64(t_6 + 1.0)) - t_7) + Float64(sqrt(Float64(t_10 + 1.0)) - t_12)) + Float64(sqrt(Float64(t_2 + 1.0)) - t_3))
          	tmp = 0.0
          	if (t_13 <= 1.00000002)
          		tmp = Float64(sqrt(Float64(t_6 - -1.0)) + Float64(Float64(sqrt(Float64(t_2 - -1.0)) + sqrt(Float64(t_10 - -1.0))) - Float64(Float64(t_3 + t_12) + t_7)));
          	elseif (t_13 <= 2.0)
          		tmp = Float64(Float64(Float64(t_8 + sqrt(Float64(1.0 + t_10))) - Float64(t_7 + t_12)) + Float64(sqrt(Float64(t_11 + 1.0)) - sqrt(t_11)));
          	else
          		tmp = Float64(Float64(t_8 + Float64(1.0 + sqrt(Float64(1.0 + t_2)))) - Float64(t_7 + Float64(t_12 + t_3)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = max(min(x, y), z);
          	t_2 = max(max(x, y), t_1);
          	t_3 = sqrt(t_2);
          	t_4 = min(max(x, y), t_1);
          	t_5 = min(min(x, y), z);
          	t_6 = min(t_5, t);
          	t_7 = sqrt(t_6);
          	t_8 = sqrt((1.0 + t_6));
          	t_9 = max(t_5, t);
          	t_10 = min(t_4, t_9);
          	t_11 = max(t_4, t_9);
          	t_12 = sqrt(t_10);
          	t_13 = ((sqrt((t_6 + 1.0)) - t_7) + (sqrt((t_10 + 1.0)) - t_12)) + (sqrt((t_2 + 1.0)) - t_3);
          	tmp = 0.0;
          	if (t_13 <= 1.00000002)
          		tmp = sqrt((t_6 - -1.0)) + ((sqrt((t_2 - -1.0)) + sqrt((t_10 - -1.0))) - ((t_3 + t_12) + t_7));
          	elseif (t_13 <= 2.0)
          		tmp = ((t_8 + sqrt((1.0 + t_10))) - (t_7 + t_12)) + (sqrt((t_11 + 1.0)) - sqrt(t_11));
          	else
          		tmp = (t_8 + (1.0 + sqrt((1.0 + t_2)))) - (t_7 + (t_12 + t_3));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$5 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$6 = N[Min[t$95$5, t], $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[t$95$6], $MachinePrecision]}, Block[{t$95$8 = N[Sqrt[N[(1.0 + t$95$6), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$9 = N[Max[t$95$5, t], $MachinePrecision]}, Block[{t$95$10 = N[Min[t$95$4, t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Max[t$95$4, t$95$9], $MachinePrecision]}, Block[{t$95$12 = N[Sqrt[t$95$10], $MachinePrecision]}, Block[{t$95$13 = N[(N[(N[(N[Sqrt[N[(t$95$6 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$7), $MachinePrecision] + N[(N[Sqrt[N[(t$95$10 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$12), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$2 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$13, 1.00000002], N[(N[Sqrt[N[(t$95$6 - -1.0), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Sqrt[N[(t$95$2 - -1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(t$95$10 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 + t$95$12), $MachinePrecision] + t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$13, 2.0], N[(N[(N[(t$95$8 + N[Sqrt[N[(1.0 + t$95$10), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(t$95$7 + t$95$12), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$11 + 1.0), $MachinePrecision]], $MachinePrecision] - N[Sqrt[t$95$11], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$8 + N[(1.0 + N[Sqrt[N[(1.0 + t$95$2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$7 + N[(t$95$12 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
          t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
          t_3 := \sqrt{t\_2}\\
          t_4 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
          t_5 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
          t_6 := \mathsf{min}\left(t\_5, t\right)\\
          t_7 := \sqrt{t\_6}\\
          t_8 := \sqrt{1 + t\_6}\\
          t_9 := \mathsf{max}\left(t\_5, t\right)\\
          t_10 := \mathsf{min}\left(t\_4, t\_9\right)\\
          t_11 := \mathsf{max}\left(t\_4, t\_9\right)\\
          t_12 := \sqrt{t\_10}\\
          t_13 := \left(\left(\sqrt{t\_6 + 1} - t\_7\right) + \left(\sqrt{t\_10 + 1} - t\_12\right)\right) + \left(\sqrt{t\_2 + 1} - t\_3\right)\\
          \mathbf{if}\;t\_13 \leq 1.00000002:\\
          \;\;\;\;\sqrt{t\_6 - -1} + \left(\left(\sqrt{t\_2 - -1} + \sqrt{t\_10 - -1}\right) - \left(\left(t\_3 + t\_12\right) + t\_7\right)\right)\\
          
          \mathbf{elif}\;t\_13 \leq 2:\\
          \;\;\;\;\left(\left(t\_8 + \sqrt{1 + t\_10}\right) - \left(t\_7 + t\_12\right)\right) + \left(\sqrt{t\_11 + 1} - \sqrt{t\_11}\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(t\_8 + \left(1 + \sqrt{1 + t\_2}\right)\right) - \left(t\_7 + \left(t\_12 + t\_3\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 1.0000000200000001

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

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

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

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

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

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

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

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

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

                \[\leadsto \sqrt{x - \left(\mathsf{neg}\left(1\right)\right)} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
              10. metadata-evalN/A

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

                \[\leadsto \sqrt{x - -1} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
              12. lower--.f6422.5%

                \[\leadsto \sqrt{x - -1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \color{blue}{\left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)}\right) \]
            11. Applied rewrites22.5%

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

            if 1.0000000200000001 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 2

            1. Initial program 91.6%

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. lower-sqrt.f64N/A

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{\color{blue}{y}}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              9. lower-sqrt.f6429.5%

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) - \left(\sqrt{x} + \sqrt{y}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Applied rewrites29.5%

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

            if 2 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)))

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            11. Step-by-step derivation
              1. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-+.f6410.6%

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

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

          Alternative 13: 80.6% accurate, 0.1× speedup?

          \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\ t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\ t_5 := \mathsf{min}\left(t\_4, t\right)\\ t_6 := \sqrt{t\_5}\\ t_7 := \sqrt{t\_5 - -1}\\ t_8 := \mathsf{max}\left(t\_4, t\right)\\ t_9 := \mathsf{max}\left(t\_3, t\_8\right)\\ t_10 := \mathsf{min}\left(t\_2, t\_9\right)\\ t_11 := \mathsf{min}\left(t\_3, t\_8\right)\\ t_12 := \mathsf{max}\left(t\_2, t\_9\right)\\ t_13 := \sqrt{t\_11 - -1}\\ t_14 := \sqrt{t\_10}\\ t_15 := \sqrt{t\_11}\\ t_16 := \left(\left(\sqrt{t\_5 + 1} - t\_6\right) + \left(\sqrt{t\_11 + 1} - t\_15\right)\right) + \left(\sqrt{t\_10 + 1} - t\_14\right)\\ \mathbf{if}\;t\_16 \leq 1.8:\\ \;\;\;\;t\_7 + \left(\left(\sqrt{t\_10 - -1} + t\_13\right) - \left(\left(t\_14 + t\_15\right) + t\_6\right)\right)\\ \mathbf{elif}\;t\_16 \leq 2:\\ \;\;\;\;\left(t\_13 + t\_7\right) + \left(\sqrt{t\_12 - -1} - \left(\left(t\_15 + t\_6\right) + \sqrt{t\_12}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t\_5} + \left(1 + \sqrt{1 + t\_10}\right)\right) - \left(t\_6 + \left(t\_15 + t\_14\right)\right)\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmax (fmin x y) z))
                  (t_2 (fmax (fmax x y) t_1))
                  (t_3 (fmin (fmax x y) t_1))
                  (t_4 (fmin (fmin x y) z))
                  (t_5 (fmin t_4 t))
                  (t_6 (sqrt t_5))
                  (t_7 (sqrt (- t_5 -1.0)))
                  (t_8 (fmax t_4 t))
                  (t_9 (fmax t_3 t_8))
                  (t_10 (fmin t_2 t_9))
                  (t_11 (fmin t_3 t_8))
                  (t_12 (fmax t_2 t_9))
                  (t_13 (sqrt (- t_11 -1.0)))
                  (t_14 (sqrt t_10))
                  (t_15 (sqrt t_11))
                  (t_16
                   (+
                    (+ (- (sqrt (+ t_5 1.0)) t_6) (- (sqrt (+ t_11 1.0)) t_15))
                    (- (sqrt (+ t_10 1.0)) t_14))))
             (if (<= t_16 1.8)
               (+ t_7 (- (+ (sqrt (- t_10 -1.0)) t_13) (+ (+ t_14 t_15) t_6)))
               (if (<= t_16 2.0)
                 (+ (+ t_13 t_7) (- (sqrt (- t_12 -1.0)) (+ (+ t_15 t_6) (sqrt t_12))))
                 (-
                  (+ (sqrt (+ 1.0 t_5)) (+ 1.0 (sqrt (+ 1.0 t_10))))
                  (+ t_6 (+ t_15 t_14)))))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, y), z);
          	double t_2 = fmax(fmax(x, y), t_1);
          	double t_3 = fmin(fmax(x, y), t_1);
          	double t_4 = fmin(fmin(x, y), z);
          	double t_5 = fmin(t_4, t);
          	double t_6 = sqrt(t_5);
          	double t_7 = sqrt((t_5 - -1.0));
          	double t_8 = fmax(t_4, t);
          	double t_9 = fmax(t_3, t_8);
          	double t_10 = fmin(t_2, t_9);
          	double t_11 = fmin(t_3, t_8);
          	double t_12 = fmax(t_2, t_9);
          	double t_13 = sqrt((t_11 - -1.0));
          	double t_14 = sqrt(t_10);
          	double t_15 = sqrt(t_11);
          	double t_16 = ((sqrt((t_5 + 1.0)) - t_6) + (sqrt((t_11 + 1.0)) - t_15)) + (sqrt((t_10 + 1.0)) - t_14);
          	double tmp;
          	if (t_16 <= 1.8) {
          		tmp = t_7 + ((sqrt((t_10 - -1.0)) + t_13) - ((t_14 + t_15) + t_6));
          	} else if (t_16 <= 2.0) {
          		tmp = (t_13 + t_7) + (sqrt((t_12 - -1.0)) - ((t_15 + t_6) + sqrt(t_12)));
          	} else {
          		tmp = (sqrt((1.0 + t_5)) + (1.0 + sqrt((1.0 + t_10)))) - (t_6 + (t_15 + t_14));
          	}
          	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_10
              real(8) :: t_11
              real(8) :: t_12
              real(8) :: t_13
              real(8) :: t_14
              real(8) :: t_15
              real(8) :: t_16
              real(8) :: t_2
              real(8) :: t_3
              real(8) :: t_4
              real(8) :: t_5
              real(8) :: t_6
              real(8) :: t_7
              real(8) :: t_8
              real(8) :: t_9
              real(8) :: tmp
              t_1 = fmax(fmin(x, y), z)
              t_2 = fmax(fmax(x, y), t_1)
              t_3 = fmin(fmax(x, y), t_1)
              t_4 = fmin(fmin(x, y), z)
              t_5 = fmin(t_4, t)
              t_6 = sqrt(t_5)
              t_7 = sqrt((t_5 - (-1.0d0)))
              t_8 = fmax(t_4, t)
              t_9 = fmax(t_3, t_8)
              t_10 = fmin(t_2, t_9)
              t_11 = fmin(t_3, t_8)
              t_12 = fmax(t_2, t_9)
              t_13 = sqrt((t_11 - (-1.0d0)))
              t_14 = sqrt(t_10)
              t_15 = sqrt(t_11)
              t_16 = ((sqrt((t_5 + 1.0d0)) - t_6) + (sqrt((t_11 + 1.0d0)) - t_15)) + (sqrt((t_10 + 1.0d0)) - t_14)
              if (t_16 <= 1.8d0) then
                  tmp = t_7 + ((sqrt((t_10 - (-1.0d0))) + t_13) - ((t_14 + t_15) + t_6))
              else if (t_16 <= 2.0d0) then
                  tmp = (t_13 + t_7) + (sqrt((t_12 - (-1.0d0))) - ((t_15 + t_6) + sqrt(t_12)))
              else
                  tmp = (sqrt((1.0d0 + t_5)) + (1.0d0 + sqrt((1.0d0 + t_10)))) - (t_6 + (t_15 + t_14))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, y), z);
          	double t_2 = fmax(fmax(x, y), t_1);
          	double t_3 = fmin(fmax(x, y), t_1);
          	double t_4 = fmin(fmin(x, y), z);
          	double t_5 = fmin(t_4, t);
          	double t_6 = Math.sqrt(t_5);
          	double t_7 = Math.sqrt((t_5 - -1.0));
          	double t_8 = fmax(t_4, t);
          	double t_9 = fmax(t_3, t_8);
          	double t_10 = fmin(t_2, t_9);
          	double t_11 = fmin(t_3, t_8);
          	double t_12 = fmax(t_2, t_9);
          	double t_13 = Math.sqrt((t_11 - -1.0));
          	double t_14 = Math.sqrt(t_10);
          	double t_15 = Math.sqrt(t_11);
          	double t_16 = ((Math.sqrt((t_5 + 1.0)) - t_6) + (Math.sqrt((t_11 + 1.0)) - t_15)) + (Math.sqrt((t_10 + 1.0)) - t_14);
          	double tmp;
          	if (t_16 <= 1.8) {
          		tmp = t_7 + ((Math.sqrt((t_10 - -1.0)) + t_13) - ((t_14 + t_15) + t_6));
          	} else if (t_16 <= 2.0) {
          		tmp = (t_13 + t_7) + (Math.sqrt((t_12 - -1.0)) - ((t_15 + t_6) + Math.sqrt(t_12)));
          	} else {
          		tmp = (Math.sqrt((1.0 + t_5)) + (1.0 + Math.sqrt((1.0 + t_10)))) - (t_6 + (t_15 + t_14));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmax(fmin(x, y), z)
          	t_2 = fmax(fmax(x, y), t_1)
          	t_3 = fmin(fmax(x, y), t_1)
          	t_4 = fmin(fmin(x, y), z)
          	t_5 = fmin(t_4, t)
          	t_6 = math.sqrt(t_5)
          	t_7 = math.sqrt((t_5 - -1.0))
          	t_8 = fmax(t_4, t)
          	t_9 = fmax(t_3, t_8)
          	t_10 = fmin(t_2, t_9)
          	t_11 = fmin(t_3, t_8)
          	t_12 = fmax(t_2, t_9)
          	t_13 = math.sqrt((t_11 - -1.0))
          	t_14 = math.sqrt(t_10)
          	t_15 = math.sqrt(t_11)
          	t_16 = ((math.sqrt((t_5 + 1.0)) - t_6) + (math.sqrt((t_11 + 1.0)) - t_15)) + (math.sqrt((t_10 + 1.0)) - t_14)
          	tmp = 0
          	if t_16 <= 1.8:
          		tmp = t_7 + ((math.sqrt((t_10 - -1.0)) + t_13) - ((t_14 + t_15) + t_6))
          	elif t_16 <= 2.0:
          		tmp = (t_13 + t_7) + (math.sqrt((t_12 - -1.0)) - ((t_15 + t_6) + math.sqrt(t_12)))
          	else:
          		tmp = (math.sqrt((1.0 + t_5)) + (1.0 + math.sqrt((1.0 + t_10)))) - (t_6 + (t_15 + t_14))
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmax(fmin(x, y), z)
          	t_2 = fmax(fmax(x, y), t_1)
          	t_3 = fmin(fmax(x, y), t_1)
          	t_4 = fmin(fmin(x, y), z)
          	t_5 = fmin(t_4, t)
          	t_6 = sqrt(t_5)
          	t_7 = sqrt(Float64(t_5 - -1.0))
          	t_8 = fmax(t_4, t)
          	t_9 = fmax(t_3, t_8)
          	t_10 = fmin(t_2, t_9)
          	t_11 = fmin(t_3, t_8)
          	t_12 = fmax(t_2, t_9)
          	t_13 = sqrt(Float64(t_11 - -1.0))
          	t_14 = sqrt(t_10)
          	t_15 = sqrt(t_11)
          	t_16 = Float64(Float64(Float64(sqrt(Float64(t_5 + 1.0)) - t_6) + Float64(sqrt(Float64(t_11 + 1.0)) - t_15)) + Float64(sqrt(Float64(t_10 + 1.0)) - t_14))
          	tmp = 0.0
          	if (t_16 <= 1.8)
          		tmp = Float64(t_7 + Float64(Float64(sqrt(Float64(t_10 - -1.0)) + t_13) - Float64(Float64(t_14 + t_15) + t_6)));
          	elseif (t_16 <= 2.0)
          		tmp = Float64(Float64(t_13 + t_7) + Float64(sqrt(Float64(t_12 - -1.0)) - Float64(Float64(t_15 + t_6) + sqrt(t_12))));
          	else
          		tmp = Float64(Float64(sqrt(Float64(1.0 + t_5)) + Float64(1.0 + sqrt(Float64(1.0 + t_10)))) - Float64(t_6 + Float64(t_15 + t_14)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = max(min(x, y), z);
          	t_2 = max(max(x, y), t_1);
          	t_3 = min(max(x, y), t_1);
          	t_4 = min(min(x, y), z);
          	t_5 = min(t_4, t);
          	t_6 = sqrt(t_5);
          	t_7 = sqrt((t_5 - -1.0));
          	t_8 = max(t_4, t);
          	t_9 = max(t_3, t_8);
          	t_10 = min(t_2, t_9);
          	t_11 = min(t_3, t_8);
          	t_12 = max(t_2, t_9);
          	t_13 = sqrt((t_11 - -1.0));
          	t_14 = sqrt(t_10);
          	t_15 = sqrt(t_11);
          	t_16 = ((sqrt((t_5 + 1.0)) - t_6) + (sqrt((t_11 + 1.0)) - t_15)) + (sqrt((t_10 + 1.0)) - t_14);
          	tmp = 0.0;
          	if (t_16 <= 1.8)
          		tmp = t_7 + ((sqrt((t_10 - -1.0)) + t_13) - ((t_14 + t_15) + t_6));
          	elseif (t_16 <= 2.0)
          		tmp = (t_13 + t_7) + (sqrt((t_12 - -1.0)) - ((t_15 + t_6) + sqrt(t_12)));
          	else
          		tmp = (sqrt((1.0 + t_5)) + (1.0 + sqrt((1.0 + t_10)))) - (t_6 + (t_15 + t_14));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$1], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Min[x, y], $MachinePrecision], z], $MachinePrecision]}, Block[{t$95$5 = N[Min[t$95$4, t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$5], $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$8 = N[Max[t$95$4, t], $MachinePrecision]}, Block[{t$95$9 = N[Max[t$95$3, t$95$8], $MachinePrecision]}, Block[{t$95$10 = N[Min[t$95$2, t$95$9], $MachinePrecision]}, Block[{t$95$11 = N[Min[t$95$3, t$95$8], $MachinePrecision]}, Block[{t$95$12 = N[Max[t$95$2, t$95$9], $MachinePrecision]}, Block[{t$95$13 = N[Sqrt[N[(t$95$11 - -1.0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$14 = N[Sqrt[t$95$10], $MachinePrecision]}, Block[{t$95$15 = N[Sqrt[t$95$11], $MachinePrecision]}, Block[{t$95$16 = N[(N[(N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision] + N[(N[Sqrt[N[(t$95$11 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$15), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$10 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$16, 1.8], N[(t$95$7 + N[(N[(N[Sqrt[N[(t$95$10 - -1.0), $MachinePrecision]], $MachinePrecision] + t$95$13), $MachinePrecision] - N[(N[(t$95$14 + t$95$15), $MachinePrecision] + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$16, 2.0], N[(N[(t$95$13 + t$95$7), $MachinePrecision] + N[(N[Sqrt[N[(t$95$12 - -1.0), $MachinePrecision]], $MachinePrecision] - N[(N[(t$95$15 + t$95$6), $MachinePrecision] + N[Sqrt[t$95$12], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision] + N[(1.0 + N[Sqrt[N[(1.0 + t$95$10), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 + N[(t$95$15 + t$95$14), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), z\right)\\
          t_2 := \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
          t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_1\right)\\
          t_4 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), z\right)\\
          t_5 := \mathsf{min}\left(t\_4, t\right)\\
          t_6 := \sqrt{t\_5}\\
          t_7 := \sqrt{t\_5 - -1}\\
          t_8 := \mathsf{max}\left(t\_4, t\right)\\
          t_9 := \mathsf{max}\left(t\_3, t\_8\right)\\
          t_10 := \mathsf{min}\left(t\_2, t\_9\right)\\
          t_11 := \mathsf{min}\left(t\_3, t\_8\right)\\
          t_12 := \mathsf{max}\left(t\_2, t\_9\right)\\
          t_13 := \sqrt{t\_11 - -1}\\
          t_14 := \sqrt{t\_10}\\
          t_15 := \sqrt{t\_11}\\
          t_16 := \left(\left(\sqrt{t\_5 + 1} - t\_6\right) + \left(\sqrt{t\_11 + 1} - t\_15\right)\right) + \left(\sqrt{t\_10 + 1} - t\_14\right)\\
          \mathbf{if}\;t\_16 \leq 1.8:\\
          \;\;\;\;t\_7 + \left(\left(\sqrt{t\_10 - -1} + t\_13\right) - \left(\left(t\_14 + t\_15\right) + t\_6\right)\right)\\
          
          \mathbf{elif}\;t\_16 \leq 2:\\
          \;\;\;\;\left(t\_13 + t\_7\right) + \left(\sqrt{t\_12 - -1} - \left(\left(t\_15 + t\_6\right) + \sqrt{t\_12}\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\sqrt{1 + t\_5} + \left(1 + \sqrt{1 + t\_10}\right)\right) - \left(t\_6 + \left(t\_15 + t\_14\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 1.8

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

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

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

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

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

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

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

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

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

                \[\leadsto \sqrt{x - \left(\mathsf{neg}\left(1\right)\right)} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
              10. metadata-evalN/A

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

                \[\leadsto \sqrt{x - -1} + \left(\left(\color{blue}{\sqrt{1 + y}} + \sqrt{1 + z}\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)\right) \]
              12. lower--.f6422.5%

                \[\leadsto \sqrt{x - -1} + \left(\left(\sqrt{1 + y} + \sqrt{1 + z}\right) - \color{blue}{\left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)}\right) \]
            11. Applied rewrites22.5%

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

            if 1.8 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))) < 2

            1. Initial program 91.6%

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              5. lower-+.f64N/A

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

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              8. lower-sqrt.f64N/A

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              10. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\color{blue}{\sqrt{x}} + \sqrt{y}\right)\right) \]
              12. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \color{blue}{\sqrt{y}}\right)\right) \]
            4. Applied rewrites12.2%

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

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{1 + t}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{t + 1}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              6. lift-+.f64N/A

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{t + 1}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              7. associate--l+N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \color{blue}{\left(\sqrt{t + 1} - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right)\right)} \]
            6. Applied rewrites18.3%

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

            if 2 < (+.f64 (+.f64 (-.f64 (sqrt.f64 (+.f64 x #s(literal 1 binary64))) (sqrt.f64 x)) (-.f64 (sqrt.f64 (+.f64 y #s(literal 1 binary64))) (sqrt.f64 y))) (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)))

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            11. Step-by-step derivation
              1. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-+.f6410.6%

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

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

          Alternative 14: 61.1% accurate, 0.3× speedup?

          \[\begin{array}{l} t_1 := \mathsf{max}\left(\mathsf{min}\left(x, z\right), t\right)\\ t_2 := \mathsf{max}\left(y, \mathsf{max}\left(x, z\right)\right)\\ t_3 := \mathsf{min}\left(\mathsf{min}\left(x, z\right), t\right)\\ t_4 := \sqrt{t\_3}\\ t_5 := \mathsf{min}\left(y, \mathsf{max}\left(x, z\right)\right)\\ t_6 := \mathsf{min}\left(t\_5, t\_1\right)\\ t_7 := \sqrt{t\_6}\\ t_8 := \mathsf{max}\left(t\_5, t\_1\right)\\ t_9 := \mathsf{min}\left(t\_2, t\_8\right)\\ t_10 := \mathsf{max}\left(t\_2, t\_8\right)\\ \mathbf{if}\;t\_9 \leq 4.1 \cdot 10^{+31}:\\ \;\;\;\;\left(\sqrt{1 + t\_3} + \left(\sqrt{1 + t\_6} + \sqrt{1 + t\_9}\right)\right) - \left(t\_4 + \left(t\_7 + \sqrt{t\_9}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{t\_6 - -1} + \sqrt{t\_3 - -1}\right) + \left(\sqrt{t\_10 - -1} - \left(\left(t\_7 + t\_4\right) + \sqrt{t\_10}\right)\right)\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmax (fmin x z) t))
                  (t_2 (fmax y (fmax x z)))
                  (t_3 (fmin (fmin x z) t))
                  (t_4 (sqrt t_3))
                  (t_5 (fmin y (fmax x z)))
                  (t_6 (fmin t_5 t_1))
                  (t_7 (sqrt t_6))
                  (t_8 (fmax t_5 t_1))
                  (t_9 (fmin t_2 t_8))
                  (t_10 (fmax t_2 t_8)))
             (if (<= t_9 4.1e+31)
               (-
                (+ (sqrt (+ 1.0 t_3)) (+ (sqrt (+ 1.0 t_6)) (sqrt (+ 1.0 t_9))))
                (+ t_4 (+ t_7 (sqrt t_9))))
               (+
                (+ (sqrt (- t_6 -1.0)) (sqrt (- t_3 -1.0)))
                (- (sqrt (- t_10 -1.0)) (+ (+ t_7 t_4) (sqrt t_10)))))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, z), t);
          	double t_2 = fmax(y, fmax(x, z));
          	double t_3 = fmin(fmin(x, z), t);
          	double t_4 = sqrt(t_3);
          	double t_5 = fmin(y, fmax(x, z));
          	double t_6 = fmin(t_5, t_1);
          	double t_7 = sqrt(t_6);
          	double t_8 = fmax(t_5, t_1);
          	double t_9 = fmin(t_2, t_8);
          	double t_10 = fmax(t_2, t_8);
          	double tmp;
          	if (t_9 <= 4.1e+31) {
          		tmp = (sqrt((1.0 + t_3)) + (sqrt((1.0 + t_6)) + sqrt((1.0 + t_9)))) - (t_4 + (t_7 + sqrt(t_9)));
          	} else {
          		tmp = (sqrt((t_6 - -1.0)) + sqrt((t_3 - -1.0))) + (sqrt((t_10 - -1.0)) - ((t_7 + t_4) + sqrt(t_10)));
          	}
          	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_10
              real(8) :: t_2
              real(8) :: t_3
              real(8) :: t_4
              real(8) :: t_5
              real(8) :: t_6
              real(8) :: t_7
              real(8) :: t_8
              real(8) :: t_9
              real(8) :: tmp
              t_1 = fmax(fmin(x, z), t)
              t_2 = fmax(y, fmax(x, z))
              t_3 = fmin(fmin(x, z), t)
              t_4 = sqrt(t_3)
              t_5 = fmin(y, fmax(x, z))
              t_6 = fmin(t_5, t_1)
              t_7 = sqrt(t_6)
              t_8 = fmax(t_5, t_1)
              t_9 = fmin(t_2, t_8)
              t_10 = fmax(t_2, t_8)
              if (t_9 <= 4.1d+31) then
                  tmp = (sqrt((1.0d0 + t_3)) + (sqrt((1.0d0 + t_6)) + sqrt((1.0d0 + t_9)))) - (t_4 + (t_7 + sqrt(t_9)))
              else
                  tmp = (sqrt((t_6 - (-1.0d0))) + sqrt((t_3 - (-1.0d0)))) + (sqrt((t_10 - (-1.0d0))) - ((t_7 + t_4) + sqrt(t_10)))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmax(fmin(x, z), t);
          	double t_2 = fmax(y, fmax(x, z));
          	double t_3 = fmin(fmin(x, z), t);
          	double t_4 = Math.sqrt(t_3);
          	double t_5 = fmin(y, fmax(x, z));
          	double t_6 = fmin(t_5, t_1);
          	double t_7 = Math.sqrt(t_6);
          	double t_8 = fmax(t_5, t_1);
          	double t_9 = fmin(t_2, t_8);
          	double t_10 = fmax(t_2, t_8);
          	double tmp;
          	if (t_9 <= 4.1e+31) {
          		tmp = (Math.sqrt((1.0 + t_3)) + (Math.sqrt((1.0 + t_6)) + Math.sqrt((1.0 + t_9)))) - (t_4 + (t_7 + Math.sqrt(t_9)));
          	} else {
          		tmp = (Math.sqrt((t_6 - -1.0)) + Math.sqrt((t_3 - -1.0))) + (Math.sqrt((t_10 - -1.0)) - ((t_7 + t_4) + Math.sqrt(t_10)));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmax(fmin(x, z), t)
          	t_2 = fmax(y, fmax(x, z))
          	t_3 = fmin(fmin(x, z), t)
          	t_4 = math.sqrt(t_3)
          	t_5 = fmin(y, fmax(x, z))
          	t_6 = fmin(t_5, t_1)
          	t_7 = math.sqrt(t_6)
          	t_8 = fmax(t_5, t_1)
          	t_9 = fmin(t_2, t_8)
          	t_10 = fmax(t_2, t_8)
          	tmp = 0
          	if t_9 <= 4.1e+31:
          		tmp = (math.sqrt((1.0 + t_3)) + (math.sqrt((1.0 + t_6)) + math.sqrt((1.0 + t_9)))) - (t_4 + (t_7 + math.sqrt(t_9)))
          	else:
          		tmp = (math.sqrt((t_6 - -1.0)) + math.sqrt((t_3 - -1.0))) + (math.sqrt((t_10 - -1.0)) - ((t_7 + t_4) + math.sqrt(t_10)))
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmax(fmin(x, z), t)
          	t_2 = fmax(y, fmax(x, z))
          	t_3 = fmin(fmin(x, z), t)
          	t_4 = sqrt(t_3)
          	t_5 = fmin(y, fmax(x, z))
          	t_6 = fmin(t_5, t_1)
          	t_7 = sqrt(t_6)
          	t_8 = fmax(t_5, t_1)
          	t_9 = fmin(t_2, t_8)
          	t_10 = fmax(t_2, t_8)
          	tmp = 0.0
          	if (t_9 <= 4.1e+31)
          		tmp = Float64(Float64(sqrt(Float64(1.0 + t_3)) + Float64(sqrt(Float64(1.0 + t_6)) + sqrt(Float64(1.0 + t_9)))) - Float64(t_4 + Float64(t_7 + sqrt(t_9))));
          	else
          		tmp = Float64(Float64(sqrt(Float64(t_6 - -1.0)) + sqrt(Float64(t_3 - -1.0))) + Float64(sqrt(Float64(t_10 - -1.0)) - Float64(Float64(t_7 + t_4) + sqrt(t_10))));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = max(min(x, z), t);
          	t_2 = max(y, max(x, z));
          	t_3 = min(min(x, z), t);
          	t_4 = sqrt(t_3);
          	t_5 = min(y, max(x, z));
          	t_6 = min(t_5, t_1);
          	t_7 = sqrt(t_6);
          	t_8 = max(t_5, t_1);
          	t_9 = min(t_2, t_8);
          	t_10 = max(t_2, t_8);
          	tmp = 0.0;
          	if (t_9 <= 4.1e+31)
          		tmp = (sqrt((1.0 + t_3)) + (sqrt((1.0 + t_6)) + sqrt((1.0 + t_9)))) - (t_4 + (t_7 + sqrt(t_9)));
          	else
          		tmp = (sqrt((t_6 - -1.0)) + sqrt((t_3 - -1.0))) + (sqrt((t_10 - -1.0)) - ((t_7 + t_4) + sqrt(t_10)));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Max[N[Min[x, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$2 = N[Max[y, N[Max[x, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Min[x, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Min[y, N[Max[x, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Min[t$95$5, t$95$1], $MachinePrecision]}, Block[{t$95$7 = N[Sqrt[t$95$6], $MachinePrecision]}, Block[{t$95$8 = N[Max[t$95$5, t$95$1], $MachinePrecision]}, Block[{t$95$9 = N[Min[t$95$2, t$95$8], $MachinePrecision]}, Block[{t$95$10 = N[Max[t$95$2, t$95$8], $MachinePrecision]}, If[LessEqual[t$95$9, 4.1e+31], N[(N[(N[Sqrt[N[(1.0 + t$95$3), $MachinePrecision]], $MachinePrecision] + N[(N[Sqrt[N[(1.0 + t$95$6), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(1.0 + t$95$9), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 + N[(t$95$7 + N[Sqrt[t$95$9], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(t$95$6 - -1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(t$95$3 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$10 - -1.0), $MachinePrecision]], $MachinePrecision] - N[(N[(t$95$7 + t$95$4), $MachinePrecision] + N[Sqrt[t$95$10], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{max}\left(\mathsf{min}\left(x, z\right), t\right)\\
          t_2 := \mathsf{max}\left(y, \mathsf{max}\left(x, z\right)\right)\\
          t_3 := \mathsf{min}\left(\mathsf{min}\left(x, z\right), t\right)\\
          t_4 := \sqrt{t\_3}\\
          t_5 := \mathsf{min}\left(y, \mathsf{max}\left(x, z\right)\right)\\
          t_6 := \mathsf{min}\left(t\_5, t\_1\right)\\
          t_7 := \sqrt{t\_6}\\
          t_8 := \mathsf{max}\left(t\_5, t\_1\right)\\
          t_9 := \mathsf{min}\left(t\_2, t\_8\right)\\
          t_10 := \mathsf{max}\left(t\_2, t\_8\right)\\
          \mathbf{if}\;t\_9 \leq 4.1 \cdot 10^{+31}:\\
          \;\;\;\;\left(\sqrt{1 + t\_3} + \left(\sqrt{1 + t\_6} + \sqrt{1 + t\_9}\right)\right) - \left(t\_4 + \left(t\_7 + \sqrt{t\_9}\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\sqrt{t\_6 - -1} + \sqrt{t\_3 - -1}\right) + \left(\sqrt{t\_10 - -1} - \left(\left(t\_7 + t\_4\right) + \sqrt{t\_10}\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < 4.1000000000000002e31

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            4. Applied rewrites12.1%

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

            if 4.1000000000000002e31 < z

            1. Initial program 91.6%

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              5. lower-+.f64N/A

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

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              8. lower-sqrt.f64N/A

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              10. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\color{blue}{\sqrt{x}} + \sqrt{y}\right)\right) \]
              12. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \color{blue}{\sqrt{y}}\right)\right) \]
            4. Applied rewrites12.2%

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

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{1 + t}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{t + 1}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              6. lift-+.f64N/A

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{t + 1}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              7. associate--l+N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \color{blue}{\left(\sqrt{t + 1} - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right)\right)} \]
            6. Applied rewrites18.3%

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

          Alternative 15: 60.7% accurate, 0.3× speedup?

          \[\begin{array}{l} t_1 := \mathsf{min}\left(y, \mathsf{max}\left(x, z\right)\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(x, z\right), t\right)\\ t_3 := \mathsf{max}\left(t\_1, t\_2\right)\\ t_4 := \mathsf{max}\left(y, \mathsf{max}\left(x, z\right)\right)\\ t_5 := \mathsf{min}\left(\mathsf{min}\left(x, z\right), t\right)\\ t_6 := \sqrt{t\_4}\\ t_7 := \mathsf{min}\left(t\_1, t\_2\right)\\ t_8 := \sqrt{t\_7}\\ t_9 := \sqrt{t\_5}\\ \mathbf{if}\;\sqrt{t\_4 + 1} - t\_6 \leq 4 \cdot 10^{-7}:\\ \;\;\;\;\left(\sqrt{t\_7 - -1} + \sqrt{t\_5 - -1}\right) + \left(\sqrt{t\_3 - -1} - \left(\left(t\_8 + t\_9\right) + \sqrt{t\_3}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t\_5} + \left(1 + \sqrt{1 + t\_4}\right)\right) - \left(t\_9 + \left(t\_8 + t\_6\right)\right)\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmin y (fmax x z)))
                  (t_2 (fmax (fmin x z) t))
                  (t_3 (fmax t_1 t_2))
                  (t_4 (fmax y (fmax x z)))
                  (t_5 (fmin (fmin x z) t))
                  (t_6 (sqrt t_4))
                  (t_7 (fmin t_1 t_2))
                  (t_8 (sqrt t_7))
                  (t_9 (sqrt t_5)))
             (if (<= (- (sqrt (+ t_4 1.0)) t_6) 4e-7)
               (+
                (+ (sqrt (- t_7 -1.0)) (sqrt (- t_5 -1.0)))
                (- (sqrt (- t_3 -1.0)) (+ (+ t_8 t_9) (sqrt t_3))))
               (-
                (+ (sqrt (+ 1.0 t_5)) (+ 1.0 (sqrt (+ 1.0 t_4))))
                (+ t_9 (+ t_8 t_6))))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmin(y, fmax(x, z));
          	double t_2 = fmax(fmin(x, z), t);
          	double t_3 = fmax(t_1, t_2);
          	double t_4 = fmax(y, fmax(x, z));
          	double t_5 = fmin(fmin(x, z), t);
          	double t_6 = sqrt(t_4);
          	double t_7 = fmin(t_1, t_2);
          	double t_8 = sqrt(t_7);
          	double t_9 = sqrt(t_5);
          	double tmp;
          	if ((sqrt((t_4 + 1.0)) - t_6) <= 4e-7) {
          		tmp = (sqrt((t_7 - -1.0)) + sqrt((t_5 - -1.0))) + (sqrt((t_3 - -1.0)) - ((t_8 + t_9) + sqrt(t_3)));
          	} else {
          		tmp = (sqrt((1.0 + t_5)) + (1.0 + sqrt((1.0 + t_4)))) - (t_9 + (t_8 + t_6));
          	}
          	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) :: t_4
              real(8) :: t_5
              real(8) :: t_6
              real(8) :: t_7
              real(8) :: t_8
              real(8) :: t_9
              real(8) :: tmp
              t_1 = fmin(y, fmax(x, z))
              t_2 = fmax(fmin(x, z), t)
              t_3 = fmax(t_1, t_2)
              t_4 = fmax(y, fmax(x, z))
              t_5 = fmin(fmin(x, z), t)
              t_6 = sqrt(t_4)
              t_7 = fmin(t_1, t_2)
              t_8 = sqrt(t_7)
              t_9 = sqrt(t_5)
              if ((sqrt((t_4 + 1.0d0)) - t_6) <= 4d-7) then
                  tmp = (sqrt((t_7 - (-1.0d0))) + sqrt((t_5 - (-1.0d0)))) + (sqrt((t_3 - (-1.0d0))) - ((t_8 + t_9) + sqrt(t_3)))
              else
                  tmp = (sqrt((1.0d0 + t_5)) + (1.0d0 + sqrt((1.0d0 + t_4)))) - (t_9 + (t_8 + t_6))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmin(y, fmax(x, z));
          	double t_2 = fmax(fmin(x, z), t);
          	double t_3 = fmax(t_1, t_2);
          	double t_4 = fmax(y, fmax(x, z));
          	double t_5 = fmin(fmin(x, z), t);
          	double t_6 = Math.sqrt(t_4);
          	double t_7 = fmin(t_1, t_2);
          	double t_8 = Math.sqrt(t_7);
          	double t_9 = Math.sqrt(t_5);
          	double tmp;
          	if ((Math.sqrt((t_4 + 1.0)) - t_6) <= 4e-7) {
          		tmp = (Math.sqrt((t_7 - -1.0)) + Math.sqrt((t_5 - -1.0))) + (Math.sqrt((t_3 - -1.0)) - ((t_8 + t_9) + Math.sqrt(t_3)));
          	} else {
          		tmp = (Math.sqrt((1.0 + t_5)) + (1.0 + Math.sqrt((1.0 + t_4)))) - (t_9 + (t_8 + t_6));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmin(y, fmax(x, z))
          	t_2 = fmax(fmin(x, z), t)
          	t_3 = fmax(t_1, t_2)
          	t_4 = fmax(y, fmax(x, z))
          	t_5 = fmin(fmin(x, z), t)
          	t_6 = math.sqrt(t_4)
          	t_7 = fmin(t_1, t_2)
          	t_8 = math.sqrt(t_7)
          	t_9 = math.sqrt(t_5)
          	tmp = 0
          	if (math.sqrt((t_4 + 1.0)) - t_6) <= 4e-7:
          		tmp = (math.sqrt((t_7 - -1.0)) + math.sqrt((t_5 - -1.0))) + (math.sqrt((t_3 - -1.0)) - ((t_8 + t_9) + math.sqrt(t_3)))
          	else:
          		tmp = (math.sqrt((1.0 + t_5)) + (1.0 + math.sqrt((1.0 + t_4)))) - (t_9 + (t_8 + t_6))
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmin(y, fmax(x, z))
          	t_2 = fmax(fmin(x, z), t)
          	t_3 = fmax(t_1, t_2)
          	t_4 = fmax(y, fmax(x, z))
          	t_5 = fmin(fmin(x, z), t)
          	t_6 = sqrt(t_4)
          	t_7 = fmin(t_1, t_2)
          	t_8 = sqrt(t_7)
          	t_9 = sqrt(t_5)
          	tmp = 0.0
          	if (Float64(sqrt(Float64(t_4 + 1.0)) - t_6) <= 4e-7)
          		tmp = Float64(Float64(sqrt(Float64(t_7 - -1.0)) + sqrt(Float64(t_5 - -1.0))) + Float64(sqrt(Float64(t_3 - -1.0)) - Float64(Float64(t_8 + t_9) + sqrt(t_3))));
          	else
          		tmp = Float64(Float64(sqrt(Float64(1.0 + t_5)) + Float64(1.0 + sqrt(Float64(1.0 + t_4)))) - Float64(t_9 + Float64(t_8 + t_6)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = min(y, max(x, z));
          	t_2 = max(min(x, z), t);
          	t_3 = max(t_1, t_2);
          	t_4 = max(y, max(x, z));
          	t_5 = min(min(x, z), t);
          	t_6 = sqrt(t_4);
          	t_7 = min(t_1, t_2);
          	t_8 = sqrt(t_7);
          	t_9 = sqrt(t_5);
          	tmp = 0.0;
          	if ((sqrt((t_4 + 1.0)) - t_6) <= 4e-7)
          		tmp = (sqrt((t_7 - -1.0)) + sqrt((t_5 - -1.0))) + (sqrt((t_3 - -1.0)) - ((t_8 + t_9) + sqrt(t_3)));
          	else
          		tmp = (sqrt((1.0 + t_5)) + (1.0 + sqrt((1.0 + t_4)))) - (t_9 + (t_8 + t_6));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Min[y, N[Max[x, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[x, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$3 = N[Max[t$95$1, t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Max[y, N[Max[x, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Min[N[Min[x, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$4], $MachinePrecision]}, Block[{t$95$7 = N[Min[t$95$1, t$95$2], $MachinePrecision]}, Block[{t$95$8 = N[Sqrt[t$95$7], $MachinePrecision]}, Block[{t$95$9 = N[Sqrt[t$95$5], $MachinePrecision]}, If[LessEqual[N[(N[Sqrt[N[(t$95$4 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision], 4e-7], N[(N[(N[Sqrt[N[(t$95$7 - -1.0), $MachinePrecision]], $MachinePrecision] + N[Sqrt[N[(t$95$5 - -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[N[(t$95$3 - -1.0), $MachinePrecision]], $MachinePrecision] - N[(N[(t$95$8 + t$95$9), $MachinePrecision] + N[Sqrt[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + t$95$5), $MachinePrecision]], $MachinePrecision] + N[(1.0 + N[Sqrt[N[(1.0 + t$95$4), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$9 + N[(t$95$8 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{min}\left(y, \mathsf{max}\left(x, z\right)\right)\\
          t_2 := \mathsf{max}\left(\mathsf{min}\left(x, z\right), t\right)\\
          t_3 := \mathsf{max}\left(t\_1, t\_2\right)\\
          t_4 := \mathsf{max}\left(y, \mathsf{max}\left(x, z\right)\right)\\
          t_5 := \mathsf{min}\left(\mathsf{min}\left(x, z\right), t\right)\\
          t_6 := \sqrt{t\_4}\\
          t_7 := \mathsf{min}\left(t\_1, t\_2\right)\\
          t_8 := \sqrt{t\_7}\\
          t_9 := \sqrt{t\_5}\\
          \mathbf{if}\;\sqrt{t\_4 + 1} - t\_6 \leq 4 \cdot 10^{-7}:\\
          \;\;\;\;\left(\sqrt{t\_7 - -1} + \sqrt{t\_5 - -1}\right) + \left(\sqrt{t\_3 - -1} - \left(\left(t\_8 + t\_9\right) + \sqrt{t\_3}\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\sqrt{1 + t\_5} + \left(1 + \sqrt{1 + t\_4}\right)\right) - \left(t\_9 + \left(t\_8 + t\_6\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 3.9999999999999998e-7

            1. Initial program 91.6%

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              5. lower-+.f64N/A

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

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              8. lower-sqrt.f64N/A

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              10. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\color{blue}{\sqrt{x}} + \sqrt{y}\right)\right) \]
              12. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + t} + \left(\sqrt{1 + x} + \sqrt{1 + y}\right)\right) - \left(\sqrt{t} + \left(\sqrt{x} + \color{blue}{\sqrt{y}}\right)\right) \]
            4. Applied rewrites12.2%

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

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

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

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

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{1 + t}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              5. +-commutativeN/A

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{t + 1}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              6. lift-+.f64N/A

                \[\leadsto \left(\left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \sqrt{t + 1}\right) - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right) \]
              7. associate--l+N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \sqrt{1 + y}\right) + \color{blue}{\left(\sqrt{t + 1} - \left(\sqrt{t} + \left(\sqrt{x} + \sqrt{y}\right)\right)\right)} \]
            6. Applied rewrites18.3%

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

            if 3.9999999999999998e-7 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            11. Step-by-step derivation
              1. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-+.f6410.6%

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

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

          Alternative 16: 36.1% accurate, 0.3× speedup?

          \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(x, z\right), t\right)\\ t_2 := \mathsf{min}\left(y, \mathsf{max}\left(x, z\right)\right)\\ t_3 := \mathsf{max}\left(\mathsf{min}\left(x, z\right), t\right)\\ t_4 := \mathsf{min}\left(\mathsf{max}\left(y, \mathsf{max}\left(x, z\right)\right), \mathsf{max}\left(t\_2, t\_3\right)\right)\\ t_5 := \sqrt{\mathsf{min}\left(t\_2, t\_3\right)}\\ \mathbf{if}\;t\_4 \leq 3.3 \cdot 10^{+32}:\\ \;\;\;\;\left(\sqrt{1 + t\_1} + \left(1 + \sqrt{1 + t\_4}\right)\right) - \left(\sqrt{t\_1} + \left(t\_5 + \sqrt{t\_4}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.5 \cdot t\_5\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmin (fmin x z) t))
                  (t_2 (fmin y (fmax x z)))
                  (t_3 (fmax (fmin x z) t))
                  (t_4 (fmin (fmax y (fmax x z)) (fmax t_2 t_3)))
                  (t_5 (sqrt (fmin t_2 t_3))))
             (if (<= t_4 3.3e+32)
               (-
                (+ (sqrt (+ 1.0 t_1)) (+ 1.0 (sqrt (+ 1.0 t_4))))
                (+ (sqrt t_1) (+ t_5 (sqrt t_4))))
               (* 0.5 t_5))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmin(fmin(x, z), t);
          	double t_2 = fmin(y, fmax(x, z));
          	double t_3 = fmax(fmin(x, z), t);
          	double t_4 = fmin(fmax(y, fmax(x, z)), fmax(t_2, t_3));
          	double t_5 = sqrt(fmin(t_2, t_3));
          	double tmp;
          	if (t_4 <= 3.3e+32) {
          		tmp = (sqrt((1.0 + t_1)) + (1.0 + sqrt((1.0 + t_4)))) - (sqrt(t_1) + (t_5 + sqrt(t_4)));
          	} else {
          		tmp = 0.5 * t_5;
          	}
          	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) :: t_4
              real(8) :: t_5
              real(8) :: tmp
              t_1 = fmin(fmin(x, z), t)
              t_2 = fmin(y, fmax(x, z))
              t_3 = fmax(fmin(x, z), t)
              t_4 = fmin(fmax(y, fmax(x, z)), fmax(t_2, t_3))
              t_5 = sqrt(fmin(t_2, t_3))
              if (t_4 <= 3.3d+32) then
                  tmp = (sqrt((1.0d0 + t_1)) + (1.0d0 + sqrt((1.0d0 + t_4)))) - (sqrt(t_1) + (t_5 + sqrt(t_4)))
              else
                  tmp = 0.5d0 * t_5
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmin(fmin(x, z), t);
          	double t_2 = fmin(y, fmax(x, z));
          	double t_3 = fmax(fmin(x, z), t);
          	double t_4 = fmin(fmax(y, fmax(x, z)), fmax(t_2, t_3));
          	double t_5 = Math.sqrt(fmin(t_2, t_3));
          	double tmp;
          	if (t_4 <= 3.3e+32) {
          		tmp = (Math.sqrt((1.0 + t_1)) + (1.0 + Math.sqrt((1.0 + t_4)))) - (Math.sqrt(t_1) + (t_5 + Math.sqrt(t_4)));
          	} else {
          		tmp = 0.5 * t_5;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmin(fmin(x, z), t)
          	t_2 = fmin(y, fmax(x, z))
          	t_3 = fmax(fmin(x, z), t)
          	t_4 = fmin(fmax(y, fmax(x, z)), fmax(t_2, t_3))
          	t_5 = math.sqrt(fmin(t_2, t_3))
          	tmp = 0
          	if t_4 <= 3.3e+32:
          		tmp = (math.sqrt((1.0 + t_1)) + (1.0 + math.sqrt((1.0 + t_4)))) - (math.sqrt(t_1) + (t_5 + math.sqrt(t_4)))
          	else:
          		tmp = 0.5 * t_5
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmin(fmin(x, z), t)
          	t_2 = fmin(y, fmax(x, z))
          	t_3 = fmax(fmin(x, z), t)
          	t_4 = fmin(fmax(y, fmax(x, z)), fmax(t_2, t_3))
          	t_5 = sqrt(fmin(t_2, t_3))
          	tmp = 0.0
          	if (t_4 <= 3.3e+32)
          		tmp = Float64(Float64(sqrt(Float64(1.0 + t_1)) + Float64(1.0 + sqrt(Float64(1.0 + t_4)))) - Float64(sqrt(t_1) + Float64(t_5 + sqrt(t_4))));
          	else
          		tmp = Float64(0.5 * t_5);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = min(min(x, z), t);
          	t_2 = min(y, max(x, z));
          	t_3 = max(min(x, z), t);
          	t_4 = min(max(y, max(x, z)), max(t_2, t_3));
          	t_5 = sqrt(min(t_2, t_3));
          	tmp = 0.0;
          	if (t_4 <= 3.3e+32)
          		tmp = (sqrt((1.0 + t_1)) + (1.0 + sqrt((1.0 + t_4)))) - (sqrt(t_1) + (t_5 + sqrt(t_4)));
          	else
          		tmp = 0.5 * t_5;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Min[N[Min[x, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$2 = N[Min[y, N[Max[x, z], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Max[N[Min[x, z], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$4 = N[Min[N[Max[y, N[Max[x, z], $MachinePrecision]], $MachinePrecision], N[Max[t$95$2, t$95$3], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[Min[t$95$2, t$95$3], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 3.3e+32], N[(N[(N[Sqrt[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] + N[(1.0 + N[Sqrt[N[(1.0 + t$95$4), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[t$95$1], $MachinePrecision] + N[(t$95$5 + N[Sqrt[t$95$4], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * t$95$5), $MachinePrecision]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{min}\left(\mathsf{min}\left(x, z\right), t\right)\\
          t_2 := \mathsf{min}\left(y, \mathsf{max}\left(x, z\right)\right)\\
          t_3 := \mathsf{max}\left(\mathsf{min}\left(x, z\right), t\right)\\
          t_4 := \mathsf{min}\left(\mathsf{max}\left(y, \mathsf{max}\left(x, z\right)\right), \mathsf{max}\left(t\_2, t\_3\right)\right)\\
          t_5 := \sqrt{\mathsf{min}\left(t\_2, t\_3\right)}\\
          \mathbf{if}\;t\_4 \leq 3.3 \cdot 10^{+32}:\\
          \;\;\;\;\left(\sqrt{1 + t\_1} + \left(1 + \sqrt{1 + t\_4}\right)\right) - \left(\sqrt{t\_1} + \left(t\_5 + \sqrt{t\_4}\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;0.5 \cdot t\_5\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < 3.3000000000000002e32

            1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

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

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            11. Step-by-step derivation
              1. lower-+.f64N/A

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

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-+.f6410.6%

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

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

            if 3.3000000000000002e32 < z

            1. Initial program 91.6%

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

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

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

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. lower-unsound--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. lower-unsound-*.f32N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. lower-*.f32N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              7. lift-sqrt.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1}} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              8. lift-sqrt.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\sqrt{y + 1} \cdot \color{blue}{\sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              9. rem-square-sqrtN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y + 1\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              10. lift-+.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y + 1\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              11. add-flipN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              12. lower--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              13. metadata-evalN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - \color{blue}{-1}\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              14. lower-unsound-*.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              15. lower-unsound-+.f6472.7%

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\color{blue}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              16. lift-+.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y + 1}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              17. add-flipN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              18. lower--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              19. metadata-eval72.7%

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - \color{blue}{-1}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. Applied rewrites72.7%

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - -1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Taylor expanded in y around -inf

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
            5. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{1}{2} \cdot \left(y \cdot \color{blue}{\sqrt{\frac{1}{y}}}\right) \]
              3. lower-sqrt.f64N/A

                \[\leadsto \frac{1}{2} \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right) \]
              4. lower-/.f646.8%

                \[\leadsto 0.5 \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right) \]
            6. Applied rewrites6.8%

              \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
            7. Taylor expanded in y around 0

              \[\leadsto \frac{1}{2} \cdot \color{blue}{\sqrt{y}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \frac{1}{2} \cdot \sqrt{y} \]
              2. lower-sqrt.f646.8%

                \[\leadsto 0.5 \cdot \sqrt{y} \]
            9. Applied rewrites6.8%

              \[\leadsto 0.5 \cdot \color{blue}{\sqrt{y}} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 17: 31.8% accurate, 0.4× speedup?

          \[\begin{array}{l} t_1 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), t\right)\\ t_2 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\\ t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_2\right)\\ t_4 := \sqrt{t\_3}\\ t_5 := \mathsf{min}\left(z, \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_2\right)\right)\\ t_6 := \sqrt{t\_5}\\ \mathbf{if}\;\sqrt{t\_5 + 1} - t\_6 \leq 0.1:\\ \;\;\;\;0.5 \cdot t\_4\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{1 + t\_1} + \left(1 + \sqrt{1 + t\_3}\right)\right) - \left(\sqrt{t\_1} + \left(t\_4 + t\_6\right)\right)\\ \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (let* ((t_1 (fmin (fmin x y) t))
                  (t_2 (fmax (fmin x y) t))
                  (t_3 (fmin (fmax x y) t_2))
                  (t_4 (sqrt t_3))
                  (t_5 (fmin z (fmax (fmax x y) t_2)))
                  (t_6 (sqrt t_5)))
             (if (<= (- (sqrt (+ t_5 1.0)) t_6) 0.1)
               (* 0.5 t_4)
               (-
                (+ (sqrt (+ 1.0 t_1)) (+ 1.0 (sqrt (+ 1.0 t_3))))
                (+ (sqrt t_1) (+ t_4 t_6))))))
          double code(double x, double y, double z, double t) {
          	double t_1 = fmin(fmin(x, y), t);
          	double t_2 = fmax(fmin(x, y), t);
          	double t_3 = fmin(fmax(x, y), t_2);
          	double t_4 = sqrt(t_3);
          	double t_5 = fmin(z, fmax(fmax(x, y), t_2));
          	double t_6 = sqrt(t_5);
          	double tmp;
          	if ((sqrt((t_5 + 1.0)) - t_6) <= 0.1) {
          		tmp = 0.5 * t_4;
          	} else {
          		tmp = (sqrt((1.0 + t_1)) + (1.0 + sqrt((1.0 + t_3)))) - (sqrt(t_1) + (t_4 + t_6));
          	}
          	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) :: t_4
              real(8) :: t_5
              real(8) :: t_6
              real(8) :: tmp
              t_1 = fmin(fmin(x, y), t)
              t_2 = fmax(fmin(x, y), t)
              t_3 = fmin(fmax(x, y), t_2)
              t_4 = sqrt(t_3)
              t_5 = fmin(z, fmax(fmax(x, y), t_2))
              t_6 = sqrt(t_5)
              if ((sqrt((t_5 + 1.0d0)) - t_6) <= 0.1d0) then
                  tmp = 0.5d0 * t_4
              else
                  tmp = (sqrt((1.0d0 + t_1)) + (1.0d0 + sqrt((1.0d0 + t_3)))) - (sqrt(t_1) + (t_4 + t_6))
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t) {
          	double t_1 = fmin(fmin(x, y), t);
          	double t_2 = fmax(fmin(x, y), t);
          	double t_3 = fmin(fmax(x, y), t_2);
          	double t_4 = Math.sqrt(t_3);
          	double t_5 = fmin(z, fmax(fmax(x, y), t_2));
          	double t_6 = Math.sqrt(t_5);
          	double tmp;
          	if ((Math.sqrt((t_5 + 1.0)) - t_6) <= 0.1) {
          		tmp = 0.5 * t_4;
          	} else {
          		tmp = (Math.sqrt((1.0 + t_1)) + (1.0 + Math.sqrt((1.0 + t_3)))) - (Math.sqrt(t_1) + (t_4 + t_6));
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	t_1 = fmin(fmin(x, y), t)
          	t_2 = fmax(fmin(x, y), t)
          	t_3 = fmin(fmax(x, y), t_2)
          	t_4 = math.sqrt(t_3)
          	t_5 = fmin(z, fmax(fmax(x, y), t_2))
          	t_6 = math.sqrt(t_5)
          	tmp = 0
          	if (math.sqrt((t_5 + 1.0)) - t_6) <= 0.1:
          		tmp = 0.5 * t_4
          	else:
          		tmp = (math.sqrt((1.0 + t_1)) + (1.0 + math.sqrt((1.0 + t_3)))) - (math.sqrt(t_1) + (t_4 + t_6))
          	return tmp
          
          function code(x, y, z, t)
          	t_1 = fmin(fmin(x, y), t)
          	t_2 = fmax(fmin(x, y), t)
          	t_3 = fmin(fmax(x, y), t_2)
          	t_4 = sqrt(t_3)
          	t_5 = fmin(z, fmax(fmax(x, y), t_2))
          	t_6 = sqrt(t_5)
          	tmp = 0.0
          	if (Float64(sqrt(Float64(t_5 + 1.0)) - t_6) <= 0.1)
          		tmp = Float64(0.5 * t_4);
          	else
          		tmp = Float64(Float64(sqrt(Float64(1.0 + t_1)) + Float64(1.0 + sqrt(Float64(1.0 + t_3)))) - Float64(sqrt(t_1) + Float64(t_4 + t_6)));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t)
          	t_1 = min(min(x, y), t);
          	t_2 = max(min(x, y), t);
          	t_3 = min(max(x, y), t_2);
          	t_4 = sqrt(t_3);
          	t_5 = min(z, max(max(x, y), t_2));
          	t_6 = sqrt(t_5);
          	tmp = 0.0;
          	if ((sqrt((t_5 + 1.0)) - t_6) <= 0.1)
          		tmp = 0.5 * t_4;
          	else
          		tmp = (sqrt((1.0 + t_1)) + (1.0 + sqrt((1.0 + t_3)))) - (sqrt(t_1) + (t_4 + t_6));
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := Block[{t$95$1 = N[Min[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]}, Block[{t$95$3 = N[Min[N[Max[x, y], $MachinePrecision], t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[t$95$3], $MachinePrecision]}, Block[{t$95$5 = N[Min[z, N[Max[N[Max[x, y], $MachinePrecision], t$95$2], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[Sqrt[t$95$5], $MachinePrecision]}, If[LessEqual[N[(N[Sqrt[N[(t$95$5 + 1.0), $MachinePrecision]], $MachinePrecision] - t$95$6), $MachinePrecision], 0.1], N[(0.5 * t$95$4), $MachinePrecision], N[(N[(N[Sqrt[N[(1.0 + t$95$1), $MachinePrecision]], $MachinePrecision] + N[(1.0 + N[Sqrt[N[(1.0 + t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Sqrt[t$95$1], $MachinePrecision] + N[(t$95$4 + t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
          
          \begin{array}{l}
          t_1 := \mathsf{min}\left(\mathsf{min}\left(x, y\right), t\right)\\
          t_2 := \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\\
          t_3 := \mathsf{min}\left(\mathsf{max}\left(x, y\right), t\_2\right)\\
          t_4 := \sqrt{t\_3}\\
          t_5 := \mathsf{min}\left(z, \mathsf{max}\left(\mathsf{max}\left(x, y\right), t\_2\right)\right)\\
          t_6 := \sqrt{t\_5}\\
          \mathbf{if}\;\sqrt{t\_5 + 1} - t\_6 \leq 0.1:\\
          \;\;\;\;0.5 \cdot t\_4\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\sqrt{1 + t\_1} + \left(1 + \sqrt{1 + t\_3}\right)\right) - \left(\sqrt{t\_1} + \left(t\_4 + t\_6\right)\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z)) < 0.10000000000000001

            1. Initial program 91.6%

              \[\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. Step-by-step derivation
              1. lift--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\left(\sqrt{y + 1} - \sqrt{y}\right)}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              2. flip--N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              3. lower-unsound-/.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              4. lower-unsound--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              5. lower-unsound-*.f32N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              6. lower-*.f32N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              7. lift-sqrt.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1}} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              8. lift-sqrt.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\sqrt{y + 1} \cdot \color{blue}{\sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              9. rem-square-sqrtN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y + 1\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              10. lift-+.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y + 1\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              11. add-flipN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              12. lower--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              13. metadata-evalN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - \color{blue}{-1}\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              14. lower-unsound-*.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              15. lower-unsound-+.f6472.7%

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\color{blue}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              16. lift-+.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y + 1}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              17. add-flipN/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              18. lower--.f64N/A

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
              19. metadata-eval72.7%

                \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - \color{blue}{-1}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. Applied rewrites72.7%

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - -1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. Taylor expanded in y around -inf

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
            5. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{1}{2} \cdot \left(y \cdot \color{blue}{\sqrt{\frac{1}{y}}}\right) \]
              3. lower-sqrt.f64N/A

                \[\leadsto \frac{1}{2} \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right) \]
              4. lower-/.f646.8%

                \[\leadsto 0.5 \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right) \]
            6. Applied rewrites6.8%

              \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
            7. Taylor expanded in y around 0

              \[\leadsto \frac{1}{2} \cdot \color{blue}{\sqrt{y}} \]
            8. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \frac{1}{2} \cdot \sqrt{y} \]
              2. lower-sqrt.f646.8%

                \[\leadsto 0.5 \cdot \sqrt{y} \]
            9. Applied rewrites6.8%

              \[\leadsto 0.5 \cdot \color{blue}{\sqrt{y}} \]

            if 0.10000000000000001 < (-.f64 (sqrt.f64 (+.f64 z #s(literal 1 binary64))) (sqrt.f64 z))

            1. Initial program 91.6%

              \[\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. Step-by-step derivation
              1. lift-+.f64N/A

                \[\leadsto \color{blue}{\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right)} \]
              2. +-commutativeN/A

                \[\leadsto \color{blue}{\left(\sqrt{t + 1} - \sqrt{t}\right) + \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right)} \]
              3. lift-+.f64N/A

                \[\leadsto \left(\sqrt{t + 1} - \sqrt{t}\right) + \color{blue}{\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right)} \]
              4. lift--.f64N/A

                \[\leadsto \left(\sqrt{t + 1} - \sqrt{t}\right) + \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \color{blue}{\left(\sqrt{z + 1} - \sqrt{z}\right)}\right) \]
              5. associate-+r-N/A

                \[\leadsto \left(\sqrt{t + 1} - \sqrt{t}\right) + \color{blue}{\left(\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \sqrt{z + 1}\right) - \sqrt{z}\right)} \]
              6. associate-+r-N/A

                \[\leadsto \color{blue}{\left(\left(\sqrt{t + 1} - \sqrt{t}\right) + \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \sqrt{z + 1}\right)\right) - \sqrt{z}} \]
              7. lower--.f64N/A

                \[\leadsto \color{blue}{\left(\left(\sqrt{t + 1} - \sqrt{t}\right) + \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \sqrt{z + 1}\right)\right) - \sqrt{z}} \]
            3. Applied rewrites53.7%

              \[\leadsto \color{blue}{\left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \left(\left(\sqrt{y} - \sqrt{y - -1}\right) - \sqrt{z - -1}\right)\right)\right) - \sqrt{z}} \]
            4. Taylor expanded in y around inf

              \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \color{blue}{-1 \cdot \sqrt{1 + z}}\right)\right) - \sqrt{z} \]
            5. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \color{blue}{\sqrt{1 + z}}\right)\right) - \sqrt{z} \]
              2. lower-sqrt.f64N/A

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
              3. lower-+.f6432.1%

                \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - -1 \cdot \sqrt{1 + z}\right)\right) - \sqrt{z} \]
            6. Applied rewrites32.1%

              \[\leadsto \left(\left(\sqrt{t - -1} - \sqrt{t}\right) + \left(\left(\sqrt{x - -1} - \sqrt{x}\right) - \color{blue}{-1 \cdot \sqrt{1 + z}}\right)\right) - \sqrt{z} \]
            7. Taylor expanded in t around inf

              \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
            8. Step-by-step derivation
              1. lower--.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \color{blue}{\left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
              2. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\color{blue}{\sqrt{x}} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-sqrt.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{\color{blue}{x}} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              4. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              5. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              6. lower-sqrt.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              7. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              8. lower-sqrt.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              9. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              10. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \color{blue}{\left(\sqrt{y} + \sqrt{z}\right)}\right) \]
              11. lower-sqrt.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\color{blue}{\sqrt{y}} + \sqrt{z}\right)\right) \]
              12. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \color{blue}{\sqrt{z}}\right)\right) \]
            9. Applied rewrites12.1%

              \[\leadsto \color{blue}{\left(\sqrt{1 + x} + \left(\sqrt{1 + y} + \sqrt{1 + z}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right)} \]
            10. Taylor expanded in z around 0

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + y}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            11. Step-by-step derivation
              1. lower-+.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + y}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              2. lower-sqrt.f64N/A

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + y}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
              3. lower-+.f6410.6%

                \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + y}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
            12. Applied rewrites10.6%

              \[\leadsto \left(\sqrt{1 + x} + \left(1 + \sqrt{1 + y}\right)\right) - \left(\sqrt{x} + \left(\sqrt{y} + \sqrt{z}\right)\right) \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 18: 7.6% accurate, 2.5× speedup?

          \[0.5 \cdot \sqrt{\mathsf{min}\left(\mathsf{max}\left(x, y\right), \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\right)} \]
          (FPCore (x y z t)
           :precision binary64
           (* 0.5 (sqrt (fmin (fmax x y) (fmax (fmin x y) t)))))
          double code(double x, double y, double z, double t) {
          	return 0.5 * sqrt(fmin(fmax(x, y), fmax(fmin(x, y), t)));
          }
          
          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 * sqrt(fmin(fmax(x, y), fmax(fmin(x, y), t)))
          end function
          
          public static double code(double x, double y, double z, double t) {
          	return 0.5 * Math.sqrt(fmin(fmax(x, y), fmax(fmin(x, y), t)));
          }
          
          def code(x, y, z, t):
          	return 0.5 * math.sqrt(fmin(fmax(x, y), fmax(fmin(x, y), t)))
          
          function code(x, y, z, t)
          	return Float64(0.5 * sqrt(fmin(fmax(x, y), fmax(fmin(x, y), t))))
          end
          
          function tmp = code(x, y, z, t)
          	tmp = 0.5 * sqrt(min(max(x, y), max(min(x, y), t)));
          end
          
          code[x_, y_, z_, t_] := N[(0.5 * N[Sqrt[N[Min[N[Max[x, y], $MachinePrecision], N[Max[N[Min[x, y], $MachinePrecision], t], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
          
          0.5 \cdot \sqrt{\mathsf{min}\left(\mathsf{max}\left(x, y\right), \mathsf{max}\left(\mathsf{min}\left(x, y\right), t\right)\right)}
          
          Derivation
          1. Initial program 91.6%

            \[\left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \left(\sqrt{y + 1} - \sqrt{y}\right)\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          2. Step-by-step derivation
            1. lift--.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\left(\sqrt{y + 1} - \sqrt{y}\right)}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            2. flip--N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            3. lower-unsound-/.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            4. lower-unsound--.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            5. lower-unsound-*.f32N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            6. lower-*.f32N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1} \cdot \sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            7. lift-sqrt.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\sqrt{y + 1}} \cdot \sqrt{y + 1} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            8. lift-sqrt.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\sqrt{y + 1} \cdot \color{blue}{\sqrt{y + 1}} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            9. rem-square-sqrtN/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y + 1\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            10. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y + 1\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            11. add-flipN/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            12. lower--.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\color{blue}{\left(y - \left(\mathsf{neg}\left(1\right)\right)\right)} - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            13. metadata-evalN/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - \color{blue}{-1}\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            14. lower-unsound-*.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \color{blue}{\sqrt{y} \cdot \sqrt{y}}}{\sqrt{y + 1} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            15. lower-unsound-+.f6472.7%

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\color{blue}{\sqrt{y + 1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            16. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y + 1}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            17. add-flipN/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            18. lower--.f64N/A

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{\color{blue}{y - \left(\mathsf{neg}\left(1\right)\right)}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
            19. metadata-eval72.7%

              \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - \color{blue}{-1}} + \sqrt{y}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          3. Applied rewrites72.7%

            \[\leadsto \left(\left(\left(\sqrt{x + 1} - \sqrt{x}\right) + \color{blue}{\frac{\left(y - -1\right) - \sqrt{y} \cdot \sqrt{y}}{\sqrt{y - -1} + \sqrt{y}}}\right) + \left(\sqrt{z + 1} - \sqrt{z}\right)\right) + \left(\sqrt{t + 1} - \sqrt{t}\right) \]
          4. Taylor expanded in y around -inf

            \[\leadsto \color{blue}{\frac{1}{2} \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{1}{2} \cdot \color{blue}{\left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{1}{2} \cdot \left(y \cdot \color{blue}{\sqrt{\frac{1}{y}}}\right) \]
            3. lower-sqrt.f64N/A

              \[\leadsto \frac{1}{2} \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right) \]
            4. lower-/.f646.8%

              \[\leadsto 0.5 \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right) \]
          6. Applied rewrites6.8%

            \[\leadsto \color{blue}{0.5 \cdot \left(y \cdot \sqrt{\frac{1}{y}}\right)} \]
          7. Taylor expanded in y around 0

            \[\leadsto \frac{1}{2} \cdot \color{blue}{\sqrt{y}} \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{1}{2} \cdot \sqrt{y} \]
            2. lower-sqrt.f646.8%

              \[\leadsto 0.5 \cdot \sqrt{y} \]
          9. Applied rewrites6.8%

            \[\leadsto 0.5 \cdot \color{blue}{\sqrt{y}} \]
          10. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2025202 
          (FPCore (x y z t)
            :name "Main:z from "
            :precision binary64
            (+ (+ (+ (- (sqrt (+ x 1.0)) (sqrt x)) (- (sqrt (+ y 1.0)) (sqrt y))) (- (sqrt (+ z 1.0)) (sqrt z))) (- (sqrt (+ t 1.0)) (sqrt t))))