
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
real(8) function code(x, y, z, t, a)
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 * 9.0d0) * t)) / (a * 2.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
def code(x, y, z, t, a): return ((x * y) - ((z * 9.0) * t)) / (a * 2.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - ((z * 9.0) * t)) / (a * 2.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))
double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
real(8) function code(x, y, z, t, a)
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 * 9.0d0) * t)) / (a * 2.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
def code(x, y, z, t, a): return ((x * y) - ((z * 9.0) * t)) / (a * 2.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x * y) - ((z * 9.0) * t)) / (a * 2.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\end{array}
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* a_m 2.0) 400000.0)
(/ (- (* x y) (* (* z 9.0) t)) (* a_m 2.0))
(- (* y (/ x (* a_m 2.0))) (* t (/ (* z 9.0) (* a_m 2.0)))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (y * (x / (a_m * 2.0))) - (t * ((z * 9.0) / (a_m * 2.0)));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((a_m * 2.0d0) <= 400000.0d0) then
tmp = ((x * y) - ((z * 9.0d0) * t)) / (a_m * 2.0d0)
else
tmp = (y * (x / (a_m * 2.0d0))) - (t * ((z * 9.0d0) / (a_m * 2.0d0)))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (y * (x / (a_m * 2.0))) - (t * ((z * 9.0) / (a_m * 2.0)));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (a_m * 2.0) <= 400000.0: tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0) else: tmp = (y * (x / (a_m * 2.0))) - (t * ((z * 9.0) / (a_m * 2.0))) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(a_m * 2.0) <= 400000.0) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a_m * 2.0)); else tmp = Float64(Float64(y * Float64(x / Float64(a_m * 2.0))) - Float64(t * Float64(Float64(z * 9.0) / Float64(a_m * 2.0)))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((a_m * 2.0) <= 400000.0)
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
else
tmp = (y * (x / (a_m * 2.0))) - (t * ((z * 9.0) / (a_m * 2.0)));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(a$95$m * 2.0), $MachinePrecision], 400000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(z * 9.0), $MachinePrecision] / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \cdot 2 \leq 400000:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a\_m \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a\_m \cdot 2} - t \cdot \frac{z \cdot 9}{a\_m \cdot 2}\\
\end{array}
\end{array}
if (*.f64 a 2) < 4e5Initial program 95.2%
if 4e5 < (*.f64 a 2) Initial program 81.4%
div-sub81.4%
*-commutative81.4%
associate-/l*86.7%
*-commutative86.7%
associate-/l*92.9%
Applied egg-rr92.9%
Final simplification94.8%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* x y) -1000.0)
(* (/ x a_m) (* y 0.5))
(if (<= (* x y) 4e-63)
(* (* z t) (/ -4.5 a_m))
(if (<= (* x y) 4e+55)
(/ 0.5 (/ a_m (* x y)))
(if (<= (* x y) 2e+113)
(* (/ z a_m) (* t -4.5))
(* 0.5 (* x (/ y a_m)))))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -1000.0) {
tmp = (x / a_m) * (y * 0.5);
} else if ((x * y) <= 4e-63) {
tmp = (z * t) * (-4.5 / a_m);
} else if ((x * y) <= 4e+55) {
tmp = 0.5 / (a_m / (x * y));
} else if ((x * y) <= 2e+113) {
tmp = (z / a_m) * (t * -4.5);
} else {
tmp = 0.5 * (x * (y / a_m));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((x * y) <= (-1000.0d0)) then
tmp = (x / a_m) * (y * 0.5d0)
else if ((x * y) <= 4d-63) then
tmp = (z * t) * ((-4.5d0) / a_m)
else if ((x * y) <= 4d+55) then
tmp = 0.5d0 / (a_m / (x * y))
else if ((x * y) <= 2d+113) then
tmp = (z / a_m) * (t * (-4.5d0))
else
tmp = 0.5d0 * (x * (y / a_m))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -1000.0) {
tmp = (x / a_m) * (y * 0.5);
} else if ((x * y) <= 4e-63) {
tmp = (z * t) * (-4.5 / a_m);
} else if ((x * y) <= 4e+55) {
tmp = 0.5 / (a_m / (x * y));
} else if ((x * y) <= 2e+113) {
tmp = (z / a_m) * (t * -4.5);
} else {
tmp = 0.5 * (x * (y / a_m));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (x * y) <= -1000.0: tmp = (x / a_m) * (y * 0.5) elif (x * y) <= 4e-63: tmp = (z * t) * (-4.5 / a_m) elif (x * y) <= 4e+55: tmp = 0.5 / (a_m / (x * y)) elif (x * y) <= 2e+113: tmp = (z / a_m) * (t * -4.5) else: tmp = 0.5 * (x * (y / a_m)) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(x * y) <= -1000.0) tmp = Float64(Float64(x / a_m) * Float64(y * 0.5)); elseif (Float64(x * y) <= 4e-63) tmp = Float64(Float64(z * t) * Float64(-4.5 / a_m)); elseif (Float64(x * y) <= 4e+55) tmp = Float64(0.5 / Float64(a_m / Float64(x * y))); elseif (Float64(x * y) <= 2e+113) tmp = Float64(Float64(z / a_m) * Float64(t * -4.5)); else tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((x * y) <= -1000.0)
tmp = (x / a_m) * (y * 0.5);
elseif ((x * y) <= 4e-63)
tmp = (z * t) * (-4.5 / a_m);
elseif ((x * y) <= 4e+55)
tmp = 0.5 / (a_m / (x * y));
elseif ((x * y) <= 2e+113)
tmp = (z / a_m) * (t * -4.5);
else
tmp = 0.5 * (x * (y / a_m));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -1000.0], N[(N[(x / a$95$m), $MachinePrecision] * N[(y * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-63], N[(N[(z * t), $MachinePrecision] * N[(-4.5 / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+55], N[(0.5 / N[(a$95$m / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+113], N[(N[(z / a$95$m), $MachinePrecision] * N[(t * -4.5), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1000:\\
\;\;\;\;\frac{x}{a\_m} \cdot \left(y \cdot 0.5\right)\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-63}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \frac{-4.5}{a\_m}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+55}:\\
\;\;\;\;\frac{0.5}{\frac{a\_m}{x \cdot y}}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+113}:\\
\;\;\;\;\frac{z}{a\_m} \cdot \left(t \cdot -4.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1e3Initial program 88.7%
associate-/l/88.7%
div-sub88.7%
associate-/l*88.7%
fma-neg88.7%
*-commutative88.7%
associate-/l*88.7%
distribute-rgt-neg-out88.7%
distribute-frac-neg88.7%
distribute-rgt-neg-in88.7%
associate-/l*88.7%
metadata-eval88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in x around inf 77.5%
*-commutative77.5%
associate-*r*77.5%
*-commutative77.5%
Simplified77.5%
*-commutative77.5%
associate-/l*80.3%
*-commutative80.3%
Applied egg-rr80.3%
if -1e3 < (*.f64 x y) < 4.00000000000000027e-63Initial program 98.6%
Taylor expanded in x around 0 84.8%
associate-*r/84.9%
*-commutative84.9%
*-commutative84.9%
associate-/l*84.9%
*-commutative84.9%
Simplified84.9%
if 4.00000000000000027e-63 < (*.f64 x y) < 4.00000000000000004e55Initial program 92.6%
Taylor expanded in x around inf 55.5%
associate-/l*41.8%
Simplified41.8%
associate-*r/55.5%
clear-num55.5%
associate-/r*45.5%
un-div-inv45.5%
associate-/r*55.5%
Applied egg-rr55.5%
if 4.00000000000000004e55 < (*.f64 x y) < 2e113Initial program 90.7%
associate-/l/90.7%
div-sub90.7%
associate-/l*90.7%
fma-neg90.7%
*-commutative90.7%
associate-/l*90.7%
distribute-rgt-neg-out90.7%
distribute-frac-neg90.7%
distribute-rgt-neg-in90.7%
associate-/l*90.7%
metadata-eval90.7%
metadata-eval90.7%
Simplified90.7%
Taylor expanded in x around 0 59.6%
associate-*r*59.5%
*-commutative59.5%
associate-*r*59.5%
Simplified59.5%
associate-*r*59.5%
associate-/l*77.9%
*-commutative77.9%
Applied egg-rr77.9%
if 2e113 < (*.f64 x y) Initial program 86.1%
Taylor expanded in x around inf 79.8%
associate-/l*85.7%
Simplified85.7%
Final simplification80.6%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* x y) -1000.0)
(* (/ x a_m) (* y 0.5))
(if (<= (* x y) 4e-63)
(/ (* t (* z -4.5)) a_m)
(if (<= (* x y) 4e+55)
(/ 0.5 (/ a_m (* x y)))
(if (<= (* x y) 2e+113)
(* (/ z a_m) (* t -4.5))
(* 0.5 (* x (/ y a_m)))))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -1000.0) {
tmp = (x / a_m) * (y * 0.5);
} else if ((x * y) <= 4e-63) {
tmp = (t * (z * -4.5)) / a_m;
} else if ((x * y) <= 4e+55) {
tmp = 0.5 / (a_m / (x * y));
} else if ((x * y) <= 2e+113) {
tmp = (z / a_m) * (t * -4.5);
} else {
tmp = 0.5 * (x * (y / a_m));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((x * y) <= (-1000.0d0)) then
tmp = (x / a_m) * (y * 0.5d0)
else if ((x * y) <= 4d-63) then
tmp = (t * (z * (-4.5d0))) / a_m
else if ((x * y) <= 4d+55) then
tmp = 0.5d0 / (a_m / (x * y))
else if ((x * y) <= 2d+113) then
tmp = (z / a_m) * (t * (-4.5d0))
else
tmp = 0.5d0 * (x * (y / a_m))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -1000.0) {
tmp = (x / a_m) * (y * 0.5);
} else if ((x * y) <= 4e-63) {
tmp = (t * (z * -4.5)) / a_m;
} else if ((x * y) <= 4e+55) {
tmp = 0.5 / (a_m / (x * y));
} else if ((x * y) <= 2e+113) {
tmp = (z / a_m) * (t * -4.5);
} else {
tmp = 0.5 * (x * (y / a_m));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (x * y) <= -1000.0: tmp = (x / a_m) * (y * 0.5) elif (x * y) <= 4e-63: tmp = (t * (z * -4.5)) / a_m elif (x * y) <= 4e+55: tmp = 0.5 / (a_m / (x * y)) elif (x * y) <= 2e+113: tmp = (z / a_m) * (t * -4.5) else: tmp = 0.5 * (x * (y / a_m)) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(x * y) <= -1000.0) tmp = Float64(Float64(x / a_m) * Float64(y * 0.5)); elseif (Float64(x * y) <= 4e-63) tmp = Float64(Float64(t * Float64(z * -4.5)) / a_m); elseif (Float64(x * y) <= 4e+55) tmp = Float64(0.5 / Float64(a_m / Float64(x * y))); elseif (Float64(x * y) <= 2e+113) tmp = Float64(Float64(z / a_m) * Float64(t * -4.5)); else tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((x * y) <= -1000.0)
tmp = (x / a_m) * (y * 0.5);
elseif ((x * y) <= 4e-63)
tmp = (t * (z * -4.5)) / a_m;
elseif ((x * y) <= 4e+55)
tmp = 0.5 / (a_m / (x * y));
elseif ((x * y) <= 2e+113)
tmp = (z / a_m) * (t * -4.5);
else
tmp = 0.5 * (x * (y / a_m));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], -1000.0], N[(N[(x / a$95$m), $MachinePrecision] * N[(y * 0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e-63], N[(N[(t * N[(z * -4.5), $MachinePrecision]), $MachinePrecision] / a$95$m), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 4e+55], N[(0.5 / N[(a$95$m / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e+113], N[(N[(z / a$95$m), $MachinePrecision] * N[(t * -4.5), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -1000:\\
\;\;\;\;\frac{x}{a\_m} \cdot \left(y \cdot 0.5\right)\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-63}:\\
\;\;\;\;\frac{t \cdot \left(z \cdot -4.5\right)}{a\_m}\\
\mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{+55}:\\
\;\;\;\;\frac{0.5}{\frac{a\_m}{x \cdot y}}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{+113}:\\
\;\;\;\;\frac{z}{a\_m} \cdot \left(t \cdot -4.5\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\end{array}
\end{array}
if (*.f64 x y) < -1e3Initial program 88.7%
associate-/l/88.7%
div-sub88.7%
associate-/l*88.7%
fma-neg88.7%
*-commutative88.7%
associate-/l*88.7%
distribute-rgt-neg-out88.7%
distribute-frac-neg88.7%
distribute-rgt-neg-in88.7%
associate-/l*88.7%
metadata-eval88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in x around inf 77.5%
*-commutative77.5%
associate-*r*77.5%
*-commutative77.5%
Simplified77.5%
*-commutative77.5%
associate-/l*80.3%
*-commutative80.3%
Applied egg-rr80.3%
if -1e3 < (*.f64 x y) < 4.00000000000000027e-63Initial program 98.6%
associate-/l/98.6%
div-sub98.6%
associate-/l*98.6%
fma-neg98.6%
*-commutative98.6%
associate-/l*98.6%
distribute-rgt-neg-out98.6%
distribute-frac-neg98.6%
distribute-rgt-neg-in98.6%
associate-/l*98.6%
metadata-eval98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 84.9%
associate-*r*85.0%
*-commutative85.0%
associate-*r*85.0%
Simplified85.0%
if 4.00000000000000027e-63 < (*.f64 x y) < 4.00000000000000004e55Initial program 92.6%
Taylor expanded in x around inf 55.5%
associate-/l*41.8%
Simplified41.8%
associate-*r/55.5%
clear-num55.5%
associate-/r*45.5%
un-div-inv45.5%
associate-/r*55.5%
Applied egg-rr55.5%
if 4.00000000000000004e55 < (*.f64 x y) < 2e113Initial program 90.7%
associate-/l/90.7%
div-sub90.7%
associate-/l*90.7%
fma-neg90.7%
*-commutative90.7%
associate-/l*90.7%
distribute-rgt-neg-out90.7%
distribute-frac-neg90.7%
distribute-rgt-neg-in90.7%
associate-/l*90.7%
metadata-eval90.7%
metadata-eval90.7%
Simplified90.7%
Taylor expanded in x around 0 59.6%
associate-*r*59.5%
*-commutative59.5%
associate-*r*59.5%
Simplified59.5%
associate-*r*59.5%
associate-/l*77.9%
*-commutative77.9%
Applied egg-rr77.9%
if 2e113 < (*.f64 x y) Initial program 86.1%
Taylor expanded in x around inf 79.8%
associate-/l*85.7%
Simplified85.7%
Final simplification80.6%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* (/ x a_m) (* y 0.5))))
(*
a_s
(if (<= z -1.55e+95)
(* -4.5 (* t (/ z a_m)))
(if (<= z -5.9e+50)
t_1
(if (<= z -8.4e+40)
(* (* z t) (/ -4.5 a_m))
(if (<= z -1.3e-113)
(* 0.5 (* x (/ y a_m)))
(if (<= z 3.6e-17) t_1 (* z (* -4.5 (/ t a_m)))))))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (x / a_m) * (y * 0.5);
double tmp;
if (z <= -1.55e+95) {
tmp = -4.5 * (t * (z / a_m));
} else if (z <= -5.9e+50) {
tmp = t_1;
} else if (z <= -8.4e+40) {
tmp = (z * t) * (-4.5 / a_m);
} else if (z <= -1.3e-113) {
tmp = 0.5 * (x * (y / a_m));
} else if (z <= 3.6e-17) {
tmp = t_1;
} else {
tmp = z * (-4.5 * (t / a_m));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: t_1
real(8) :: tmp
t_1 = (x / a_m) * (y * 0.5d0)
if (z <= (-1.55d+95)) then
tmp = (-4.5d0) * (t * (z / a_m))
else if (z <= (-5.9d+50)) then
tmp = t_1
else if (z <= (-8.4d+40)) then
tmp = (z * t) * ((-4.5d0) / a_m)
else if (z <= (-1.3d-113)) then
tmp = 0.5d0 * (x * (y / a_m))
else if (z <= 3.6d-17) then
tmp = t_1
else
tmp = z * ((-4.5d0) * (t / a_m))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (x / a_m) * (y * 0.5);
double tmp;
if (z <= -1.55e+95) {
tmp = -4.5 * (t * (z / a_m));
} else if (z <= -5.9e+50) {
tmp = t_1;
} else if (z <= -8.4e+40) {
tmp = (z * t) * (-4.5 / a_m);
} else if (z <= -1.3e-113) {
tmp = 0.5 * (x * (y / a_m));
} else if (z <= 3.6e-17) {
tmp = t_1;
} else {
tmp = z * (-4.5 * (t / a_m));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): t_1 = (x / a_m) * (y * 0.5) tmp = 0 if z <= -1.55e+95: tmp = -4.5 * (t * (z / a_m)) elif z <= -5.9e+50: tmp = t_1 elif z <= -8.4e+40: tmp = (z * t) * (-4.5 / a_m) elif z <= -1.3e-113: tmp = 0.5 * (x * (y / a_m)) elif z <= 3.6e-17: tmp = t_1 else: tmp = z * (-4.5 * (t / a_m)) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(x / a_m) * Float64(y * 0.5)) tmp = 0.0 if (z <= -1.55e+95) tmp = Float64(-4.5 * Float64(t * Float64(z / a_m))); elseif (z <= -5.9e+50) tmp = t_1; elseif (z <= -8.4e+40) tmp = Float64(Float64(z * t) * Float64(-4.5 / a_m)); elseif (z <= -1.3e-113) tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); elseif (z <= 3.6e-17) tmp = t_1; else tmp = Float64(z * Float64(-4.5 * Float64(t / a_m))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = (x / a_m) * (y * 0.5);
tmp = 0.0;
if (z <= -1.55e+95)
tmp = -4.5 * (t * (z / a_m));
elseif (z <= -5.9e+50)
tmp = t_1;
elseif (z <= -8.4e+40)
tmp = (z * t) * (-4.5 / a_m);
elseif (z <= -1.3e-113)
tmp = 0.5 * (x * (y / a_m));
elseif (z <= 3.6e-17)
tmp = t_1;
else
tmp = z * (-4.5 * (t / a_m));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x / a$95$m), $MachinePrecision] * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[z, -1.55e+95], N[(-4.5 * N[(t * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.9e+50], t$95$1, If[LessEqual[z, -8.4e+40], N[(N[(z * t), $MachinePrecision] * N[(-4.5 / a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.3e-113], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-17], t$95$1, N[(z * N[(-4.5 * N[(t / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := \frac{x}{a\_m} \cdot \left(y \cdot 0.5\right)\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{+95}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a\_m}\right)\\
\mathbf{elif}\;z \leq -5.9 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -8.4 \cdot 10^{+40}:\\
\;\;\;\;\left(z \cdot t\right) \cdot \frac{-4.5}{a\_m}\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-113}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a\_m}\right)\\
\end{array}
\end{array}
\end{array}
if z < -1.5500000000000001e95Initial program 86.7%
Taylor expanded in x around 0 66.0%
associate-/l*70.5%
Simplified70.5%
if -1.5500000000000001e95 < z < -5.8999999999999998e50 or -1.3e-113 < z < 3.59999999999999995e-17Initial program 94.1%
associate-/l/94.1%
div-sub94.1%
associate-/l*94.1%
fma-neg94.1%
*-commutative94.1%
associate-/l*94.1%
distribute-rgt-neg-out94.1%
distribute-frac-neg94.1%
distribute-rgt-neg-in94.1%
associate-/l*94.1%
metadata-eval94.1%
metadata-eval94.1%
Simplified94.1%
Taylor expanded in x around inf 72.5%
*-commutative72.5%
associate-*r*72.5%
*-commutative72.5%
Simplified72.5%
*-commutative72.5%
associate-/l*71.6%
*-commutative71.6%
Applied egg-rr71.6%
if -5.8999999999999998e50 < z < -8.4000000000000004e40Initial program 99.6%
Taylor expanded in x around 0 99.6%
associate-*r/99.6%
*-commutative99.6%
*-commutative99.6%
associate-/l*100.0%
*-commutative100.0%
Simplified100.0%
if -8.4000000000000004e40 < z < -1.3e-113Initial program 94.0%
Taylor expanded in x around inf 62.1%
associate-/l*62.2%
Simplified62.2%
if 3.59999999999999995e-17 < z Initial program 93.3%
associate-/l/93.3%
div-sub93.3%
associate-/l*93.3%
fma-neg93.3%
*-commutative93.3%
associate-/l*93.3%
distribute-rgt-neg-out93.3%
distribute-frac-neg93.3%
distribute-rgt-neg-in93.3%
associate-/l*93.3%
metadata-eval93.3%
metadata-eval93.3%
Simplified93.3%
Taylor expanded in x around 0 61.0%
associate-*r*61.1%
*-commutative61.1%
associate-*r*61.0%
Simplified61.0%
associate-*r*61.1%
associate-/l*64.8%
*-commutative64.8%
metadata-eval64.8%
associate-/l*64.8%
times-frac61.1%
associate-/l*62.3%
*-commutative62.3%
*-commutative62.3%
*-commutative62.3%
times-frac62.3%
metadata-eval62.3%
Applied egg-rr62.3%
Final simplification68.0%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(let* ((t_1 (* (/ x a_m) (* y 0.5))) (t_2 (* (/ z a_m) (* t -4.5))))
(*
a_s
(if (<= z -6.2e+95)
(* -4.5 (* t (/ z a_m)))
(if (<= z -4.1e+50)
t_1
(if (<= z -7.7e+40)
t_2
(if (<= z -1.02e-112)
(* 0.5 (* x (/ y a_m)))
(if (<= z 1.15e-29) t_1 t_2))))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (x / a_m) * (y * 0.5);
double t_2 = (z / a_m) * (t * -4.5);
double tmp;
if (z <= -6.2e+95) {
tmp = -4.5 * (t * (z / a_m));
} else if (z <= -4.1e+50) {
tmp = t_1;
} else if (z <= -7.7e+40) {
tmp = t_2;
} else if (z <= -1.02e-112) {
tmp = 0.5 * (x * (y / a_m));
} else if (z <= 1.15e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x / a_m) * (y * 0.5d0)
t_2 = (z / a_m) * (t * (-4.5d0))
if (z <= (-6.2d+95)) then
tmp = (-4.5d0) * (t * (z / a_m))
else if (z <= (-4.1d+50)) then
tmp = t_1
else if (z <= (-7.7d+40)) then
tmp = t_2
else if (z <= (-1.02d-112)) then
tmp = 0.5d0 * (x * (y / a_m))
else if (z <= 1.15d-29) then
tmp = t_1
else
tmp = t_2
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double t_1 = (x / a_m) * (y * 0.5);
double t_2 = (z / a_m) * (t * -4.5);
double tmp;
if (z <= -6.2e+95) {
tmp = -4.5 * (t * (z / a_m));
} else if (z <= -4.1e+50) {
tmp = t_1;
} else if (z <= -7.7e+40) {
tmp = t_2;
} else if (z <= -1.02e-112) {
tmp = 0.5 * (x * (y / a_m));
} else if (z <= 1.15e-29) {
tmp = t_1;
} else {
tmp = t_2;
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): t_1 = (x / a_m) * (y * 0.5) t_2 = (z / a_m) * (t * -4.5) tmp = 0 if z <= -6.2e+95: tmp = -4.5 * (t * (z / a_m)) elif z <= -4.1e+50: tmp = t_1 elif z <= -7.7e+40: tmp = t_2 elif z <= -1.02e-112: tmp = 0.5 * (x * (y / a_m)) elif z <= 1.15e-29: tmp = t_1 else: tmp = t_2 return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) t_1 = Float64(Float64(x / a_m) * Float64(y * 0.5)) t_2 = Float64(Float64(z / a_m) * Float64(t * -4.5)) tmp = 0.0 if (z <= -6.2e+95) tmp = Float64(-4.5 * Float64(t * Float64(z / a_m))); elseif (z <= -4.1e+50) tmp = t_1; elseif (z <= -7.7e+40) tmp = t_2; elseif (z <= -1.02e-112) tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); elseif (z <= 1.15e-29) tmp = t_1; else tmp = t_2; end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
t_1 = (x / a_m) * (y * 0.5);
t_2 = (z / a_m) * (t * -4.5);
tmp = 0.0;
if (z <= -6.2e+95)
tmp = -4.5 * (t * (z / a_m));
elseif (z <= -4.1e+50)
tmp = t_1;
elseif (z <= -7.7e+40)
tmp = t_2;
elseif (z <= -1.02e-112)
tmp = 0.5 * (x * (y / a_m));
elseif (z <= 1.15e-29)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := Block[{t$95$1 = N[(N[(x / a$95$m), $MachinePrecision] * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / a$95$m), $MachinePrecision] * N[(t * -4.5), $MachinePrecision]), $MachinePrecision]}, N[(a$95$s * If[LessEqual[z, -6.2e+95], N[(-4.5 * N[(t * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.1e+50], t$95$1, If[LessEqual[z, -7.7e+40], t$95$2, If[LessEqual[z, -1.02e-112], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15e-29], t$95$1, t$95$2]]]]]), $MachinePrecision]]]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
\begin{array}{l}
t_1 := \frac{x}{a\_m} \cdot \left(y \cdot 0.5\right)\\
t_2 := \frac{z}{a\_m} \cdot \left(t \cdot -4.5\right)\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+95}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a\_m}\right)\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.7 \cdot 10^{+40}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{-112}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-29}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
\end{array}
if z < -6.2000000000000006e95Initial program 86.7%
Taylor expanded in x around 0 66.0%
associate-/l*70.5%
Simplified70.5%
if -6.2000000000000006e95 < z < -4.1000000000000001e50 or -1.01999999999999996e-112 < z < 1.14999999999999996e-29Initial program 94.0%
associate-/l/94.0%
div-sub94.0%
associate-/l*94.0%
fma-neg94.0%
*-commutative94.0%
associate-/l*94.0%
distribute-rgt-neg-out94.0%
distribute-frac-neg94.0%
distribute-rgt-neg-in94.0%
associate-/l*94.0%
metadata-eval94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in x around inf 72.3%
*-commutative72.3%
associate-*r*72.3%
*-commutative72.3%
Simplified72.3%
*-commutative72.3%
associate-/l*71.3%
*-commutative71.3%
Applied egg-rr71.3%
if -4.1000000000000001e50 < z < -7.69999999999999964e40 or 1.14999999999999996e-29 < z Initial program 93.7%
associate-/l/93.7%
div-sub93.7%
associate-/l*93.7%
fma-neg93.7%
*-commutative93.7%
associate-/l*93.7%
distribute-rgt-neg-out93.7%
distribute-frac-neg93.7%
distribute-rgt-neg-in93.7%
associate-/l*93.7%
metadata-eval93.7%
metadata-eval93.7%
Simplified93.7%
Taylor expanded in x around 0 62.2%
associate-*r*62.3%
*-commutative62.3%
associate-*r*62.3%
Simplified62.3%
associate-*r*62.3%
associate-/l*65.8%
*-commutative65.8%
Applied egg-rr65.8%
if -7.69999999999999964e40 < z < -1.01999999999999996e-112Initial program 94.0%
Taylor expanded in x around inf 62.1%
associate-/l*62.2%
Simplified62.2%
Final simplification68.3%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* a_m 2.0) 400000.0)
(/ (- (* x y) (* (* z 9.0) t)) (* a_m 2.0))
(+ (* -4.5 (/ (* z t) a_m)) (* 0.5 (* y (/ x a_m)))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (-4.5 * ((z * t) / a_m)) + (0.5 * (y * (x / a_m)));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((a_m * 2.0d0) <= 400000.0d0) then
tmp = ((x * y) - ((z * 9.0d0) * t)) / (a_m * 2.0d0)
else
tmp = ((-4.5d0) * ((z * t) / a_m)) + (0.5d0 * (y * (x / a_m)))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (-4.5 * ((z * t) / a_m)) + (0.5 * (y * (x / a_m)));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (a_m * 2.0) <= 400000.0: tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0) else: tmp = (-4.5 * ((z * t) / a_m)) + (0.5 * (y * (x / a_m))) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(a_m * 2.0) <= 400000.0) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a_m * 2.0)); else tmp = Float64(Float64(-4.5 * Float64(Float64(z * t) / a_m)) + Float64(0.5 * Float64(y * Float64(x / a_m)))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((a_m * 2.0) <= 400000.0)
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
else
tmp = (-4.5 * ((z * t) / a_m)) + (0.5 * (y * (x / a_m)));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(a$95$m * 2.0), $MachinePrecision], 400000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a$95$m), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(y * N[(x / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \cdot 2 \leq 400000:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a\_m \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a\_m} + 0.5 \cdot \left(y \cdot \frac{x}{a\_m}\right)\\
\end{array}
\end{array}
if (*.f64 a 2) < 4e5Initial program 95.2%
if 4e5 < (*.f64 a 2) Initial program 81.4%
Taylor expanded in x around 0 81.3%
clear-num81.3%
associate-/r*84.7%
associate-/r/84.8%
clear-num86.7%
Applied egg-rr86.7%
Final simplification93.6%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* a_m 2.0) 400000.0)
(/ (- (* x y) (* (* z 9.0) t)) (* a_m 2.0))
(- (* y (/ x (* a_m 2.0))) (* z (/ t (* a_m 0.2222222222222222)))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (y * (x / (a_m * 2.0))) - (z * (t / (a_m * 0.2222222222222222)));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((a_m * 2.0d0) <= 400000.0d0) then
tmp = ((x * y) - ((z * 9.0d0) * t)) / (a_m * 2.0d0)
else
tmp = (y * (x / (a_m * 2.0d0))) - (z * (t / (a_m * 0.2222222222222222d0)))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (y * (x / (a_m * 2.0))) - (z * (t / (a_m * 0.2222222222222222)));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (a_m * 2.0) <= 400000.0: tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0) else: tmp = (y * (x / (a_m * 2.0))) - (z * (t / (a_m * 0.2222222222222222))) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(a_m * 2.0) <= 400000.0) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a_m * 2.0)); else tmp = Float64(Float64(y * Float64(x / Float64(a_m * 2.0))) - Float64(z * Float64(t / Float64(a_m * 0.2222222222222222)))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((a_m * 2.0) <= 400000.0)
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
else
tmp = (y * (x / (a_m * 2.0))) - (z * (t / (a_m * 0.2222222222222222)));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(a$95$m * 2.0), $MachinePrecision], 400000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t / N[(a$95$m * 0.2222222222222222), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \cdot 2 \leq 400000:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a\_m \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a\_m \cdot 2} - z \cdot \frac{t}{a\_m \cdot 0.2222222222222222}\\
\end{array}
\end{array}
if (*.f64 a 2) < 4e5Initial program 95.2%
if 4e5 < (*.f64 a 2) Initial program 81.4%
div-sub81.4%
*-commutative81.4%
associate-/l*86.7%
*-commutative86.7%
associate-/l*92.9%
Applied egg-rr92.9%
clear-num92.9%
un-div-inv92.8%
*-commutative92.8%
*-commutative92.8%
times-frac92.8%
metadata-eval92.8%
Applied egg-rr92.8%
associate-*r/92.9%
*-commutative92.9%
associate-/r/90.2%
Simplified90.2%
Final simplification94.3%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* a_m 2.0) 400000.0)
(/ (- (* x y) (* (* z 9.0) t)) (* a_m 2.0))
(- (* y (/ x (* a_m 2.0))) (/ t (/ (* a_m 0.2222222222222222) z))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (y * (x / (a_m * 2.0))) - (t / ((a_m * 0.2222222222222222) / z));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((a_m * 2.0d0) <= 400000.0d0) then
tmp = ((x * y) - ((z * 9.0d0) * t)) / (a_m * 2.0d0)
else
tmp = (y * (x / (a_m * 2.0d0))) - (t / ((a_m * 0.2222222222222222d0) / z))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((a_m * 2.0) <= 400000.0) {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
} else {
tmp = (y * (x / (a_m * 2.0))) - (t / ((a_m * 0.2222222222222222) / z));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (a_m * 2.0) <= 400000.0: tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0) else: tmp = (y * (x / (a_m * 2.0))) - (t / ((a_m * 0.2222222222222222) / z)) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(a_m * 2.0) <= 400000.0) tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a_m * 2.0)); else tmp = Float64(Float64(y * Float64(x / Float64(a_m * 2.0))) - Float64(t / Float64(Float64(a_m * 0.2222222222222222) / z))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((a_m * 2.0) <= 400000.0)
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
else
tmp = (y * (x / (a_m * 2.0))) - (t / ((a_m * 0.2222222222222222) / z));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(a$95$m * 2.0), $MachinePrecision], 400000.0], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t / N[(N[(a$95$m * 0.2222222222222222), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \cdot 2 \leq 400000:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a\_m \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a\_m \cdot 2} - \frac{t}{\frac{a\_m \cdot 0.2222222222222222}{z}}\\
\end{array}
\end{array}
if (*.f64 a 2) < 4e5Initial program 95.2%
if 4e5 < (*.f64 a 2) Initial program 81.4%
div-sub81.4%
*-commutative81.4%
associate-/l*86.7%
*-commutative86.7%
associate-/l*92.9%
Applied egg-rr92.9%
clear-num92.9%
un-div-inv92.8%
*-commutative92.8%
*-commutative92.8%
times-frac92.8%
metadata-eval92.8%
Applied egg-rr92.8%
associate-*r/92.9%
*-commutative92.9%
Simplified92.9%
Final simplification94.8%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= (* x y) (- INFINITY))
(* 0.5 (* x (/ y a_m)))
(/ (- (* x y) (* (* z 9.0) t)) (* a_m 2.0)))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = 0.5 * (x * (y / a_m));
} else {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
}
return a_s * tmp;
}
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((x * y) <= -Double.POSITIVE_INFINITY) {
tmp = 0.5 * (x * (y / a_m));
} else {
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (x * y) <= -math.inf: tmp = 0.5 * (x * (y / a_m)) else: tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); else tmp = Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a_m * 2.0)); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((x * y) <= -Inf)
tmp = 0.5 * (x * (y / a_m));
else
tmp = ((x * y) - ((z * 9.0) * t)) / (a_m * 2.0);
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a$95$m * 2.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a\_m \cdot 2}\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 49.4%
Taylor expanded in x around inf 49.9%
associate-/l*93.7%
Simplified93.7%
if -inf.0 < (*.f64 x y) Initial program 95.0%
Final simplification94.9%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (or (<= t -3e-149) (not (<= t 1.2e+90)))
(* -4.5 (* t (/ z a_m)))
(* 0.5 (* x (/ y a_m))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((t <= -3e-149) || !(t <= 1.2e+90)) {
tmp = -4.5 * (t * (z / a_m));
} else {
tmp = 0.5 * (x * (y / a_m));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if ((t <= (-3d-149)) .or. (.not. (t <= 1.2d+90))) then
tmp = (-4.5d0) * (t * (z / a_m))
else
tmp = 0.5d0 * (x * (y / a_m))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if ((t <= -3e-149) || !(t <= 1.2e+90)) {
tmp = -4.5 * (t * (z / a_m));
} else {
tmp = 0.5 * (x * (y / a_m));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if (t <= -3e-149) or not (t <= 1.2e+90): tmp = -4.5 * (t * (z / a_m)) else: tmp = 0.5 * (x * (y / a_m)) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if ((t <= -3e-149) || !(t <= 1.2e+90)) tmp = Float64(-4.5 * Float64(t * Float64(z / a_m))); else tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if ((t <= -3e-149) || ~((t <= 1.2e+90)))
tmp = -4.5 * (t * (z / a_m));
else
tmp = 0.5 * (x * (y / a_m));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[Or[LessEqual[t, -3e-149], N[Not[LessEqual[t, 1.2e+90]], $MachinePrecision]], N[(-4.5 * N[(t * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-149} \lor \neg \left(t \leq 1.2 \cdot 10^{+90}\right):\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\end{array}
\end{array}
if t < -3.0000000000000002e-149 or 1.20000000000000005e90 < t Initial program 90.7%
Taylor expanded in x around 0 62.1%
associate-/l*63.0%
Simplified63.0%
if -3.0000000000000002e-149 < t < 1.20000000000000005e90Initial program 95.1%
Taylor expanded in x around inf 77.2%
associate-/l*76.5%
Simplified76.5%
Final simplification69.2%
a_m = (fabs.f64 a)
a_s = (copysign.f64 1 a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
(FPCore (a_s x y z t a_m)
:precision binary64
(*
a_s
(if (<= t -2.3e-149)
(* -4.5 (* t (/ z a_m)))
(if (<= t 1.36e+90) (* 0.5 (* x (/ y a_m))) (* z (* -4.5 (/ t a_m)))))))a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if (t <= -2.3e-149) {
tmp = -4.5 * (t * (z / a_m));
} else if (t <= 1.36e+90) {
tmp = 0.5 * (x * (y / a_m));
} else {
tmp = z * (-4.5 * (t / a_m));
}
return a_s * tmp;
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
real(8) :: tmp
if (t <= (-2.3d-149)) then
tmp = (-4.5d0) * (t * (z / a_m))
else if (t <= 1.36d+90) then
tmp = 0.5d0 * (x * (y / a_m))
else
tmp = z * ((-4.5d0) * (t / a_m))
end if
code = a_s * tmp
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
double tmp;
if (t <= -2.3e-149) {
tmp = -4.5 * (t * (z / a_m));
} else if (t <= 1.36e+90) {
tmp = 0.5 * (x * (y / a_m));
} else {
tmp = z * (-4.5 * (t / a_m));
}
return a_s * tmp;
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): tmp = 0 if t <= -2.3e-149: tmp = -4.5 * (t * (z / a_m)) elif t <= 1.36e+90: tmp = 0.5 * (x * (y / a_m)) else: tmp = z * (-4.5 * (t / a_m)) return a_s * tmp
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) tmp = 0.0 if (t <= -2.3e-149) tmp = Float64(-4.5 * Float64(t * Float64(z / a_m))); elseif (t <= 1.36e+90) tmp = Float64(0.5 * Float64(x * Float64(y / a_m))); else tmp = Float64(z * Float64(-4.5 * Float64(t / a_m))); end return Float64(a_s * tmp) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp_2 = code(a_s, x, y, z, t, a_m)
tmp = 0.0;
if (t <= -2.3e-149)
tmp = -4.5 * (t * (z / a_m));
elseif (t <= 1.36e+90)
tmp = 0.5 * (x * (y / a_m));
else
tmp = z * (-4.5 * (t / a_m));
end
tmp_2 = a_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * If[LessEqual[t, -2.3e-149], N[(-4.5 * N[(t * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e+90], N[(0.5 * N[(x * N[(y / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(-4.5 * N[(t / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-149}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a\_m}\right)\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+90}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a\_m}\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-4.5 \cdot \frac{t}{a\_m}\right)\\
\end{array}
\end{array}
if t < -2.3e-149Initial program 91.7%
Taylor expanded in x around 0 53.8%
associate-/l*55.3%
Simplified55.3%
if -2.3e-149 < t < 1.3600000000000001e90Initial program 95.1%
Taylor expanded in x around inf 77.2%
associate-/l*76.5%
Simplified76.5%
if 1.3600000000000001e90 < t Initial program 89.0%
associate-/l/89.0%
div-sub89.0%
associate-/l*89.0%
fma-neg89.0%
*-commutative89.0%
associate-/l*90.7%
distribute-rgt-neg-out90.7%
distribute-frac-neg90.7%
distribute-rgt-neg-in90.7%
associate-/l*90.7%
metadata-eval90.7%
metadata-eval90.7%
Simplified90.7%
Taylor expanded in x around 0 75.8%
associate-*r*75.9%
*-commutative75.9%
associate-*r*75.9%
Simplified75.9%
associate-*r*75.9%
associate-/l*75.8%
*-commutative75.8%
metadata-eval75.8%
associate-/l*75.8%
times-frac74.2%
associate-/l*75.8%
*-commutative75.8%
*-commutative75.8%
*-commutative75.8%
times-frac75.8%
metadata-eval75.8%
Applied egg-rr75.8%
Final simplification69.2%
a_m = (fabs.f64 a) a_s = (copysign.f64 1 a) NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function. (FPCore (a_s x y z t a_m) :precision binary64 (* a_s (* -4.5 (* t (/ z a_m)))))
a_m = fabs(a);
a_s = copysign(1.0, a);
assert(x < y && y < z && z < t && t < a_m);
assert(x < y && y < z && z < t && t < a_m);
double code(double a_s, double x, double y, double z, double t, double a_m) {
return a_s * (-4.5 * (t * (z / a_m)));
}
a_m = abs(a)
a_s = copysign(1.0d0, a)
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
real(8) function code(a_s, x, y, z, t, a_m)
real(8), intent (in) :: a_s
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_m
code = a_s * ((-4.5d0) * (t * (z / a_m)))
end function
a_m = Math.abs(a);
a_s = Math.copySign(1.0, a);
assert x < y && y < z && z < t && t < a_m;
assert x < y && y < z && z < t && t < a_m;
public static double code(double a_s, double x, double y, double z, double t, double a_m) {
return a_s * (-4.5 * (t * (z / a_m)));
}
a_m = math.fabs(a) a_s = math.copysign(1.0, a) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) [x, y, z, t, a_m] = sort([x, y, z, t, a_m]) def code(a_s, x, y, z, t, a_m): return a_s * (-4.5 * (t * (z / a_m)))
a_m = abs(a) a_s = copysign(1.0, a) x, y, z, t, a_m = sort([x, y, z, t, a_m]) x, y, z, t, a_m = sort([x, y, z, t, a_m]) function code(a_s, x, y, z, t, a_m) return Float64(a_s * Float64(-4.5 * Float64(t * Float64(z / a_m)))) end
a_m = abs(a);
a_s = sign(a) * abs(1.0);
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
x, y, z, t, a_m = num2cell(sort([x, y, z, t, a_m])){:}
function tmp = code(a_s, x, y, z, t, a_m)
tmp = a_s * (-4.5 * (t * (z / a_m)));
end
a_m = N[Abs[a], $MachinePrecision]
a_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[a]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a_m should be sorted in increasing order before calling this function.
code[a$95$s_, x_, y_, z_, t_, a$95$m_] := N[(a$95$s * N[(-4.5 * N[(t * N[(z / a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
a_s = \mathsf{copysign}\left(1, a\right)
\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\\\
[x, y, z, t, a_m] = \mathsf{sort}([x, y, z, t, a_m])\\
\\
a\_s \cdot \left(-4.5 \cdot \left(t \cdot \frac{z}{a\_m}\right)\right)
\end{array}
Initial program 92.7%
Taylor expanded in x around 0 48.7%
associate-/l*49.2%
Simplified49.2%
Final simplification49.2%
(FPCore (x y z t a)
:precision binary64
(if (< a -2.090464557976709e+86)
(- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z))))
(if (< a 2.144030707833976e+99)
(/ (- (* x y) (* z (* 9.0 t))) (* a 2.0))
(- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a < -2.090464557976709e+86) {
tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
} else if (a < 2.144030707833976e+99) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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
real(8) :: tmp
if (a < (-2.090464557976709d+86)) then
tmp = (0.5d0 * ((y * x) / a)) - (4.5d0 * (t / (a / z)))
else if (a < 2.144030707833976d+99) then
tmp = ((x * y) - (z * (9.0d0 * t))) / (a * 2.0d0)
else
tmp = ((y / a) * (x * 0.5d0)) - ((t / a) * (z * 4.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a < -2.090464557976709e+86) {
tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z)));
} else if (a < 2.144030707833976e+99) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a < -2.090464557976709e+86: tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z))) elif a < 2.144030707833976e+99: tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0) else: tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a < -2.090464557976709e+86) tmp = Float64(Float64(0.5 * Float64(Float64(y * x) / a)) - Float64(4.5 * Float64(t / Float64(a / z)))); elseif (a < 2.144030707833976e+99) tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0)); else tmp = Float64(Float64(Float64(y / a) * Float64(x * 0.5)) - Float64(Float64(t / a) * Float64(z * 4.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a < -2.090464557976709e+86) tmp = (0.5 * ((y * x) / a)) - (4.5 * (t / (a / z))); elseif (a < 2.144030707833976e+99) tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0); else tmp = ((y / a) * (x * 0.5)) - ((t / a) * (z * 4.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Less[a, -2.090464557976709e+86], N[(N[(0.5 * N[(N[(y * x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] - N[(4.5 * N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[a, 2.144030707833976e+99], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / a), $MachinePrecision] * N[(x * 0.5), $MachinePrecision]), $MachinePrecision] - N[(N[(t / a), $MachinePrecision] * N[(z * 4.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a < -2.090464557976709 \cdot 10^{+86}:\\
\;\;\;\;0.5 \cdot \frac{y \cdot x}{a} - 4.5 \cdot \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;a < 2.144030707833976 \cdot 10^{+99}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(x \cdot 0.5\right) - \frac{t}{a} \cdot \left(z \cdot 4.5\right)\\
\end{array}
\end{array}
herbie shell --seed 2024039
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:herbie-target
(if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))