Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2

Percentage Accurate: 62.0% → 91.5%
Time: 4.5s
Alternatives: 8
Speedup: 0.4×

Specification

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

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

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

Alternative 1: 91.5% accurate, 0.1× speedup?

\[\begin{array}{l} t_1 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\ t_2 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\ \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l} \mathbf{if}\;\left|z\right| \leq \frac{8409788860576655}{5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624}:\\ \;\;\;\;\frac{1}{\sqrt{\left(-t\right) \cdot a}} \cdot \left(\left(\left|z\right| \cdot t\_1\right) \cdot t\_2\right)\\ \mathbf{elif}\;\left|z\right| \leq 139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168:\\ \;\;\;\;\left(\frac{\left|z\right|}{\sqrt{\left|z\right| \cdot \left|z\right| - t \cdot a}} \cdot t\_2\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(t\_1 \cdot t\_2\right)\\ \end{array}\right)\right) \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (fmax (fabs x) (fabs y))) (t_2 (fmin (fabs x) (fabs y))))
  (*
   (copysign 1 x)
   (*
    (copysign 1 y)
    (*
     (copysign 1 z)
     (if (<=
          (fabs z)
          8409788860576655/5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624)
       (* (/ 1 (sqrt (* (- t) a))) (* (* (fabs z) t_1) t_2))
       (if (<=
            (fabs z)
            139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168)
         (*
          (*
           (/ (fabs z) (sqrt (- (* (fabs z) (fabs z)) (* t a))))
           t_2)
          t_1)
         (* 1 (* t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fmax(fabs(x), fabs(y));
	double t_2 = fmin(fabs(x), fabs(y));
	double tmp;
	if (fabs(z) <= 1.42e-210) {
		tmp = (1.0 / sqrt((-t * a))) * ((fabs(z) * t_1) * t_2);
	} else if (fabs(z) <= 1.4e+128) {
		tmp = ((fabs(z) / sqrt(((fabs(z) * fabs(z)) - (t * a)))) * t_2) * t_1;
	} else {
		tmp = 1.0 * (t_1 * t_2);
	}
	return copysign(1.0, x) * (copysign(1.0, y) * (copysign(1.0, z) * tmp));
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = fmax(Math.abs(x), Math.abs(y));
	double t_2 = fmin(Math.abs(x), Math.abs(y));
	double tmp;
	if (Math.abs(z) <= 1.42e-210) {
		tmp = (1.0 / Math.sqrt((-t * a))) * ((Math.abs(z) * t_1) * t_2);
	} else if (Math.abs(z) <= 1.4e+128) {
		tmp = ((Math.abs(z) / Math.sqrt(((Math.abs(z) * Math.abs(z)) - (t * a)))) * t_2) * t_1;
	} else {
		tmp = 1.0 * (t_1 * t_2);
	}
	return Math.copySign(1.0, x) * (Math.copySign(1.0, y) * (Math.copySign(1.0, z) * tmp));
}
def code(x, y, z, t, a):
	t_1 = fmax(math.fabs(x), math.fabs(y))
	t_2 = fmin(math.fabs(x), math.fabs(y))
	tmp = 0
	if math.fabs(z) <= 1.42e-210:
		tmp = (1.0 / math.sqrt((-t * a))) * ((math.fabs(z) * t_1) * t_2)
	elif math.fabs(z) <= 1.4e+128:
		tmp = ((math.fabs(z) / math.sqrt(((math.fabs(z) * math.fabs(z)) - (t * a)))) * t_2) * t_1
	else:
		tmp = 1.0 * (t_1 * t_2)
	return math.copysign(1.0, x) * (math.copysign(1.0, y) * (math.copysign(1.0, z) * tmp))
function code(x, y, z, t, a)
	t_1 = fmax(abs(x), abs(y))
	t_2 = fmin(abs(x), abs(y))
	tmp = 0.0
	if (abs(z) <= 1.42e-210)
		tmp = Float64(Float64(1.0 / sqrt(Float64(Float64(-t) * a))) * Float64(Float64(abs(z) * t_1) * t_2));
	elseif (abs(z) <= 1.4e+128)
		tmp = Float64(Float64(Float64(abs(z) / sqrt(Float64(Float64(abs(z) * abs(z)) - Float64(t * a)))) * t_2) * t_1);
	else
		tmp = Float64(1.0 * Float64(t_1 * t_2));
	end
	return Float64(copysign(1.0, x) * Float64(copysign(1.0, y) * Float64(copysign(1.0, z) * tmp)))
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = max(abs(x), abs(y));
	t_2 = min(abs(x), abs(y));
	tmp = 0.0;
	if (abs(z) <= 1.42e-210)
		tmp = (1.0 / sqrt((-t * a))) * ((abs(z) * t_1) * t_2);
	elseif (abs(z) <= 1.4e+128)
		tmp = ((abs(z) / sqrt(((abs(z) * abs(z)) - (t * a)))) * t_2) * t_1;
	else
		tmp = 1.0 * (t_1 * t_2);
	end
	tmp_2 = (sign(x) * abs(1.0)) * ((sign(y) * abs(1.0)) * ((sign(z) * abs(1.0)) * tmp));
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Max[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[z], $MachinePrecision], 8409788860576655/5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624], N[(N[(1 / N[Sqrt[N[((-t) * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[z], $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z], $MachinePrecision], 139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168], N[(N[(N[(N[Abs[z], $MachinePrecision] / N[Sqrt[N[(N[(N[Abs[z], $MachinePrecision] * N[Abs[z], $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision], N[(1 * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\
t_2 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\
\mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|z\right| \leq \frac{8409788860576655}{5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624}:\\
\;\;\;\;\frac{1}{\sqrt{\left(-t\right) \cdot a}} \cdot \left(\left(\left|z\right| \cdot t\_1\right) \cdot t\_2\right)\\

\mathbf{elif}\;\left|z\right| \leq 139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168:\\
\;\;\;\;\left(\frac{\left|z\right|}{\sqrt{\left|z\right| \cdot \left|z\right| - t \cdot a}} \cdot t\_2\right) \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;1 \cdot \left(t\_1 \cdot t\_2\right)\\


\end{array}\right)\right)
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 1.42e-210

    1. Initial program 62.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot \left(x \cdot z\right)} \]
      11. mult-flip-revN/A

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

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

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

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

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

        \[\leadsto \frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(z \cdot x\right)} \]
      17. lower-*.f6459.8%

        \[\leadsto \frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(z \cdot x\right)} \]
    3. Applied rewrites59.8%

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

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

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

        \[\leadsto \frac{y}{\sqrt{-a \cdot t}} \cdot \left(z \cdot x\right) \]
      3. lower-*.f6432.2%

        \[\leadsto \frac{y}{\sqrt{-a \cdot t}} \cdot \left(z \cdot x\right) \]
    6. Applied rewrites32.2%

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

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

        \[\leadsto \color{blue}{\frac{y}{\sqrt{-a \cdot t}}} \cdot \left(z \cdot x\right) \]
      3. mult-flipN/A

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

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

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

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

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

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

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

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

    if 1.42e-210 < z < 1.3999999999999999e128

    1. Initial program 62.0%

      \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
    2. Applied rewrites20.7%

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

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

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

        \[\leadsto \left(\frac{z}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(\mathsf{neg}\left(x\right)\right)}\right) \cdot y \]
      4. distribute-rgt-neg-outN/A

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

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

        \[\leadsto \color{blue}{\left(\left(\mathsf{neg}\left(\frac{z}{\sqrt{z \cdot z - a \cdot t}}\right)\right) \cdot x\right)} \cdot y \]
    4. Applied rewrites64.0%

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

    if 1.3999999999999999e128 < z

    1. Initial program 62.0%

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

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

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

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

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
      6. sqrt-fabs-revN/A

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
      8. rem-sqrt-square-revN/A

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
      10. sqr-neg-revN/A

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

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
      13. unpow-prod-downN/A

        \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
      14. pow-addN/A

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

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

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

        \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
    3. Applied rewrites64.1%

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

      \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
    5. Step-by-step derivation
      1. Applied rewrites43.6%

        \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
    6. Recombined 3 regimes into one program.
    7. Add Preprocessing

    Alternative 2: 91.4% accurate, 0.3× speedup?

    \[\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l} \mathbf{if}\;\left|z\right| \leq 139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168:\\ \;\;\;\;\frac{\left|z\right|}{\sqrt{\left|z\right| \cdot \left|z\right| - a \cdot t}} \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(y \cdot x\right)\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (*
     (copysign 1 z)
     (if (<=
          (fabs z)
          139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168)
       (* (/ (fabs z) (sqrt (- (* (fabs z) (fabs z)) (* a t)))) (* y x))
       (* 1 (* y x)))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (fabs(z) <= 1.4e+128) {
    		tmp = (fabs(z) / sqrt(((fabs(z) * fabs(z)) - (a * t)))) * (y * x);
    	} else {
    		tmp = 1.0 * (y * x);
    	}
    	return copysign(1.0, z) * tmp;
    }
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (Math.abs(z) <= 1.4e+128) {
    		tmp = (Math.abs(z) / Math.sqrt(((Math.abs(z) * Math.abs(z)) - (a * t)))) * (y * x);
    	} else {
    		tmp = 1.0 * (y * x);
    	}
    	return Math.copySign(1.0, z) * tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if math.fabs(z) <= 1.4e+128:
    		tmp = (math.fabs(z) / math.sqrt(((math.fabs(z) * math.fabs(z)) - (a * t)))) * (y * x)
    	else:
    		tmp = 1.0 * (y * x)
    	return math.copysign(1.0, z) * tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (abs(z) <= 1.4e+128)
    		tmp = Float64(Float64(abs(z) / sqrt(Float64(Float64(abs(z) * abs(z)) - Float64(a * t)))) * Float64(y * x));
    	else
    		tmp = Float64(1.0 * Float64(y * x));
    	end
    	return Float64(copysign(1.0, z) * tmp)
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (abs(z) <= 1.4e+128)
    		tmp = (abs(z) / sqrt(((abs(z) * abs(z)) - (a * t)))) * (y * x);
    	else
    		tmp = 1.0 * (y * x);
    	end
    	tmp_2 = (sign(z) * abs(1.0)) * tmp;
    end
    
    code[x_, y_, z_, t_, a_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[z], $MachinePrecision], 139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168], N[(N[(N[Abs[z], $MachinePrecision] / N[Sqrt[N[(N[(N[Abs[z], $MachinePrecision] * N[Abs[z], $MachinePrecision]), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(1 * N[(y * x), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|z\right| \leq 139999999999999991285167330229307404975375020111088221626015833673130848699810489861179420414813756105335038937414138448123527168:\\
    \;\;\;\;\frac{\left|z\right|}{\sqrt{\left|z\right| \cdot \left|z\right| - a \cdot t}} \cdot \left(y \cdot x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;1 \cdot \left(y \cdot x\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < 1.3999999999999999e128

      1. Initial program 62.0%

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

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

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

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

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
        6. sqrt-fabs-revN/A

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
        8. rem-sqrt-square-revN/A

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
        10. sqr-neg-revN/A

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

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
        13. unpow-prod-downN/A

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
        14. pow-addN/A

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

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

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
      3. Applied rewrites64.1%

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

      if 1.3999999999999999e128 < z

      1. Initial program 62.0%

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

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

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

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

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
        6. sqrt-fabs-revN/A

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
        8. rem-sqrt-square-revN/A

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
        10. sqr-neg-revN/A

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

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
        13. unpow-prod-downN/A

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
        14. pow-addN/A

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

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

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

          \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
      3. Applied rewrites64.1%

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

        \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
      5. Step-by-step derivation
        1. Applied rewrites43.6%

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

      Alternative 3: 90.1% accurate, 0.1× speedup?

      \[\begin{array}{l} t_1 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\ t_2 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\ \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l} \mathbf{if}\;\left|z\right| \leq \frac{8409788860576655}{5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624}:\\ \;\;\;\;\frac{1}{\sqrt{\left(-t\right) \cdot a}} \cdot \left(\left(\left|z\right| \cdot t\_1\right) \cdot t\_2\right)\\ \mathbf{elif}\;\left|z\right| \leq 124999999999999997902848:\\ \;\;\;\;\left(\frac{t\_2}{\sqrt{\left|z\right| \cdot \left|z\right| - t \cdot a}} \cdot \left|z\right|\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(t\_1 \cdot t\_2\right)\\ \end{array}\right)\right) \end{array} \]
      (FPCore (x y z t a)
        :precision binary64
        (let* ((t_1 (fmax (fabs x) (fabs y))) (t_2 (fmin (fabs x) (fabs y))))
        (*
         (copysign 1 x)
         (*
          (copysign 1 y)
          (*
           (copysign 1 z)
           (if (<=
                (fabs z)
                8409788860576655/5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624)
             (* (/ 1 (sqrt (* (- t) a))) (* (* (fabs z) t_1) t_2))
             (if (<= (fabs z) 124999999999999997902848)
               (*
                (*
                 (/ t_2 (sqrt (- (* (fabs z) (fabs z)) (* t a))))
                 (fabs z))
                t_1)
               (* 1 (* t_1 t_2)))))))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = fmax(fabs(x), fabs(y));
      	double t_2 = fmin(fabs(x), fabs(y));
      	double tmp;
      	if (fabs(z) <= 1.42e-210) {
      		tmp = (1.0 / sqrt((-t * a))) * ((fabs(z) * t_1) * t_2);
      	} else if (fabs(z) <= 1.25e+23) {
      		tmp = ((t_2 / sqrt(((fabs(z) * fabs(z)) - (t * a)))) * fabs(z)) * t_1;
      	} else {
      		tmp = 1.0 * (t_1 * t_2);
      	}
      	return copysign(1.0, x) * (copysign(1.0, y) * (copysign(1.0, z) * tmp));
      }
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = fmax(Math.abs(x), Math.abs(y));
      	double t_2 = fmin(Math.abs(x), Math.abs(y));
      	double tmp;
      	if (Math.abs(z) <= 1.42e-210) {
      		tmp = (1.0 / Math.sqrt((-t * a))) * ((Math.abs(z) * t_1) * t_2);
      	} else if (Math.abs(z) <= 1.25e+23) {
      		tmp = ((t_2 / Math.sqrt(((Math.abs(z) * Math.abs(z)) - (t * a)))) * Math.abs(z)) * t_1;
      	} else {
      		tmp = 1.0 * (t_1 * t_2);
      	}
      	return Math.copySign(1.0, x) * (Math.copySign(1.0, y) * (Math.copySign(1.0, z) * tmp));
      }
      
      def code(x, y, z, t, a):
      	t_1 = fmax(math.fabs(x), math.fabs(y))
      	t_2 = fmin(math.fabs(x), math.fabs(y))
      	tmp = 0
      	if math.fabs(z) <= 1.42e-210:
      		tmp = (1.0 / math.sqrt((-t * a))) * ((math.fabs(z) * t_1) * t_2)
      	elif math.fabs(z) <= 1.25e+23:
      		tmp = ((t_2 / math.sqrt(((math.fabs(z) * math.fabs(z)) - (t * a)))) * math.fabs(z)) * t_1
      	else:
      		tmp = 1.0 * (t_1 * t_2)
      	return math.copysign(1.0, x) * (math.copysign(1.0, y) * (math.copysign(1.0, z) * tmp))
      
      function code(x, y, z, t, a)
      	t_1 = fmax(abs(x), abs(y))
      	t_2 = fmin(abs(x), abs(y))
      	tmp = 0.0
      	if (abs(z) <= 1.42e-210)
      		tmp = Float64(Float64(1.0 / sqrt(Float64(Float64(-t) * a))) * Float64(Float64(abs(z) * t_1) * t_2));
      	elseif (abs(z) <= 1.25e+23)
      		tmp = Float64(Float64(Float64(t_2 / sqrt(Float64(Float64(abs(z) * abs(z)) - Float64(t * a)))) * abs(z)) * t_1);
      	else
      		tmp = Float64(1.0 * Float64(t_1 * t_2));
      	end
      	return Float64(copysign(1.0, x) * Float64(copysign(1.0, y) * Float64(copysign(1.0, z) * tmp)))
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = max(abs(x), abs(y));
      	t_2 = min(abs(x), abs(y));
      	tmp = 0.0;
      	if (abs(z) <= 1.42e-210)
      		tmp = (1.0 / sqrt((-t * a))) * ((abs(z) * t_1) * t_2);
      	elseif (abs(z) <= 1.25e+23)
      		tmp = ((t_2 / sqrt(((abs(z) * abs(z)) - (t * a)))) * abs(z)) * t_1;
      	else
      		tmp = 1.0 * (t_1 * t_2);
      	end
      	tmp_2 = (sign(x) * abs(1.0)) * ((sign(y) * abs(1.0)) * ((sign(z) * abs(1.0)) * tmp));
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Max[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[z], $MachinePrecision], 8409788860576655/5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624], N[(N[(1 / N[Sqrt[N[((-t) * a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Abs[z], $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[z], $MachinePrecision], 124999999999999997902848], N[(N[(N[(t$95$2 / N[Sqrt[N[(N[(N[Abs[z], $MachinePrecision] * N[Abs[z], $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Abs[z], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(1 * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      t_1 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\
      t_2 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\
      \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|z\right| \leq \frac{8409788860576655}{5922386521532855740161817506647119732883018558947359509044845726112560091729648156474603305162988578607512400425457279991804428268870599332596921062626576000993556884845161077691136496092218188572933193945756793025561702170624}:\\
      \;\;\;\;\frac{1}{\sqrt{\left(-t\right) \cdot a}} \cdot \left(\left(\left|z\right| \cdot t\_1\right) \cdot t\_2\right)\\
      
      \mathbf{elif}\;\left|z\right| \leq 124999999999999997902848:\\
      \;\;\;\;\left(\frac{t\_2}{\sqrt{\left|z\right| \cdot \left|z\right| - t \cdot a}} \cdot \left|z\right|\right) \cdot t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;1 \cdot \left(t\_1 \cdot t\_2\right)\\
      
      
      \end{array}\right)\right)
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < 1.42e-210

        1. Initial program 62.0%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot \left(x \cdot z\right)} \]
          11. mult-flip-revN/A

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

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

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

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

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

            \[\leadsto \frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(z \cdot x\right)} \]
          17. lower-*.f6459.8%

            \[\leadsto \frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(z \cdot x\right)} \]
        3. Applied rewrites59.8%

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

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

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

            \[\leadsto \frac{y}{\sqrt{-a \cdot t}} \cdot \left(z \cdot x\right) \]
          3. lower-*.f6432.2%

            \[\leadsto \frac{y}{\sqrt{-a \cdot t}} \cdot \left(z \cdot x\right) \]
        6. Applied rewrites32.2%

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

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

            \[\leadsto \color{blue}{\frac{y}{\sqrt{-a \cdot t}}} \cdot \left(z \cdot x\right) \]
          3. mult-flipN/A

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

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

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

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

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

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

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

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

        if 1.42e-210 < z < 1.25e23

        1. Initial program 62.0%

          \[\frac{\left(x \cdot y\right) \cdot z}{\sqrt{z \cdot z - t \cdot a}} \]
        2. Applied rewrites20.7%

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

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

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

            \[\leadsto \color{blue}{\frac{\left(-x\right) \cdot z}{\sqrt{z \cdot z - a \cdot t}}} \cdot y \]
          4. mult-flipN/A

            \[\leadsto \color{blue}{\left(\left(\left(-x\right) \cdot z\right) \cdot \frac{1}{\sqrt{z \cdot z - a \cdot t}}\right)} \cdot y \]
          5. inv-powN/A

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

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

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

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

            \[\leadsto \left(\left(\left(-x\right) \cdot z\right) \cdot \color{blue}{\left({\left(\sqrt{z \cdot z - a \cdot t}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\sqrt{z \cdot z - a \cdot t}\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)}\right) \cdot y \]
          10. unpow-prod-downN/A

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

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

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

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

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

            \[\leadsto \left(\left(\left(-x\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - a \cdot t}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - a \cdot t}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}}\right) \cdot y \]
          16. unpow-prod-downN/A

            \[\leadsto \left(\left(\left(-x\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - a \cdot t}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - a \cdot t}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)}\right) \cdot y \]
          17. pow-addN/A

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

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

        if 1.25e23 < z

        1. Initial program 62.0%

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

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

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

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

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

            \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
          6. sqrt-fabs-revN/A

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

            \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
          8. rem-sqrt-square-revN/A

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

            \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
          10. sqr-neg-revN/A

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

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

            \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
          13. unpow-prod-downN/A

            \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
          14. pow-addN/A

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

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

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

            \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
        3. Applied rewrites64.1%

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

          \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
        5. Step-by-step derivation
          1. Applied rewrites43.6%

            \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
        6. Recombined 3 regimes into one program.
        7. Add Preprocessing

        Alternative 4: 84.4% accurate, 0.1× speedup?

        \[\begin{array}{l} t_1 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\ t_2 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\ \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l} \mathbf{if}\;\left|z\right| \leq \frac{633237988016573}{904625697166532776746648320380374280103671755200316906558262375061821325312}:\\ \;\;\;\;\frac{t\_1 \cdot \left(t\_2 \cdot \left|z\right|\right)}{\sqrt{-a \cdot t}}\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(t\_2 \cdot t\_1\right)\\ \end{array}\right)\right) \end{array} \]
        (FPCore (x y z t a)
          :precision binary64
          (let* ((t_1 (fmin (fabs x) (fabs y))) (t_2 (fmax (fabs x) (fabs y))))
          (*
           (copysign 1 x)
           (*
            (copysign 1 y)
            (*
             (copysign 1 z)
             (if (<=
                  (fabs z)
                  633237988016573/904625697166532776746648320380374280103671755200316906558262375061821325312)
               (/ (* t_1 (* t_2 (fabs z))) (sqrt (- (* a t))))
               (* 1 (* t_2 t_1))))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = fmin(fabs(x), fabs(y));
        	double t_2 = fmax(fabs(x), fabs(y));
        	double tmp;
        	if (fabs(z) <= 7e-61) {
        		tmp = (t_1 * (t_2 * fabs(z))) / sqrt(-(a * t));
        	} else {
        		tmp = 1.0 * (t_2 * t_1);
        	}
        	return copysign(1.0, x) * (copysign(1.0, y) * (copysign(1.0, z) * tmp));
        }
        
        public static double code(double x, double y, double z, double t, double a) {
        	double t_1 = fmin(Math.abs(x), Math.abs(y));
        	double t_2 = fmax(Math.abs(x), Math.abs(y));
        	double tmp;
        	if (Math.abs(z) <= 7e-61) {
        		tmp = (t_1 * (t_2 * Math.abs(z))) / Math.sqrt(-(a * t));
        	} else {
        		tmp = 1.0 * (t_2 * t_1);
        	}
        	return Math.copySign(1.0, x) * (Math.copySign(1.0, y) * (Math.copySign(1.0, z) * tmp));
        }
        
        def code(x, y, z, t, a):
        	t_1 = fmin(math.fabs(x), math.fabs(y))
        	t_2 = fmax(math.fabs(x), math.fabs(y))
        	tmp = 0
        	if math.fabs(z) <= 7e-61:
        		tmp = (t_1 * (t_2 * math.fabs(z))) / math.sqrt(-(a * t))
        	else:
        		tmp = 1.0 * (t_2 * t_1)
        	return math.copysign(1.0, x) * (math.copysign(1.0, y) * (math.copysign(1.0, z) * tmp))
        
        function code(x, y, z, t, a)
        	t_1 = fmin(abs(x), abs(y))
        	t_2 = fmax(abs(x), abs(y))
        	tmp = 0.0
        	if (abs(z) <= 7e-61)
        		tmp = Float64(Float64(t_1 * Float64(t_2 * abs(z))) / sqrt(Float64(-Float64(a * t))));
        	else
        		tmp = Float64(1.0 * Float64(t_2 * t_1));
        	end
        	return Float64(copysign(1.0, x) * Float64(copysign(1.0, y) * Float64(copysign(1.0, z) * tmp)))
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = min(abs(x), abs(y));
        	t_2 = max(abs(x), abs(y));
        	tmp = 0.0;
        	if (abs(z) <= 7e-61)
        		tmp = (t_1 * (t_2 * abs(z))) / sqrt(-(a * t));
        	else
        		tmp = 1.0 * (t_2 * t_1);
        	end
        	tmp_2 = (sign(x) * abs(1.0)) * ((sign(y) * abs(1.0)) * ((sign(z) * abs(1.0)) * tmp));
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Min[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[z], $MachinePrecision], 633237988016573/904625697166532776746648320380374280103671755200316906558262375061821325312], N[(N[(t$95$1 * N[(t$95$2 * N[Abs[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[(-N[(a * t), $MachinePrecision])], $MachinePrecision]), $MachinePrecision], N[(1 * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        t_1 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\
        t_2 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\
        \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|z\right| \leq \frac{633237988016573}{904625697166532776746648320380374280103671755200316906558262375061821325312}:\\
        \;\;\;\;\frac{t\_1 \cdot \left(t\_2 \cdot \left|z\right|\right)}{\sqrt{-a \cdot t}}\\
        
        \mathbf{else}:\\
        \;\;\;\;1 \cdot \left(t\_2 \cdot t\_1\right)\\
        
        
        \end{array}\right)\right)
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < 7.0000000000000006e-61

          1. Initial program 62.0%

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

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

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

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

              \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{\mathsf{neg}\left(a \cdot t\right)}} \]
            4. lower-sqrt.f64N/A

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

              \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{-a \cdot t}} \]
            6. lower-*.f6432.5%

              \[\leadsto \frac{x \cdot \left(y \cdot z\right)}{\sqrt{-a \cdot t}} \]
          4. Applied rewrites32.5%

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

          if 7.0000000000000006e-61 < z

          1. Initial program 62.0%

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

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

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

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

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

              \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
            6. sqrt-fabs-revN/A

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

              \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
            8. rem-sqrt-square-revN/A

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

              \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
            10. sqr-neg-revN/A

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

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

              \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
            13. unpow-prod-downN/A

              \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
            14. pow-addN/A

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

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

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

              \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
          3. Applied rewrites64.1%

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

            \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
          5. Step-by-step derivation
            1. Applied rewrites43.6%

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

          Alternative 5: 75.7% accurate, 0.1× speedup?

          \[\begin{array}{l} t_1 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\ t_2 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\ \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l} \mathbf{if}\;\left|z\right| \leq \frac{1824208758453333}{388129523075177233787244872115625638814221504279174152784763009506512738171594221582719602207161619487621932674282768301542895011028703597861071818760295284801113744005212476387566321407899611206315749798429117187723211713454014464}:\\ \;\;\;\;\frac{\left|z\right| \cdot t\_1}{-\left|z\right|} \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(t\_2 \cdot t\_1\right)\\ \end{array}\right)\right) \end{array} \]
          (FPCore (x y z t a)
            :precision binary64
            (let* ((t_1 (fmin (fabs x) (fabs y))) (t_2 (fmax (fabs x) (fabs y))))
            (*
             (copysign 1 x)
             (*
              (copysign 1 y)
              (*
               (copysign 1 z)
               (if (<=
                    (fabs z)
                    1824208758453333/388129523075177233787244872115625638814221504279174152784763009506512738171594221582719602207161619487621932674282768301542895011028703597861071818760295284801113744005212476387566321407899611206315749798429117187723211713454014464)
                 (* (/ (* (fabs z) t_1) (- (fabs z))) t_2)
                 (* 1 (* t_2 t_1))))))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = fmin(fabs(x), fabs(y));
          	double t_2 = fmax(fabs(x), fabs(y));
          	double tmp;
          	if (fabs(z) <= 4.7e-216) {
          		tmp = ((fabs(z) * t_1) / -fabs(z)) * t_2;
          	} else {
          		tmp = 1.0 * (t_2 * t_1);
          	}
          	return copysign(1.0, x) * (copysign(1.0, y) * (copysign(1.0, z) * tmp));
          }
          
          public static double code(double x, double y, double z, double t, double a) {
          	double t_1 = fmin(Math.abs(x), Math.abs(y));
          	double t_2 = fmax(Math.abs(x), Math.abs(y));
          	double tmp;
          	if (Math.abs(z) <= 4.7e-216) {
          		tmp = ((Math.abs(z) * t_1) / -Math.abs(z)) * t_2;
          	} else {
          		tmp = 1.0 * (t_2 * t_1);
          	}
          	return Math.copySign(1.0, x) * (Math.copySign(1.0, y) * (Math.copySign(1.0, z) * tmp));
          }
          
          def code(x, y, z, t, a):
          	t_1 = fmin(math.fabs(x), math.fabs(y))
          	t_2 = fmax(math.fabs(x), math.fabs(y))
          	tmp = 0
          	if math.fabs(z) <= 4.7e-216:
          		tmp = ((math.fabs(z) * t_1) / -math.fabs(z)) * t_2
          	else:
          		tmp = 1.0 * (t_2 * t_1)
          	return math.copysign(1.0, x) * (math.copysign(1.0, y) * (math.copysign(1.0, z) * tmp))
          
          function code(x, y, z, t, a)
          	t_1 = fmin(abs(x), abs(y))
          	t_2 = fmax(abs(x), abs(y))
          	tmp = 0.0
          	if (abs(z) <= 4.7e-216)
          		tmp = Float64(Float64(Float64(abs(z) * t_1) / Float64(-abs(z))) * t_2);
          	else
          		tmp = Float64(1.0 * Float64(t_2 * t_1));
          	end
          	return Float64(copysign(1.0, x) * Float64(copysign(1.0, y) * Float64(copysign(1.0, z) * tmp)))
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	t_1 = min(abs(x), abs(y));
          	t_2 = max(abs(x), abs(y));
          	tmp = 0.0;
          	if (abs(z) <= 4.7e-216)
          		tmp = ((abs(z) * t_1) / -abs(z)) * t_2;
          	else
          		tmp = 1.0 * (t_2 * t_1);
          	end
          	tmp_2 = (sign(x) * abs(1.0)) * ((sign(y) * abs(1.0)) * ((sign(z) * abs(1.0)) * tmp));
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Min[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Max[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[z], $MachinePrecision], 1824208758453333/388129523075177233787244872115625638814221504279174152784763009506512738171594221582719602207161619487621932674282768301542895011028703597861071818760295284801113744005212476387566321407899611206315749798429117187723211713454014464], N[(N[(N[(N[Abs[z], $MachinePrecision] * t$95$1), $MachinePrecision] / (-N[Abs[z], $MachinePrecision])), $MachinePrecision] * t$95$2), $MachinePrecision], N[(1 * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          t_1 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\
          t_2 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\
          \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l}
          \mathbf{if}\;\left|z\right| \leq \frac{1824208758453333}{388129523075177233787244872115625638814221504279174152784763009506512738171594221582719602207161619487621932674282768301542895011028703597861071818760295284801113744005212476387566321407899611206315749798429117187723211713454014464}:\\
          \;\;\;\;\frac{\left|z\right| \cdot t\_1}{-\left|z\right|} \cdot t\_2\\
          
          \mathbf{else}:\\
          \;\;\;\;1 \cdot \left(t\_2 \cdot t\_1\right)\\
          
          
          \end{array}\right)\right)
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < 4.7e-216

            1. Initial program 62.0%

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

              \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{\color{blue}{-1 \cdot z}} \]
            3. Step-by-step derivation
              1. lower-*.f6442.7%

                \[\leadsto \frac{\left(x \cdot y\right) \cdot z}{-1 \cdot \color{blue}{z}} \]
            4. Applied rewrites42.7%

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{z \cdot x}{-z} \cdot y} \]

            if 4.7e-216 < z

            1. Initial program 62.0%

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

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

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

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

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

                \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
              6. sqrt-fabs-revN/A

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

                \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
              8. rem-sqrt-square-revN/A

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

                \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
              10. sqr-neg-revN/A

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

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

                \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
              13. unpow-prod-downN/A

                \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
              14. pow-addN/A

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

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

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

                \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
            3. Applied rewrites64.1%

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

              \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
            5. Step-by-step derivation
              1. Applied rewrites43.6%

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

            Alternative 6: 74.6% accurate, 0.1× speedup?

            \[\begin{array}{l} t_1 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\ t_2 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\ \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l} \mathbf{if}\;t \cdot a \leq \frac{-5503834670046917}{20769187434139310514121985316880384}:\\ \;\;\;\;\frac{t\_1}{\left|z\right|} \cdot \left(\left|z\right| \cdot t\_2\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(t\_1 \cdot t\_2\right)\\ \end{array}\right)\right) \end{array} \]
            (FPCore (x y z t a)
              :precision binary64
              (let* ((t_1 (fmax (fabs x) (fabs y))) (t_2 (fmin (fabs x) (fabs y))))
              (*
               (copysign 1 x)
               (*
                (copysign 1 y)
                (*
                 (copysign 1 z)
                 (if (<=
                      (* t a)
                      -5503834670046917/20769187434139310514121985316880384)
                   (* (/ t_1 (fabs z)) (* (fabs z) t_2))
                   (* 1 (* t_1 t_2))))))))
            double code(double x, double y, double z, double t, double a) {
            	double t_1 = fmax(fabs(x), fabs(y));
            	double t_2 = fmin(fabs(x), fabs(y));
            	double tmp;
            	if ((t * a) <= -2.65e-19) {
            		tmp = (t_1 / fabs(z)) * (fabs(z) * t_2);
            	} else {
            		tmp = 1.0 * (t_1 * t_2);
            	}
            	return copysign(1.0, x) * (copysign(1.0, y) * (copysign(1.0, z) * tmp));
            }
            
            public static double code(double x, double y, double z, double t, double a) {
            	double t_1 = fmax(Math.abs(x), Math.abs(y));
            	double t_2 = fmin(Math.abs(x), Math.abs(y));
            	double tmp;
            	if ((t * a) <= -2.65e-19) {
            		tmp = (t_1 / Math.abs(z)) * (Math.abs(z) * t_2);
            	} else {
            		tmp = 1.0 * (t_1 * t_2);
            	}
            	return Math.copySign(1.0, x) * (Math.copySign(1.0, y) * (Math.copySign(1.0, z) * tmp));
            }
            
            def code(x, y, z, t, a):
            	t_1 = fmax(math.fabs(x), math.fabs(y))
            	t_2 = fmin(math.fabs(x), math.fabs(y))
            	tmp = 0
            	if (t * a) <= -2.65e-19:
            		tmp = (t_1 / math.fabs(z)) * (math.fabs(z) * t_2)
            	else:
            		tmp = 1.0 * (t_1 * t_2)
            	return math.copysign(1.0, x) * (math.copysign(1.0, y) * (math.copysign(1.0, z) * tmp))
            
            function code(x, y, z, t, a)
            	t_1 = fmax(abs(x), abs(y))
            	t_2 = fmin(abs(x), abs(y))
            	tmp = 0.0
            	if (Float64(t * a) <= -2.65e-19)
            		tmp = Float64(Float64(t_1 / abs(z)) * Float64(abs(z) * t_2));
            	else
            		tmp = Float64(1.0 * Float64(t_1 * t_2));
            	end
            	return Float64(copysign(1.0, x) * Float64(copysign(1.0, y) * Float64(copysign(1.0, z) * tmp)))
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	t_1 = max(abs(x), abs(y));
            	t_2 = min(abs(x), abs(y));
            	tmp = 0.0;
            	if ((t * a) <= -2.65e-19)
            		tmp = (t_1 / abs(z)) * (abs(z) * t_2);
            	else
            		tmp = 1.0 * (t_1 * t_2);
            	end
            	tmp_2 = (sign(x) * abs(1.0)) * ((sign(y) * abs(1.0)) * ((sign(z) * abs(1.0)) * tmp));
            end
            
            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Max[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Min[N[Abs[x], $MachinePrecision], N[Abs[y], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(t * a), $MachinePrecision], -5503834670046917/20769187434139310514121985316880384], N[(N[(t$95$1 / N[Abs[z], $MachinePrecision]), $MachinePrecision] * N[(N[Abs[z], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(1 * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            t_1 := \mathsf{max}\left(\left|x\right|, \left|y\right|\right)\\
            t_2 := \mathsf{min}\left(\left|x\right|, \left|y\right|\right)\\
            \mathsf{copysign}\left(1, x\right) \cdot \left(\mathsf{copysign}\left(1, y\right) \cdot \left(\mathsf{copysign}\left(1, z\right) \cdot \begin{array}{l}
            \mathbf{if}\;t \cdot a \leq \frac{-5503834670046917}{20769187434139310514121985316880384}:\\
            \;\;\;\;\frac{t\_1}{\left|z\right|} \cdot \left(\left|z\right| \cdot t\_2\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;1 \cdot \left(t\_1 \cdot t\_2\right)\\
            
            
            \end{array}\right)\right)
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 t a) < -2.6499999999999999e-19

              1. Initial program 62.0%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(y \cdot \frac{1}{\sqrt{z \cdot z - t \cdot a}}\right) \cdot \left(x \cdot z\right)} \]
                11. mult-flip-revN/A

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

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

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

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

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

                  \[\leadsto \frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(z \cdot x\right)} \]
                17. lower-*.f6459.8%

                  \[\leadsto \frac{y}{\sqrt{z \cdot z - a \cdot t}} \cdot \color{blue}{\left(z \cdot x\right)} \]
              3. Applied rewrites59.8%

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

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

                  \[\leadsto \frac{y}{\color{blue}{z}} \cdot \left(z \cdot x\right) \]
              6. Applied rewrites37.5%

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

              if -2.6499999999999999e-19 < (*.f64 t a)

              1. Initial program 62.0%

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

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

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

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

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
                6. sqrt-fabs-revN/A

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
                8. rem-sqrt-square-revN/A

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
                10. sqr-neg-revN/A

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

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                13. unpow-prod-downN/A

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
                14. pow-addN/A

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

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

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
              3. Applied rewrites64.1%

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

                \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
              5. Step-by-step derivation
                1. Applied rewrites43.6%

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

              Alternative 7: 73.3% accurate, 0.4× speedup?

              \[\mathsf{copysign}\left(1, z\right) \cdot \left(1 \cdot \left(y \cdot x\right)\right) \]
              (FPCore (x y z t a)
                :precision binary64
                (* (copysign 1 z) (* 1 (* y x))))
              double code(double x, double y, double z, double t, double a) {
              	return copysign(1.0, z) * (1.0 * (y * x));
              }
              
              public static double code(double x, double y, double z, double t, double a) {
              	return Math.copySign(1.0, z) * (1.0 * (y * x));
              }
              
              def code(x, y, z, t, a):
              	return math.copysign(1.0, z) * (1.0 * (y * x))
              
              function code(x, y, z, t, a)
              	return Float64(copysign(1.0, z) * Float64(1.0 * Float64(y * x)))
              end
              
              function tmp = code(x, y, z, t, a)
              	tmp = (sign(z) * abs(1.0)) * (1.0 * (y * x));
              end
              
              code[x_, y_, z_, t_, a_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[z]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * N[(1 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \mathsf{copysign}\left(1, z\right) \cdot \left(1 \cdot \left(y \cdot x\right)\right)
              
              Derivation
              1. Initial program 62.0%

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

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

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

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

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\color{blue}{\left(\sqrt{z \cdot z - t \cdot a}\right)}}^{-1} \]
                6. sqrt-fabs-revN/A

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left|\color{blue}{\sqrt{z \cdot z - t \cdot a}}\right|\right)}^{-1} \]
                8. rem-sqrt-square-revN/A

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{{\left(\sqrt{z \cdot z - t \cdot a} \cdot \sqrt{z \cdot z - t \cdot a}\right)}^{\left(\frac{-1}{2}\right)}} \]
                10. sqr-neg-revN/A

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

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right) \cdot \left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)\right)}^{\color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}} \]
                13. unpow-prod-downN/A

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot \color{blue}{\left({\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)} \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)} \]
                14. pow-addN/A

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

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

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

                  \[\leadsto \left(\left(x \cdot y\right) \cdot z\right) \cdot {\left(\mathsf{neg}\left(\sqrt{z \cdot z - t \cdot a}\right)\right)}^{\color{blue}{-1}} \]
              3. Applied rewrites64.1%

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

                \[\leadsto \color{blue}{1} \cdot \left(y \cdot x\right) \]
              5. Step-by-step derivation
                1. Applied rewrites43.6%

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

                Alternative 8: 43.8% accurate, 5.6× speedup?

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

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

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

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

                    \[\leadsto -1 \cdot \left(x \cdot \color{blue}{y}\right) \]
                4. Applied rewrites43.8%

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

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

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

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

                    \[\leadsto \mathsf{neg}\left(y \cdot x\right) \]
                  5. distribute-lft-neg-inN/A

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

                    \[\leadsto \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{x} \]
                  7. lower-neg.f6443.8%

                    \[\leadsto \left(-y\right) \cdot x \]
                6. Applied rewrites43.8%

                  \[\leadsto \left(-y\right) \cdot \color{blue}{x} \]
                7. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2025271 -o generate:evaluate
                (FPCore (x y z t a)
                  :name "Statistics.Math.RootFinding:ridders from math-functions-0.1.5.2"
                  :precision binary64
                  (/ (* (* x y) z) (sqrt (- (* z z) (* t a)))))