
(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) / ((z * z) * (z + 1.0d0))
end function
public static double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
def code(x, y, z): return (x * y) / ((z * z) * (z + 1.0))
function code(x, y, z) return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0))) end
function tmp = code(x, y, z) tmp = (x * y) / ((z * z) * (z + 1.0)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) / ((z * z) * (z + 1.0d0))
end function
public static double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
def code(x, y, z): return (x * y) / ((z * z) * (z + 1.0))
function code(x, y, z) return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0))) end
function tmp = code(x, y, z) tmp = (x * y) / ((z * z) * (z + 1.0)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\end{array}
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (/ (* (/ y_m (+ z 1.0)) (/ x_m z)) z))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (((y_m / (z + 1.0)) * (x_m / z)) / z));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = y_s * (x_s * (((y_m / (z + 1.0d0)) * (x_m / z)) / z))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (((y_m / (z + 1.0)) * (x_m / z)) / z));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * (((y_m / (z + 1.0)) * (x_m / z)) / z))
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(Float64(Float64(y_m / Float64(z + 1.0)) * Float64(x_m / z)) / z))) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * (((y_m / (z + 1.0)) * (x_m / z)) / z));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(N[(N[(y$95$m / N[(z + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x$95$m / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{\frac{y\_m}{z + 1} \cdot \frac{x\_m}{z}}{z}\right)
\end{array}
Initial program 85.9%
associate-*l/86.1%
*-commutative86.1%
sqr-neg86.1%
associate-/r*87.2%
sqr-neg87.2%
Simplified87.2%
associate-*r/88.6%
associate-*l/88.6%
associate-/r*92.7%
associate-*r/96.1%
Applied egg-rr96.1%
Final simplification96.1%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(let* ((t_0 (* (+ z 1.0) (* z z))))
(*
y_s
(*
x_s
(if (<= t_0 -2000.0)
(/ (/ (/ x_m (/ z y_m)) z) z)
(if (<= t_0 5e-56)
(/ y_m (* z (/ z x_m)))
(* (/ y_m (* z z)) (/ x_m (+ z 1.0)))))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double t_0 = (z + 1.0) * (z * z);
double tmp;
if (t_0 <= -2000.0) {
tmp = ((x_m / (z / y_m)) / z) / z;
} else if (t_0 <= 5e-56) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (y_m / (z * z)) * (x_m / (z + 1.0));
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (z + 1.0d0) * (z * z)
if (t_0 <= (-2000.0d0)) then
tmp = ((x_m / (z / y_m)) / z) / z
else if (t_0 <= 5d-56) then
tmp = y_m / (z * (z / x_m))
else
tmp = (y_m / (z * z)) * (x_m / (z + 1.0d0))
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double t_0 = (z + 1.0) * (z * z);
double tmp;
if (t_0 <= -2000.0) {
tmp = ((x_m / (z / y_m)) / z) / z;
} else if (t_0 <= 5e-56) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (y_m / (z * z)) * (x_m / (z + 1.0));
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): t_0 = (z + 1.0) * (z * z) tmp = 0 if t_0 <= -2000.0: tmp = ((x_m / (z / y_m)) / z) / z elif t_0 <= 5e-56: tmp = y_m / (z * (z / x_m)) else: tmp = (y_m / (z * z)) * (x_m / (z + 1.0)) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) t_0 = Float64(Float64(z + 1.0) * Float64(z * z)) tmp = 0.0 if (t_0 <= -2000.0) tmp = Float64(Float64(Float64(x_m / Float64(z / y_m)) / z) / z); elseif (t_0 <= 5e-56) tmp = Float64(y_m / Float64(z * Float64(z / x_m))); else tmp = Float64(Float64(y_m / Float64(z * z)) * Float64(x_m / Float64(z + 1.0))); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
t_0 = (z + 1.0) * (z * z);
tmp = 0.0;
if (t_0 <= -2000.0)
tmp = ((x_m / (z / y_m)) / z) / z;
elseif (t_0 <= 5e-56)
tmp = y_m / (z * (z / x_m));
else
tmp = (y_m / (z * z)) * (x_m / (z + 1.0));
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := Block[{t$95$0 = N[(N[(z + 1.0), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$0, -2000.0], N[(N[(N[(x$95$m / N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$0, 5e-56], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(x$95$m / N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
\begin{array}{l}
t_0 := \left(z + 1\right) \cdot \left(z \cdot z\right)\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -2000:\\
\;\;\;\;\frac{\frac{\frac{x\_m}{\frac{z}{y\_m}}}{z}}{z}\\
\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{-56}:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{z \cdot z} \cdot \frac{x\_m}{z + 1}\\
\end{array}\right)
\end{array}
\end{array}
if (*.f64 (*.f64 z z) (+.f64 z 1)) < -2e3Initial program 84.1%
associate-*l/86.0%
*-commutative86.0%
sqr-neg86.0%
associate-/r*89.1%
sqr-neg89.1%
Simplified89.1%
associate-/l/86.0%
associate-/r*89.1%
associate-/l*93.5%
associate-/r*99.7%
associate-*r/91.7%
*-commutative91.7%
associate-*r/99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 96.2%
if -2e3 < (*.f64 (*.f64 z z) (+.f64 z 1)) < 4.99999999999999997e-56Initial program 82.7%
*-commutative82.7%
frac-times84.5%
associate-*l/82.7%
times-frac92.3%
Applied egg-rr92.3%
Taylor expanded in z around 0 92.3%
*-commutative92.3%
clear-num92.4%
frac-times87.8%
*-un-lft-identity87.8%
Applied egg-rr87.8%
if 4.99999999999999997e-56 < (*.f64 (*.f64 z z) (+.f64 z 1)) Initial program 91.5%
sqr-neg91.5%
*-commutative91.5%
times-frac95.9%
sqr-neg95.9%
Simplified95.9%
Final simplification92.5%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= (/ (* y_m x_m) (* (+ z 1.0) (* z z))) 2e+78)
(* (/ y_m (* z z)) (/ x_m (+ z 1.0)))
(/ (* y_m (/ x_m (* z (+ z 1.0)))) z)))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (((y_m * x_m) / ((z + 1.0) * (z * z))) <= 2e+78) {
tmp = (y_m / (z * z)) * (x_m / (z + 1.0));
} else {
tmp = (y_m * (x_m / (z * (z + 1.0)))) / z;
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (((y_m * x_m) / ((z + 1.0d0) * (z * z))) <= 2d+78) then
tmp = (y_m / (z * z)) * (x_m / (z + 1.0d0))
else
tmp = (y_m * (x_m / (z * (z + 1.0d0)))) / z
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (((y_m * x_m) / ((z + 1.0) * (z * z))) <= 2e+78) {
tmp = (y_m / (z * z)) * (x_m / (z + 1.0));
} else {
tmp = (y_m * (x_m / (z * (z + 1.0)))) / z;
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if ((y_m * x_m) / ((z + 1.0) * (z * z))) <= 2e+78: tmp = (y_m / (z * z)) * (x_m / (z + 1.0)) else: tmp = (y_m * (x_m / (z * (z + 1.0)))) / z return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (Float64(Float64(y_m * x_m) / Float64(Float64(z + 1.0) * Float64(z * z))) <= 2e+78) tmp = Float64(Float64(y_m / Float64(z * z)) * Float64(x_m / Float64(z + 1.0))); else tmp = Float64(Float64(y_m * Float64(x_m / Float64(z * Float64(z + 1.0)))) / z); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (((y_m * x_m) / ((z + 1.0) * (z * z))) <= 2e+78)
tmp = (y_m / (z * z)) * (x_m / (z + 1.0));
else
tmp = (y_m * (x_m / (z * (z + 1.0)))) / z;
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(N[(y$95$m * x$95$m), $MachinePrecision] / N[(N[(z + 1.0), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+78], N[(N[(y$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision] * N[(x$95$m / N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y$95$m * N[(x$95$m / N[(z * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{y\_m \cdot x\_m}{\left(z + 1\right) \cdot \left(z \cdot z\right)} \leq 2 \cdot 10^{+78}:\\
\;\;\;\;\frac{y\_m}{z \cdot z} \cdot \frac{x\_m}{z + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m \cdot \frac{x\_m}{z \cdot \left(z + 1\right)}}{z}\\
\end{array}\right)
\end{array}
if (/.f64 (*.f64 x y) (*.f64 (*.f64 z z) (+.f64 z 1))) < 2.00000000000000002e78Initial program 90.0%
sqr-neg90.0%
*-commutative90.0%
times-frac94.2%
sqr-neg94.2%
Simplified94.2%
if 2.00000000000000002e78 < (/.f64 (*.f64 x y) (*.f64 (*.f64 z z) (+.f64 z 1))) Initial program 72.9%
*-commutative72.9%
frac-times78.0%
associate-*l/80.8%
times-frac91.5%
Applied egg-rr91.5%
associate-*l/94.6%
associate-*r/93.4%
associate-*r/80.7%
associate-/r*80.5%
associate-/l*89.9%
Applied egg-rr89.9%
Final simplification93.2%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (or (<= z -1.0) (not (<= z 1.0)))
(* (/ x_m z) (/ (/ y_m z) z))
(/ y_m (* z (/ z x_m)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 1.0)) {
tmp = (x_m / z) * ((y_m / z) / z);
} else {
tmp = y_m / (z * (z / x_m));
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = (x_m / z) * ((y_m / z) / z)
else
tmp = y_m / (z * (z / x_m))
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 1.0)) {
tmp = (x_m / z) * ((y_m / z) / z);
} else {
tmp = y_m / (z * (z / x_m));
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if (z <= -1.0) or not (z <= 1.0): tmp = (x_m / z) * ((y_m / z) / z) else: tmp = y_m / (z * (z / x_m)) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.0)) tmp = Float64(Float64(x_m / z) * Float64(Float64(y_m / z) / z)); else tmp = Float64(y_m / Float64(z * Float64(z / x_m))); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if ((z <= -1.0) || ~((z <= 1.0)))
tmp = (x_m / z) * ((y_m / z) / z);
else
tmp = y_m / (z * (z / x_m));
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(N[(x$95$m / z), $MachinePrecision] * N[(N[(y$95$m / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{\frac{y\_m}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\end{array}\right)
\end{array}
if z < -1 or 1 < z Initial program 87.4%
sqr-neg87.4%
times-frac93.9%
sqr-neg93.9%
Simplified93.9%
Taylor expanded in z around inf 91.7%
*-commutative91.7%
associate-/r*94.5%
associate-*r/97.5%
Applied egg-rr97.5%
*-commutative97.5%
associate-/l*96.1%
Applied egg-rr96.1%
if -1 < z < 1Initial program 84.2%
*-commutative84.2%
frac-times85.8%
associate-*l/84.2%
times-frac93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 91.5%
*-commutative91.5%
clear-num91.5%
frac-times87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
Final simplification91.9%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= z -1.0)
(/ (* (/ x_m z) (/ y_m z)) z)
(if (<= z 1.0) (/ y_m (* z (/ z x_m))) (* (/ x_m z) (/ (/ y_m z) z)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = ((x_m / z) * (y_m / z)) / z;
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = ((x_m / z) * (y_m / z)) / z
else if (z <= 1.0d0) then
tmp = y_m / (z * (z / x_m))
else
tmp = (x_m / z) * ((y_m / z) / z)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = ((x_m / z) * (y_m / z)) / z;
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= -1.0: tmp = ((x_m / z) * (y_m / z)) / z elif z <= 1.0: tmp = y_m / (z * (z / x_m)) else: tmp = (x_m / z) * ((y_m / z) / z) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= -1.0) tmp = Float64(Float64(Float64(x_m / z) * Float64(y_m / z)) / z); elseif (z <= 1.0) tmp = Float64(y_m / Float64(z * Float64(z / x_m))); else tmp = Float64(Float64(x_m / z) * Float64(Float64(y_m / z) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= -1.0)
tmp = ((x_m / z) * (y_m / z)) / z;
elseif (z <= 1.0)
tmp = y_m / (z * (z / x_m));
else
tmp = (x_m / z) * ((y_m / z) / z);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, -1.0], N[(N[(N[(x$95$m / z), $MachinePrecision] * N[(y$95$m / z), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.0], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * N[(N[(y$95$m / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;\frac{\frac{x\_m}{z} \cdot \frac{y\_m}{z}}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{\frac{y\_m}{z}}{z}\\
\end{array}\right)
\end{array}
if z < -1Initial program 84.1%
sqr-neg84.1%
times-frac91.4%
sqr-neg91.4%
Simplified91.4%
Taylor expanded in z around inf 87.8%
*-commutative87.8%
associate-/r*92.4%
associate-*r/96.1%
Applied egg-rr96.1%
if -1 < z < 1Initial program 84.2%
*-commutative84.2%
frac-times85.8%
associate-*l/84.2%
times-frac93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 91.5%
*-commutative91.5%
clear-num91.5%
frac-times87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
if 1 < z Initial program 90.3%
sqr-neg90.3%
times-frac96.0%
sqr-neg96.0%
Simplified96.0%
Taylor expanded in z around inf 95.0%
*-commutative95.0%
associate-/r*96.3%
associate-*r/98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification91.9%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= z -1.0)
(/ (/ x_m z) (* z (/ z y_m)))
(if (<= z 1.0) (/ y_m (* z (/ z x_m))) (* (/ x_m z) (/ (/ y_m z) z)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = (x_m / z) / (z * (z / y_m));
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = (x_m / z) / (z * (z / y_m))
else if (z <= 1.0d0) then
tmp = y_m / (z * (z / x_m))
else
tmp = (x_m / z) * ((y_m / z) / z)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = (x_m / z) / (z * (z / y_m));
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= -1.0: tmp = (x_m / z) / (z * (z / y_m)) elif z <= 1.0: tmp = y_m / (z * (z / x_m)) else: tmp = (x_m / z) * ((y_m / z) / z) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= -1.0) tmp = Float64(Float64(x_m / z) / Float64(z * Float64(z / y_m))); elseif (z <= 1.0) tmp = Float64(y_m / Float64(z * Float64(z / x_m))); else tmp = Float64(Float64(x_m / z) * Float64(Float64(y_m / z) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= -1.0)
tmp = (x_m / z) / (z * (z / y_m));
elseif (z <= 1.0)
tmp = y_m / (z * (z / x_m));
else
tmp = (x_m / z) * ((y_m / z) / z);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, -1.0], N[(N[(x$95$m / z), $MachinePrecision] / N[(z * N[(z / y$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * N[(N[(y$95$m / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;\frac{\frac{x\_m}{z}}{z \cdot \frac{z}{y\_m}}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{\frac{y\_m}{z}}{z}\\
\end{array}\right)
\end{array}
if z < -1Initial program 84.1%
sqr-neg84.1%
times-frac91.4%
sqr-neg91.4%
Simplified91.4%
Taylor expanded in z around inf 87.8%
*-commutative87.8%
clear-num87.8%
associate-/r*92.4%
frac-times96.2%
*-un-lft-identity96.2%
Applied egg-rr96.2%
if -1 < z < 1Initial program 84.2%
*-commutative84.2%
frac-times85.8%
associate-*l/84.2%
times-frac93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 91.5%
*-commutative91.5%
clear-num91.5%
frac-times87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
if 1 < z Initial program 90.3%
sqr-neg90.3%
times-frac96.0%
sqr-neg96.0%
Simplified96.0%
Taylor expanded in z around inf 95.0%
*-commutative95.0%
associate-/r*96.3%
associate-*r/98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification92.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= z -1.0)
(/ (/ (/ x_m z) (/ z y_m)) z)
(if (<= z 1.0) (/ y_m (* z (/ z x_m))) (* (/ x_m z) (/ (/ y_m z) z)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = ((x_m / z) / (z / y_m)) / z;
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = ((x_m / z) / (z / y_m)) / z
else if (z <= 1.0d0) then
tmp = y_m / (z * (z / x_m))
else
tmp = (x_m / z) * ((y_m / z) / z)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = ((x_m / z) / (z / y_m)) / z;
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= -1.0: tmp = ((x_m / z) / (z / y_m)) / z elif z <= 1.0: tmp = y_m / (z * (z / x_m)) else: tmp = (x_m / z) * ((y_m / z) / z) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= -1.0) tmp = Float64(Float64(Float64(x_m / z) / Float64(z / y_m)) / z); elseif (z <= 1.0) tmp = Float64(y_m / Float64(z * Float64(z / x_m))); else tmp = Float64(Float64(x_m / z) * Float64(Float64(y_m / z) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= -1.0)
tmp = ((x_m / z) / (z / y_m)) / z;
elseif (z <= 1.0)
tmp = y_m / (z * (z / x_m));
else
tmp = (x_m / z) * ((y_m / z) / z);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, -1.0], N[(N[(N[(x$95$m / z), $MachinePrecision] / N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.0], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * N[(N[(y$95$m / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;\frac{\frac{\frac{x\_m}{z}}{\frac{z}{y\_m}}}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{\frac{y\_m}{z}}{z}\\
\end{array}\right)
\end{array}
if z < -1Initial program 84.1%
sqr-neg84.1%
times-frac91.4%
sqr-neg91.4%
Simplified91.4%
Taylor expanded in z around inf 87.8%
*-commutative87.8%
associate-/r*92.4%
associate-*r/96.1%
Applied egg-rr96.1%
*-commutative96.1%
clear-num96.2%
un-div-inv96.2%
Applied egg-rr96.2%
if -1 < z < 1Initial program 84.2%
*-commutative84.2%
frac-times85.8%
associate-*l/84.2%
times-frac93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 91.5%
*-commutative91.5%
clear-num91.5%
frac-times87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
if 1 < z Initial program 90.3%
sqr-neg90.3%
times-frac96.0%
sqr-neg96.0%
Simplified96.0%
Taylor expanded in z around inf 95.0%
*-commutative95.0%
associate-/r*96.3%
associate-*r/98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification92.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= z -1.0)
(/ (/ (/ x_m (/ z y_m)) z) z)
(if (<= z 1.0) (/ y_m (* z (/ z x_m))) (* (/ x_m z) (/ (/ y_m z) z)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = ((x_m / (z / y_m)) / z) / z;
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.0d0)) then
tmp = ((x_m / (z / y_m)) / z) / z
else if (z <= 1.0d0) then
tmp = y_m / (z * (z / x_m))
else
tmp = (x_m / z) * ((y_m / z) / z)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.0) {
tmp = ((x_m / (z / y_m)) / z) / z;
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= -1.0: tmp = ((x_m / (z / y_m)) / z) / z elif z <= 1.0: tmp = y_m / (z * (z / x_m)) else: tmp = (x_m / z) * ((y_m / z) / z) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= -1.0) tmp = Float64(Float64(Float64(x_m / Float64(z / y_m)) / z) / z); elseif (z <= 1.0) tmp = Float64(y_m / Float64(z * Float64(z / x_m))); else tmp = Float64(Float64(x_m / z) * Float64(Float64(y_m / z) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= -1.0)
tmp = ((x_m / (z / y_m)) / z) / z;
elseif (z <= 1.0)
tmp = y_m / (z * (z / x_m));
else
tmp = (x_m / z) * ((y_m / z) / z);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, -1.0], N[(N[(N[(x$95$m / N[(z / y$95$m), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.0], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * N[(N[(y$95$m / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1:\\
\;\;\;\;\frac{\frac{\frac{x\_m}{\frac{z}{y\_m}}}{z}}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{\frac{y\_m}{z}}{z}\\
\end{array}\right)
\end{array}
if z < -1Initial program 84.1%
associate-*l/86.0%
*-commutative86.0%
sqr-neg86.0%
associate-/r*89.1%
sqr-neg89.1%
Simplified89.1%
associate-/l/86.0%
associate-/r*89.1%
associate-/l*93.5%
associate-/r*99.7%
associate-*r/91.7%
*-commutative91.7%
associate-*r/99.7%
clear-num99.6%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 96.2%
if -1 < z < 1Initial program 84.2%
*-commutative84.2%
frac-times85.8%
associate-*l/84.2%
times-frac93.0%
Applied egg-rr93.0%
Taylor expanded in z around 0 91.5%
*-commutative91.5%
clear-num91.5%
frac-times87.4%
*-un-lft-identity87.4%
Applied egg-rr87.4%
if 1 < z Initial program 90.3%
sqr-neg90.3%
times-frac96.0%
sqr-neg96.0%
Simplified96.0%
Taylor expanded in z around inf 95.0%
*-commutative95.0%
associate-/r*96.3%
associate-*r/98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification92.0%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= z -1.15e-15)
(* (/ y_m z) (/ (/ x_m (+ z 1.0)) z))
(if (<= z 1.0) (/ y_m (* z (/ z x_m))) (* (/ x_m z) (/ (/ y_m z) z)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.15e-15) {
tmp = (y_m / z) * ((x_m / (z + 1.0)) / z);
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-1.15d-15)) then
tmp = (y_m / z) * ((x_m / (z + 1.0d0)) / z)
else if (z <= 1.0d0) then
tmp = y_m / (z * (z / x_m))
else
tmp = (x_m / z) * ((y_m / z) / z)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -1.15e-15) {
tmp = (y_m / z) * ((x_m / (z + 1.0)) / z);
} else if (z <= 1.0) {
tmp = y_m / (z * (z / x_m));
} else {
tmp = (x_m / z) * ((y_m / z) / z);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= -1.15e-15: tmp = (y_m / z) * ((x_m / (z + 1.0)) / z) elif z <= 1.0: tmp = y_m / (z * (z / x_m)) else: tmp = (x_m / z) * ((y_m / z) / z) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= -1.15e-15) tmp = Float64(Float64(y_m / z) * Float64(Float64(x_m / Float64(z + 1.0)) / z)); elseif (z <= 1.0) tmp = Float64(y_m / Float64(z * Float64(z / x_m))); else tmp = Float64(Float64(x_m / z) * Float64(Float64(y_m / z) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= -1.15e-15)
tmp = (y_m / z) * ((x_m / (z + 1.0)) / z);
elseif (z <= 1.0)
tmp = y_m / (z * (z / x_m));
else
tmp = (x_m / z) * ((y_m / z) / z);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, -1.15e-15], N[(N[(y$95$m / z), $MachinePrecision] * N[(N[(x$95$m / N[(z + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x$95$m / z), $MachinePrecision] * N[(N[(y$95$m / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-15}:\\
\;\;\;\;\frac{y\_m}{z} \cdot \frac{\frac{x\_m}{z + 1}}{z}\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{y\_m}{z \cdot \frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{\frac{y\_m}{z}}{z}\\
\end{array}\right)
\end{array}
if z < -1.14999999999999995e-15Initial program 84.6%
*-commutative84.6%
frac-times93.7%
associate-*l/93.8%
times-frac96.0%
Applied egg-rr96.0%
if -1.14999999999999995e-15 < z < 1Initial program 84.0%
*-commutative84.0%
frac-times85.6%
associate-*l/84.0%
times-frac92.9%
Applied egg-rr92.9%
Taylor expanded in z around 0 92.0%
*-commutative92.0%
clear-num92.0%
frac-times87.8%
*-un-lft-identity87.8%
Applied egg-rr87.8%
if 1 < z Initial program 90.3%
sqr-neg90.3%
times-frac96.0%
sqr-neg96.0%
Simplified96.0%
Taylor expanded in z around inf 95.0%
*-commutative95.0%
associate-/r*96.3%
associate-*r/98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/l*96.2%
Applied egg-rr96.2%
Final simplification92.2%
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
y_m = (fabs.f64 y)
y_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (or (<= z -1.0) (not (<= z -5e-310)))
(/ y_m (/ z x_m))
(* x_m (/ y_m (- z)))))))x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if ((z <= -1.0) || !(z <= -5e-310)) {
tmp = y_m / (z / x_m);
} else {
tmp = x_m * (y_m / -z);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= (-5d-310)))) then
tmp = y_m / (z / x_m)
else
tmp = x_m * (y_m / -z)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if ((z <= -1.0) || !(z <= -5e-310)) {
tmp = y_m / (z / x_m);
} else {
tmp = x_m * (y_m / -z);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if (z <= -1.0) or not (z <= -5e-310): tmp = y_m / (z / x_m) else: tmp = x_m * (y_m / -z) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if ((z <= -1.0) || !(z <= -5e-310)) tmp = Float64(y_m / Float64(z / x_m)); else tmp = Float64(x_m * Float64(y_m / Float64(-z))); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if ((z <= -1.0) || ~((z <= -5e-310)))
tmp = y_m / (z / x_m);
else
tmp = x_m * (y_m / -z);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, -5e-310]], $MachinePrecision]], N[(y$95$m / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(y$95$m / (-z)), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq -5 \cdot 10^{-310}\right):\\
\;\;\;\;\frac{y\_m}{\frac{z}{x\_m}}\\
\mathbf{else}:\\
\;\;\;\;x\_m \cdot \frac{y\_m}{-z}\\
\end{array}\right)
\end{array}
if z < -1 or -4.999999999999985e-310 < z Initial program 86.2%
*-commutative86.2%
frac-times91.9%
associate-*l/91.4%
times-frac95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 53.7%
neg-mul-153.7%
+-commutative53.7%
unsub-neg53.7%
Simplified53.7%
Taylor expanded in z around inf 18.6%
associate-*r/24.0%
associate-*r*24.0%
neg-mul-124.0%
Simplified24.0%
*-commutative24.0%
add-sqr-sqrt11.4%
sqrt-unprod30.3%
sqr-neg30.3%
sqrt-unprod18.4%
add-sqr-sqrt38.5%
associate-/r/41.2%
Applied egg-rr41.2%
if -1 < z < -4.999999999999985e-310Initial program 84.9%
*-commutative84.9%
frac-times84.9%
associate-*l/85.0%
times-frac91.6%
Applied egg-rr91.6%
Taylor expanded in z around 0 90.7%
neg-mul-190.7%
+-commutative90.7%
unsub-neg90.7%
Simplified90.7%
Taylor expanded in z around inf 26.2%
associate-*r/34.7%
associate-*r*34.7%
neg-mul-134.7%
Simplified34.7%
Final simplification39.7%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (if (<= y_m 5e+53) (* (/ x_m z) (/ y_m z)) (* y_m (/ x_m (* z z)))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (y_m <= 5e+53) {
tmp = (x_m / z) * (y_m / z);
} else {
tmp = y_m * (x_m / (z * z));
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (y_m <= 5d+53) then
tmp = (x_m / z) * (y_m / z)
else
tmp = y_m * (x_m / (z * z))
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (y_m <= 5e+53) {
tmp = (x_m / z) * (y_m / z);
} else {
tmp = y_m * (x_m / (z * z));
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if y_m <= 5e+53: tmp = (x_m / z) * (y_m / z) else: tmp = y_m * (x_m / (z * z)) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (y_m <= 5e+53) tmp = Float64(Float64(x_m / z) * Float64(y_m / z)); else tmp = Float64(y_m * Float64(x_m / Float64(z * z))); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (y_m <= 5e+53)
tmp = (x_m / z) * (y_m / z);
else
tmp = y_m * (x_m / (z * z));
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[y$95$m, 5e+53], N[(N[(x$95$m / z), $MachinePrecision] * N[(y$95$m / z), $MachinePrecision]), $MachinePrecision], N[(y$95$m * N[(x$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;y\_m \leq 5 \cdot 10^{+53}:\\
\;\;\;\;\frac{x\_m}{z} \cdot \frac{y\_m}{z}\\
\mathbf{else}:\\
\;\;\;\;y\_m \cdot \frac{x\_m}{z \cdot z}\\
\end{array}\right)
\end{array}
if y < 5.0000000000000004e53Initial program 86.7%
*-commutative86.7%
frac-times89.1%
associate-*l/88.2%
times-frac94.8%
Applied egg-rr94.8%
Taylor expanded in z around 0 72.2%
if 5.0000000000000004e53 < y Initial program 83.3%
sqr-neg83.3%
times-frac95.4%
sqr-neg95.4%
Simplified95.4%
Taylor expanded in z around 0 76.8%
Final simplification73.3%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (if (<= z -5e-310) (* y_m (/ x_m (- z))) (/ y_m (/ z x_m))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -5e-310) {
tmp = y_m * (x_m / -z);
} else {
tmp = y_m / (z / x_m);
}
return y_s * (x_s * tmp);
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-5d-310)) then
tmp = y_m * (x_m / -z)
else
tmp = y_m / (z / x_m)
end if
code = y_s * (x_s * tmp)
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= -5e-310) {
tmp = y_m * (x_m / -z);
} else {
tmp = y_m / (z / x_m);
}
return y_s * (x_s * tmp);
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= -5e-310: tmp = y_m * (x_m / -z) else: tmp = y_m / (z / x_m) return y_s * (x_s * tmp)
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= -5e-310) tmp = Float64(y_m * Float64(x_m / Float64(-z))); else tmp = Float64(y_m / Float64(z / x_m)); end return Float64(y_s * Float64(x_s * tmp)) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= -5e-310)
tmp = y_m * (x_m / -z);
else
tmp = y_m / (z / x_m);
end
tmp_2 = y_s * (x_s * tmp);
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, -5e-310], N[(y$95$m * N[(x$95$m / (-z)), $MachinePrecision]), $MachinePrecision], N[(y$95$m / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-310}:\\
\;\;\;\;y\_m \cdot \frac{x\_m}{-z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y\_m}{\frac{z}{x\_m}}\\
\end{array}\right)
\end{array}
if z < -4.999999999999985e-310Initial program 84.5%
*-commutative84.5%
frac-times89.4%
associate-*l/89.4%
times-frac93.9%
Applied egg-rr93.9%
Taylor expanded in z around 0 59.6%
neg-mul-159.6%
+-commutative59.6%
unsub-neg59.6%
Simplified59.6%
Taylor expanded in z around inf 26.0%
associate-*r/32.8%
associate-*r*32.8%
neg-mul-132.8%
Simplified32.8%
distribute-lft-neg-out32.8%
associate-/l*26.0%
div-inv26.0%
*-commutative26.0%
associate-*r*31.8%
div-inv31.8%
Applied egg-rr31.8%
if -4.999999999999985e-310 < z Initial program 87.1%
*-commutative87.1%
frac-times91.2%
associate-*l/90.4%
times-frac95.8%
Applied egg-rr95.8%
Taylor expanded in z around 0 63.6%
neg-mul-163.6%
+-commutative63.6%
unsub-neg63.6%
Simplified63.6%
Taylor expanded in z around inf 15.4%
associate-*r/20.9%
associate-*r*20.9%
neg-mul-120.9%
Simplified20.9%
*-commutative20.9%
add-sqr-sqrt10.8%
sqrt-unprod29.8%
sqr-neg29.8%
sqrt-unprod18.0%
add-sqr-sqrt40.9%
associate-/r/44.4%
Applied egg-rr44.4%
Final simplification38.6%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (* y_m (/ x_m (* z z))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (y_m * (x_m / (z * z))));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = y_s * (x_s * (y_m * (x_m / (z * z))))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (y_m * (x_m / (z * z))));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * (y_m * (x_m / (z * z))))
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(y_m * Float64(x_m / Float64(z * z))))) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * (y_m * (x_m / (z * z))));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(y$95$m * N[(x$95$m / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \left(y\_m \cdot \frac{x\_m}{z \cdot z}\right)\right)
\end{array}
Initial program 85.9%
sqr-neg85.9%
times-frac88.6%
sqr-neg88.6%
Simplified88.6%
Taylor expanded in z around 0 69.8%
Final simplification69.8%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (/ y_m (* z (/ z x_m))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (y_m / (z * (z / x_m))));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = y_s * (x_s * (y_m / (z * (z / x_m))))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (y_m / (z * (z / x_m))));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * (y_m / (z * (z / x_m))))
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(y_m / Float64(z * Float64(z / x_m))))) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * (y_m / (z * (z / x_m))));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(y$95$m / N[(z * N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{y\_m}{z \cdot \frac{z}{x\_m}}\right)
\end{array}
Initial program 85.9%
*-commutative85.9%
frac-times90.3%
associate-*l/90.0%
times-frac94.9%
Applied egg-rr94.9%
Taylor expanded in z around 0 71.2%
*-commutative71.2%
clear-num71.2%
frac-times72.3%
*-un-lft-identity72.3%
Applied egg-rr72.3%
Final simplification72.3%
x_m = (fabs.f64 x) x_s = (copysign.f64 1 x) y_m = (fabs.f64 y) y_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (/ y_m (/ z x_m)))))
x_m = fabs(x);
x_s = copysign(1.0, x);
y_m = fabs(y);
y_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (y_m / (z / x_m)));
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
y_m = abs(y)
y_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = y_s * (x_s * (y_m / (z / x_m)))
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
y_m = Math.abs(y);
y_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (y_m / (z / x_m)));
}
x_m = math.fabs(x) x_s = math.copysign(1.0, x) y_m = math.fabs(y) y_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * (y_m / (z / x_m)))
x_m = abs(x) x_s = copysign(1.0, x) y_m = abs(y) y_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(y_m / Float64(z / x_m)))) end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
y_m = abs(y);
y_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * (y_m / (z / x_m)));
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y_m = N[Abs[y], $MachinePrecision]
y_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(y$95$m / N[(z / x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
y_m = \left|y\right|
\\
y_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{y\_m}{\frac{z}{x\_m}}\right)
\end{array}
Initial program 85.9%
*-commutative85.9%
frac-times90.3%
associate-*l/90.0%
times-frac94.9%
Applied egg-rr94.9%
Taylor expanded in z around 0 61.8%
neg-mul-161.8%
+-commutative61.8%
unsub-neg61.8%
Simplified61.8%
Taylor expanded in z around inf 20.3%
associate-*r/26.3%
associate-*r*26.3%
neg-mul-126.3%
Simplified26.3%
*-commutative26.3%
add-sqr-sqrt12.4%
sqrt-unprod26.2%
sqr-neg26.2%
sqrt-unprod14.5%
add-sqr-sqrt30.3%
associate-/r/32.4%
Applied egg-rr32.4%
Final simplification32.4%
(FPCore (x y z) :precision binary64 (if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z)))
double code(double x, double y, double z) {
double tmp;
if (z < 249.6182814532307) {
tmp = (y * (x / z)) / (z + (z * z));
} else {
tmp = (((y / z) / (1.0 + z)) * x) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z < 249.6182814532307d0) then
tmp = (y * (x / z)) / (z + (z * z))
else
tmp = (((y / z) / (1.0d0 + z)) * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z < 249.6182814532307) {
tmp = (y * (x / z)) / (z + (z * z));
} else {
tmp = (((y / z) / (1.0 + z)) * x) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z < 249.6182814532307: tmp = (y * (x / z)) / (z + (z * z)) else: tmp = (((y / z) / (1.0 + z)) * x) / z return tmp
function code(x, y, z) tmp = 0.0 if (z < 249.6182814532307) tmp = Float64(Float64(y * Float64(x / z)) / Float64(z + Float64(z * z))); else tmp = Float64(Float64(Float64(Float64(y / z) / Float64(1.0 + z)) * x) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z < 249.6182814532307) tmp = (y * (x / z)) / (z + (z * z)); else tmp = (((y / z) / (1.0 + z)) * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Less[z, 249.6182814532307], N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] / N[(z + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y / z), $MachinePrecision] / N[(1.0 + z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < 249.6182814532307:\\
\;\;\;\;\frac{y \cdot \frac{x}{z}}{z + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{y}{z}}{1 + z} \cdot x}{z}\\
\end{array}
\end{array}
herbie shell --seed 2024048
(FPCore (x y z)
:name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
:precision binary64
:alt
(if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z))
(/ (* x y) (* (* z z) (+ z 1.0))))