
(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 11 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}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* (* z 9.0) t))))
(if (<= t_1 (- INFINITY))
(* z (fma -4.5 (/ t a) (* x (* (/ y (* z a)) 0.5))))
(if (<= t_1 5e+302)
(/ (fma x y (* z (* t -9.0))) (* a 2.0))
(* y (+ (* -4.5 (/ (* z t) (* y a))) (* 0.5 (/ x a))))))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - ((z * 9.0) * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * fma(-4.5, (t / a), (x * ((y / (z * a)) * 0.5)));
} else if (t_1 <= 5e+302) {
tmp = fma(x, y, (z * (t * -9.0))) / (a * 2.0);
} else {
tmp = y * ((-4.5 * ((z * t) / (y * a))) + (0.5 * (x / a)));
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * fma(-4.5, Float64(t / a), Float64(x * Float64(Float64(y / Float64(z * a)) * 0.5)))); elseif (t_1 <= 5e+302) tmp = Float64(fma(x, y, Float64(z * Float64(t * -9.0))) / Float64(a * 2.0)); else tmp = Float64(y * Float64(Float64(-4.5 * Float64(Float64(z * t) / Float64(y * a))) + Float64(0.5 * Float64(x / a)))); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(-4.5 * N[(t / a), $MachinePrecision] + N[(x * N[(N[(y / N[(z * a), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(N[(x * y + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(-4.5 * N[(N[(z * t), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \mathsf{fma}\left(-4.5, \frac{t}{a}, x \cdot \left(\frac{y}{z \cdot a} \cdot 0.5\right)\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t \cdot -9\right)\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-4.5 \cdot \frac{z \cdot t}{y \cdot a} + 0.5 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < -inf.0Initial program 67.5%
div-sub67.5%
*-commutative67.5%
div-sub67.5%
cancel-sign-sub-inv67.5%
*-commutative67.5%
fma-define67.5%
distribute-rgt-neg-in67.5%
associate-*r*67.5%
distribute-lft-neg-in67.5%
*-commutative67.5%
distribute-rgt-neg-in67.5%
metadata-eval67.5%
Simplified67.5%
Taylor expanded in z around inf 79.4%
fma-define79.4%
*-commutative79.4%
associate-/l*95.7%
associate-*l*95.7%
*-commutative95.7%
Simplified95.7%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < 5e302Initial program 97.3%
div-sub95.3%
*-commutative95.3%
div-sub97.3%
cancel-sign-sub-inv97.3%
*-commutative97.3%
fma-define97.3%
distribute-rgt-neg-in97.3%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
distribute-rgt-neg-in97.3%
metadata-eval97.3%
Simplified97.3%
if 5e302 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) Initial program 64.6%
div-sub62.1%
*-commutative62.1%
div-sub64.6%
cancel-sign-sub-inv64.6%
*-commutative64.6%
fma-define69.6%
distribute-rgt-neg-in69.6%
associate-*r*69.6%
distribute-lft-neg-in69.6%
*-commutative69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
Simplified69.6%
Taylor expanded in y around inf 85.4%
Final simplification95.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* (* z 9.0) t))))
(if (<= t_1 (- INFINITY))
(- (* x (/ y (* a 2.0))) (* z (* t (/ 4.5 a))))
(if (<= t_1 5e+302)
(/ (fma x y (* z (* t -9.0))) (* a 2.0))
(* y (+ (* -4.5 (/ (* z t) (* y a))) (* 0.5 (/ x a))))))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - ((z * 9.0) * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
} else if (t_1 <= 5e+302) {
tmp = fma(x, y, (z * (t * -9.0))) / (a * 2.0);
} else {
tmp = y * ((-4.5 * ((z * t) / (y * a))) + (0.5 * (x / a)));
}
return tmp;
}
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x * Float64(y / Float64(a * 2.0))) - Float64(z * Float64(t * Float64(4.5 / a)))); elseif (t_1 <= 5e+302) tmp = Float64(fma(x, y, Float64(z * Float64(t * -9.0))) / Float64(a * 2.0)); else tmp = Float64(y * Float64(Float64(-4.5 * Float64(Float64(z * t) / Float64(y * a))) + Float64(0.5 * Float64(x / a)))); end return tmp end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(y / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t * N[(4.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(N[(x * y + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(-4.5 * N[(N[(z * t), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \frac{y}{a \cdot 2} - z \cdot \left(t \cdot \frac{4.5}{a}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t \cdot -9\right)\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-4.5 \cdot \frac{z \cdot t}{y \cdot a} + 0.5 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < -inf.0Initial program 67.5%
div-sub67.5%
*-commutative67.5%
div-sub67.5%
cancel-sign-sub-inv67.5%
*-commutative67.5%
fma-define67.5%
distribute-rgt-neg-in67.5%
associate-*r*67.5%
distribute-lft-neg-in67.5%
*-commutative67.5%
distribute-rgt-neg-in67.5%
metadata-eval67.5%
Simplified67.5%
*-un-lft-identity67.5%
*-un-lft-identity67.5%
*-commutative67.5%
associate-*r*67.5%
metadata-eval67.5%
distribute-rgt-neg-in67.5%
distribute-lft-neg-in67.5%
fmm-def67.5%
div-sub67.5%
associate-/l*83.7%
associate-*l*83.7%
associate-/l*95.5%
Applied egg-rr95.5%
Taylor expanded in t around 0 95.6%
*-commutative95.6%
associate-*l/95.5%
associate-/l*95.5%
Simplified95.5%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < 5e302Initial program 97.3%
div-sub95.3%
*-commutative95.3%
div-sub97.3%
cancel-sign-sub-inv97.3%
*-commutative97.3%
fma-define97.3%
distribute-rgt-neg-in97.3%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
distribute-rgt-neg-in97.3%
metadata-eval97.3%
Simplified97.3%
if 5e302 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) Initial program 64.6%
div-sub62.1%
*-commutative62.1%
div-sub64.6%
cancel-sign-sub-inv64.6%
*-commutative64.6%
fma-define69.6%
distribute-rgt-neg-in69.6%
associate-*r*69.6%
distribute-lft-neg-in69.6%
*-commutative69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
Simplified69.6%
Taylor expanded in y around inf 85.4%
Final simplification95.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* (* z 9.0) t))))
(if (<= t_1 (- INFINITY))
(- (* x (/ y (* a 2.0))) (* z (* t (/ 4.5 a))))
(if (<= t_1 5e+302)
(/ (- (* x y) (* z (* 9.0 t))) (* a 2.0))
(* y (+ (* -4.5 (/ (* z t) (* y a))) (* 0.5 (/ x a))))))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - ((z * 9.0) * t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
} else if (t_1 <= 5e+302) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = y * ((-4.5 * ((z * t) / (y * a))) + (0.5 * (x / a)));
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - ((z * 9.0) * t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
} else if (t_1 <= 5e+302) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = y * ((-4.5 * ((z * t) / (y * a))) + (0.5 * (x / a)));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - ((z * 9.0) * t) tmp = 0 if t_1 <= -math.inf: tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a))) elif t_1 <= 5e+302: tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0) else: tmp = y * ((-4.5 * ((z * t) / (y * a))) + (0.5 * (x / a))) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x * Float64(y / Float64(a * 2.0))) - Float64(z * Float64(t * Float64(4.5 / a)))); elseif (t_1 <= 5e+302) tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0)); else tmp = Float64(y * Float64(Float64(-4.5 * Float64(Float64(z * t) / Float64(y * a))) + Float64(0.5 * Float64(x / a)))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - ((z * 9.0) * t);
tmp = 0.0;
if (t_1 <= -Inf)
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
elseif (t_1 <= 5e+302)
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
else
tmp = y * ((-4.5 * ((z * t) / (y * a))) + (0.5 * (x / a)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x * N[(y / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t * N[(4.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(-4.5 * N[(N[(z * t), $MachinePrecision] / N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(x / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x \cdot \frac{y}{a \cdot 2} - z \cdot \left(t \cdot \frac{4.5}{a}\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-4.5 \cdot \frac{z \cdot t}{y \cdot a} + 0.5 \cdot \frac{x}{a}\right)\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < -inf.0Initial program 67.5%
div-sub67.5%
*-commutative67.5%
div-sub67.5%
cancel-sign-sub-inv67.5%
*-commutative67.5%
fma-define67.5%
distribute-rgt-neg-in67.5%
associate-*r*67.5%
distribute-lft-neg-in67.5%
*-commutative67.5%
distribute-rgt-neg-in67.5%
metadata-eval67.5%
Simplified67.5%
*-un-lft-identity67.5%
*-un-lft-identity67.5%
*-commutative67.5%
associate-*r*67.5%
metadata-eval67.5%
distribute-rgt-neg-in67.5%
distribute-lft-neg-in67.5%
fmm-def67.5%
div-sub67.5%
associate-/l*83.7%
associate-*l*83.7%
associate-/l*95.5%
Applied egg-rr95.5%
Taylor expanded in t around 0 95.6%
*-commutative95.6%
associate-*l/95.5%
associate-/l*95.5%
Simplified95.5%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < 5e302Initial program 97.3%
div-sub95.3%
*-commutative95.3%
div-sub97.3%
cancel-sign-sub-inv97.3%
*-commutative97.3%
fma-define97.3%
distribute-rgt-neg-in97.3%
associate-*r*97.3%
distribute-lft-neg-in97.3%
*-commutative97.3%
distribute-rgt-neg-in97.3%
metadata-eval97.3%
Simplified97.3%
*-commutative97.3%
associate-*r*97.3%
metadata-eval97.3%
distribute-rgt-neg-in97.3%
distribute-lft-neg-in97.3%
fmm-def97.3%
associate-*l*97.3%
Applied egg-rr97.3%
if 5e302 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) Initial program 64.6%
div-sub62.1%
*-commutative62.1%
div-sub64.6%
cancel-sign-sub-inv64.6%
*-commutative64.6%
fma-define69.6%
distribute-rgt-neg-in69.6%
associate-*r*69.6%
distribute-lft-neg-in69.6%
*-commutative69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
Simplified69.6%
Taylor expanded in y around inf 85.4%
Final simplification95.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* x y) (* (* z 9.0) t))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+258)))
(- (* x (/ y (* a 2.0))) (* z (* t (/ 4.5 a))))
(/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)))))assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - ((z * 9.0) * t);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+258)) {
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
} else {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
}
return tmp;
}
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x * y) - ((z * 9.0) * t);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+258)) {
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
} else {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): t_1 = (x * y) - ((z * 9.0) * t) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+258): tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a))) else: tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) t_1 = Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+258)) tmp = Float64(Float64(x * Float64(y / Float64(a * 2.0))) - Float64(z * Float64(t * Float64(4.5 / a)))); else tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
t_1 = (x * y) - ((z * 9.0) * t);
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 2e+258)))
tmp = (x * (y / (a * 2.0))) - (z * (t * (4.5 / a)));
else
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+258]], $MachinePrecision]], N[(N[(x * N[(y / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(t * N[(4.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot y - \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+258}\right):\\
\;\;\;\;x \cdot \frac{y}{a \cdot 2} - z \cdot \left(t \cdot \frac{4.5}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < -inf.0 or 2.00000000000000011e258 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) Initial program 69.0%
div-sub67.6%
*-commutative67.6%
div-sub69.0%
cancel-sign-sub-inv69.0%
*-commutative69.0%
fma-define71.9%
distribute-rgt-neg-in71.9%
associate-*r*71.9%
distribute-lft-neg-in71.9%
*-commutative71.9%
distribute-rgt-neg-in71.9%
metadata-eval71.9%
Simplified71.9%
*-un-lft-identity71.9%
*-un-lft-identity71.9%
*-commutative71.9%
associate-*r*71.9%
metadata-eval71.9%
distribute-rgt-neg-in71.9%
distribute-lft-neg-in71.9%
fmm-def69.0%
div-sub67.6%
associate-/l*84.8%
associate-*l*84.8%
associate-/l*92.7%
Applied egg-rr92.7%
Taylor expanded in t around 0 92.7%
*-commutative92.7%
associate-*l/92.7%
associate-/l*92.7%
Simplified92.7%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < 2.00000000000000011e258Initial program 97.2%
div-sub95.1%
*-commutative95.1%
div-sub97.2%
cancel-sign-sub-inv97.2%
*-commutative97.2%
fma-define97.2%
distribute-rgt-neg-in97.2%
associate-*r*97.2%
distribute-lft-neg-in97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
Simplified97.2%
*-commutative97.2%
associate-*r*97.2%
metadata-eval97.2%
distribute-rgt-neg-in97.2%
distribute-lft-neg-in97.2%
fmm-def97.2%
associate-*l*97.2%
Applied egg-rr97.2%
Final simplification95.9%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) -2e+15) (* y (/ x (* a 2.0))) (if (<= (* x y) 2e-139) (* t (/ (* z -4.5) a)) (/ x (* a (/ 2.0 y))))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+15) {
tmp = y * (x / (a * 2.0));
} else if ((x * y) <= 2e-139) {
tmp = t * ((z * -4.5) / a);
} else {
tmp = x / (a * (2.0 / y));
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 ((x * y) <= (-2d+15)) then
tmp = y * (x / (a * 2.0d0))
else if ((x * y) <= 2d-139) then
tmp = t * ((z * (-4.5d0)) / a)
else
tmp = x / (a * (2.0d0 / y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+15) {
tmp = y * (x / (a * 2.0));
} else if ((x * y) <= 2e-139) {
tmp = t * ((z * -4.5) / a);
} else {
tmp = x / (a * (2.0 / y));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+15: tmp = y * (x / (a * 2.0)) elif (x * y) <= 2e-139: tmp = t * ((z * -4.5) / a) else: tmp = x / (a * (2.0 / y)) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+15) tmp = Float64(y * Float64(x / Float64(a * 2.0))); elseif (Float64(x * y) <= 2e-139) tmp = Float64(t * Float64(Float64(z * -4.5) / a)); else tmp = Float64(x / Float64(a * Float64(2.0 / y))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= -2e+15)
tmp = y * (x / (a * 2.0));
elseif ((x * y) <= 2e-139)
tmp = t * ((z * -4.5) / a);
else
tmp = x / (a * (2.0 / y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+15], N[(y * N[(x / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 2e-139], N[(t * N[(N[(z * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x / N[(a * N[(2.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \frac{x}{a \cdot 2}\\
\mathbf{elif}\;x \cdot y \leq 2 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{z \cdot -4.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \frac{2}{y}}\\
\end{array}
\end{array}
if (*.f64 x y) < -2e15Initial program 90.6%
div-sub85.8%
*-commutative85.8%
div-sub90.6%
cancel-sign-sub-inv90.6%
*-commutative90.6%
fma-define90.7%
distribute-rgt-neg-in90.7%
associate-*r*90.7%
distribute-lft-neg-in90.7%
*-commutative90.7%
distribute-rgt-neg-in90.7%
metadata-eval90.7%
Simplified90.7%
*-commutative90.7%
associate-*r*90.7%
metadata-eval90.7%
distribute-rgt-neg-in90.7%
distribute-lft-neg-in90.7%
fmm-def90.6%
associate-*l*90.7%
Applied egg-rr90.7%
Taylor expanded in x around inf 80.9%
associate-*r/85.3%
*-commutative85.3%
metadata-eval85.3%
associate-/l*85.3%
*-rgt-identity85.3%
associate-/l*85.3%
associate-/r*85.3%
Simplified85.3%
clear-num85.4%
un-div-inv85.5%
*-un-lft-identity85.5%
times-frac85.3%
/-rgt-identity85.3%
Applied egg-rr85.3%
associate-*r/85.5%
associate-/r/80.7%
Simplified80.7%
if -2e15 < (*.f64 x y) < 2.00000000000000006e-139Initial program 92.5%
div-sub92.5%
*-commutative92.5%
div-sub92.5%
cancel-sign-sub-inv92.5%
*-commutative92.5%
fma-define92.5%
distribute-rgt-neg-in92.5%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
distribute-rgt-neg-in92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in x around 0 76.3%
associate-*r/76.3%
associate-*r*76.3%
associate-*l/75.5%
associate-*r/75.4%
associate-*l*75.5%
Simplified75.5%
Taylor expanded in t around 0 76.3%
associate-*r/76.3%
associate-*r*76.3%
associate-*r/75.1%
*-commutative75.1%
associate-*r*75.1%
associate-*r/75.2%
*-commutative75.2%
Simplified75.2%
if 2.00000000000000006e-139 < (*.f64 x y) Initial program 85.4%
div-sub83.3%
*-commutative83.3%
div-sub85.4%
cancel-sign-sub-inv85.4%
*-commutative85.4%
fma-define87.6%
distribute-rgt-neg-in87.6%
associate-*r*87.6%
distribute-lft-neg-in87.6%
*-commutative87.6%
distribute-rgt-neg-in87.6%
metadata-eval87.6%
Simplified87.6%
*-commutative87.6%
associate-*r*87.6%
metadata-eval87.6%
distribute-rgt-neg-in87.6%
distribute-lft-neg-in87.6%
fmm-def85.4%
associate-*l*85.4%
Applied egg-rr85.4%
Taylor expanded in x around inf 63.1%
associate-*r/68.9%
*-commutative68.9%
metadata-eval68.9%
associate-/l*68.9%
*-rgt-identity68.9%
associate-/l*68.9%
associate-/r*68.9%
Simplified68.9%
clear-num68.8%
un-div-inv69.6%
*-un-lft-identity69.6%
times-frac69.7%
/-rgt-identity69.7%
Applied egg-rr69.7%
Final simplification74.5%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= (* x y) 5e+302) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (* 0.5 (* x (/ y a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= 5e+302) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = 0.5 * (x * (y / a));
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 ((x * y) <= 5d+302) then
tmp = ((x * y) - (z * (9.0d0 * t))) / (a * 2.0d0)
else
tmp = 0.5d0 * (x * (y / a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= 5e+302) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = 0.5 * (x * (y / a));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x * y) <= 5e+302: tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0) else: tmp = 0.5 * (x * (y / a)) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= 5e+302) tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0)); else tmp = Float64(0.5 * Float64(x * Float64(y / a))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x * y) <= 5e+302)
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
else
tmp = 0.5 * (x * (y / a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], 5e+302], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\end{array}
\end{array}
if (*.f64 x y) < 5e302Initial program 93.3%
div-sub91.6%
*-commutative91.6%
div-sub93.3%
cancel-sign-sub-inv93.3%
*-commutative93.3%
fma-define93.3%
distribute-rgt-neg-in93.3%
associate-*r*93.3%
distribute-lft-neg-in93.3%
*-commutative93.3%
distribute-rgt-neg-in93.3%
metadata-eval93.3%
Simplified93.3%
*-commutative93.3%
associate-*r*93.3%
metadata-eval93.3%
distribute-rgt-neg-in93.3%
distribute-lft-neg-in93.3%
fmm-def93.3%
associate-*l*93.3%
Applied egg-rr93.3%
if 5e302 < (*.f64 x y) Initial program 54.5%
div-sub50.5%
*-commutative50.5%
div-sub54.5%
cancel-sign-sub-inv54.5%
*-commutative54.5%
fma-define62.5%
distribute-rgt-neg-in62.5%
associate-*r*62.5%
distribute-lft-neg-in62.5%
*-commutative62.5%
distribute-rgt-neg-in62.5%
metadata-eval62.5%
Simplified62.5%
Taylor expanded in x around inf 58.5%
associate-/l*91.8%
Simplified91.8%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= x -0.004) (not (<= x 2.2e-152))) (* 0.5 (* x (/ y a))) (* t (/ (* z -4.5) a))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.004) || !(x <= 2.2e-152)) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = t * ((z * -4.5) / a);
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 ((x <= (-0.004d0)) .or. (.not. (x <= 2.2d-152))) then
tmp = 0.5d0 * (x * (y / a))
else
tmp = t * ((z * (-4.5d0)) / a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.004) || !(x <= 2.2e-152)) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = t * ((z * -4.5) / a);
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x <= -0.004) or not (x <= 2.2e-152): tmp = 0.5 * (x * (y / a)) else: tmp = t * ((z * -4.5) / a) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((x <= -0.004) || !(x <= 2.2e-152)) tmp = Float64(0.5 * Float64(x * Float64(y / a))); else tmp = Float64(t * Float64(Float64(z * -4.5) / a)); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x <= -0.004) || ~((x <= 2.2e-152)))
tmp = 0.5 * (x * (y / a));
else
tmp = t * ((z * -4.5) / a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -0.004], N[Not[LessEqual[x, 2.2e-152]], $MachinePrecision]], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(z * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.004 \lor \neg \left(x \leq 2.2 \cdot 10^{-152}\right):\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{z \cdot -4.5}{a}\\
\end{array}
\end{array}
if x < -0.0040000000000000001 or 2.19999999999999985e-152 < x Initial program 88.8%
div-sub86.3%
*-commutative86.3%
div-sub88.8%
cancel-sign-sub-inv88.8%
*-commutative88.8%
fma-define90.0%
distribute-rgt-neg-in90.0%
associate-*r*90.0%
distribute-lft-neg-in90.0%
*-commutative90.0%
distribute-rgt-neg-in90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in x around inf 61.7%
associate-/l*66.7%
Simplified66.7%
if -0.0040000000000000001 < x < 2.19999999999999985e-152Initial program 90.8%
div-sub89.8%
*-commutative89.8%
div-sub90.8%
cancel-sign-sub-inv90.8%
*-commutative90.8%
fma-define90.8%
distribute-rgt-neg-in90.8%
associate-*r*90.8%
distribute-lft-neg-in90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 62.6%
associate-*r/62.5%
associate-*r*62.5%
associate-*l/65.6%
associate-*r/65.5%
associate-*l*65.6%
Simplified65.6%
Taylor expanded in t around 0 62.6%
associate-*r/62.5%
associate-*r*62.5%
associate-*r/63.8%
*-commutative63.8%
associate-*r*63.9%
associate-*r/63.9%
*-commutative63.9%
Simplified63.9%
Final simplification65.7%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (or (<= x -0.0024) (not (<= x 8.8e-153))) (* 0.5 (* x (/ y a))) (* t (* -4.5 (/ z a)))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.0024) || !(x <= 8.8e-153)) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = t * (-4.5 * (z / a));
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 ((x <= (-0.0024d0)) .or. (.not. (x <= 8.8d-153))) then
tmp = 0.5d0 * (x * (y / a))
else
tmp = t * ((-4.5d0) * (z / a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -0.0024) || !(x <= 8.8e-153)) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = t * (-4.5 * (z / a));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if (x <= -0.0024) or not (x <= 8.8e-153): tmp = 0.5 * (x * (y / a)) else: tmp = t * (-4.5 * (z / a)) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if ((x <= -0.0024) || !(x <= 8.8e-153)) tmp = Float64(0.5 * Float64(x * Float64(y / a))); else tmp = Float64(t * Float64(-4.5 * Float64(z / a))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if ((x <= -0.0024) || ~((x <= 8.8e-153)))
tmp = 0.5 * (x * (y / a));
else
tmp = t * (-4.5 * (z / a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -0.0024], N[Not[LessEqual[x, 8.8e-153]], $MachinePrecision]], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.5 * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0024 \lor \neg \left(x \leq 8.8 \cdot 10^{-153}\right):\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\end{array}
if x < -0.00239999999999999979 or 8.80000000000000003e-153 < x Initial program 88.8%
div-sub86.3%
*-commutative86.3%
div-sub88.8%
cancel-sign-sub-inv88.8%
*-commutative88.8%
fma-define90.0%
distribute-rgt-neg-in90.0%
associate-*r*90.0%
distribute-lft-neg-in90.0%
*-commutative90.0%
distribute-rgt-neg-in90.0%
metadata-eval90.0%
Simplified90.0%
Taylor expanded in x around inf 61.7%
associate-/l*66.7%
Simplified66.7%
if -0.00239999999999999979 < x < 8.80000000000000003e-153Initial program 90.8%
div-sub89.8%
*-commutative89.8%
div-sub90.8%
cancel-sign-sub-inv90.8%
*-commutative90.8%
fma-define90.8%
distribute-rgt-neg-in90.8%
associate-*r*90.8%
distribute-lft-neg-in90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 62.6%
*-commutative62.6%
associate-/l*63.8%
associate-*r*63.9%
*-commutative63.9%
Simplified63.9%
Final simplification65.6%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= x -0.0023) (* y (/ x (* a 2.0))) (if (<= x 1.45e-153) (* t (/ (* z -4.5) a)) (* 0.5 (* x (/ y a))))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -0.0023) {
tmp = y * (x / (a * 2.0));
} else if (x <= 1.45e-153) {
tmp = t * ((z * -4.5) / a);
} else {
tmp = 0.5 * (x * (y / a));
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 (x <= (-0.0023d0)) then
tmp = y * (x / (a * 2.0d0))
else if (x <= 1.45d-153) then
tmp = t * ((z * (-4.5d0)) / a)
else
tmp = 0.5d0 * (x * (y / a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -0.0023) {
tmp = y * (x / (a * 2.0));
} else if (x <= 1.45e-153) {
tmp = t * ((z * -4.5) / a);
} else {
tmp = 0.5 * (x * (y / a));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if x <= -0.0023: tmp = y * (x / (a * 2.0)) elif x <= 1.45e-153: tmp = t * ((z * -4.5) / a) else: tmp = 0.5 * (x * (y / a)) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (x <= -0.0023) tmp = Float64(y * Float64(x / Float64(a * 2.0))); elseif (x <= 1.45e-153) tmp = Float64(t * Float64(Float64(z * -4.5) / a)); else tmp = Float64(0.5 * Float64(x * Float64(y / a))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (x <= -0.0023)
tmp = y * (x / (a * 2.0));
elseif (x <= 1.45e-153)
tmp = t * ((z * -4.5) / a);
else
tmp = 0.5 * (x * (y / a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[x, -0.0023], N[(y * N[(x / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e-153], N[(t * N[(N[(z * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0023:\\
\;\;\;\;y \cdot \frac{x}{a \cdot 2}\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-153}:\\
\;\;\;\;t \cdot \frac{z \cdot -4.5}{a}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\end{array}
\end{array}
if x < -0.0023Initial program 85.9%
div-sub84.0%
*-commutative84.0%
div-sub85.9%
cancel-sign-sub-inv85.9%
*-commutative85.9%
fma-define85.9%
distribute-rgt-neg-in85.9%
associate-*r*85.9%
distribute-lft-neg-in85.9%
*-commutative85.9%
distribute-rgt-neg-in85.9%
metadata-eval85.9%
Simplified85.9%
*-commutative85.9%
associate-*r*85.9%
metadata-eval85.9%
distribute-rgt-neg-in85.9%
distribute-lft-neg-in85.9%
fmm-def85.9%
associate-*l*85.9%
Applied egg-rr85.9%
Taylor expanded in x around inf 66.1%
associate-*r/74.6%
*-commutative74.6%
metadata-eval74.6%
associate-/l*74.6%
*-rgt-identity74.6%
associate-/l*74.6%
associate-/r*74.6%
Simplified74.6%
clear-num74.6%
un-div-inv74.7%
*-un-lft-identity74.7%
times-frac74.7%
/-rgt-identity74.7%
Applied egg-rr74.7%
associate-*r/74.7%
associate-/r/72.8%
Simplified72.8%
if -0.0023 < x < 1.45000000000000001e-153Initial program 90.8%
div-sub89.8%
*-commutative89.8%
div-sub90.8%
cancel-sign-sub-inv90.8%
*-commutative90.8%
fma-define90.8%
distribute-rgt-neg-in90.8%
associate-*r*90.8%
distribute-lft-neg-in90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in x around 0 62.6%
associate-*r/62.5%
associate-*r*62.5%
associate-*l/65.6%
associate-*r/65.5%
associate-*l*65.6%
Simplified65.6%
Taylor expanded in t around 0 62.6%
associate-*r/62.5%
associate-*r*62.5%
associate-*r/63.8%
*-commutative63.8%
associate-*r*63.9%
associate-*r/63.9%
*-commutative63.9%
Simplified63.9%
if 1.45000000000000001e-153 < x Initial program 90.2%
div-sub87.5%
*-commutative87.5%
div-sub90.2%
cancel-sign-sub-inv90.2%
*-commutative90.2%
fma-define92.0%
distribute-rgt-neg-in92.0%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in x around inf 59.6%
associate-/l*62.7%
Simplified62.7%
Final simplification65.3%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (if (<= t -1.2e-87) (* -4.5 (* z (/ t a))) (if (<= t 1.5e+111) (* 0.5 (* x (/ y a))) (* -4.5 (/ z (/ a t))))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.2e-87) {
tmp = -4.5 * (z * (t / a));
} else if (t <= 1.5e+111) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = -4.5 * (z / (a / t));
}
return tmp;
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 (t <= (-1.2d-87)) then
tmp = (-4.5d0) * (z * (t / a))
else if (t <= 1.5d+111) then
tmp = 0.5d0 * (x * (y / a))
else
tmp = (-4.5d0) * (z / (a / t))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.2e-87) {
tmp = -4.5 * (z * (t / a));
} else if (t <= 1.5e+111) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = -4.5 * (z / (a / t));
}
return tmp;
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): tmp = 0 if t <= -1.2e-87: tmp = -4.5 * (z * (t / a)) elif t <= 1.5e+111: tmp = 0.5 * (x * (y / a)) else: tmp = -4.5 * (z / (a / t)) return tmp
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.2e-87) tmp = Float64(-4.5 * Float64(z * Float64(t / a))); elseif (t <= 1.5e+111) tmp = Float64(0.5 * Float64(x * Float64(y / a))); else tmp = Float64(-4.5 * Float64(z / Float64(a / t))); end return tmp end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp_2 = code(x, y, z, t, a)
tmp = 0.0;
if (t <= -1.2e-87)
tmp = -4.5 * (z * (t / a));
elseif (t <= 1.5e+111)
tmp = 0.5 * (x * (y / a));
else
tmp = -4.5 * (z / (a / t));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.2e-87], N[(-4.5 * N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+111], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(z / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-87}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+111}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \frac{z}{\frac{a}{t}}\\
\end{array}
\end{array}
if t < -1.2e-87Initial program 92.6%
div-sub91.4%
*-commutative91.4%
div-sub92.6%
cancel-sign-sub-inv92.6%
*-commutative92.6%
fma-define93.9%
distribute-rgt-neg-in93.9%
associate-*r*93.8%
distribute-lft-neg-in93.8%
*-commutative93.8%
distribute-rgt-neg-in93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in x around 0 64.1%
associate-*r/64.0%
associate-*r*63.9%
associate-*l/63.9%
associate-*r/63.9%
associate-*l*64.0%
Simplified64.0%
if -1.2e-87 < t < 1.5e111Initial program 89.8%
div-sub87.7%
*-commutative87.7%
div-sub89.8%
cancel-sign-sub-inv89.8%
*-commutative89.8%
fma-define89.8%
distribute-rgt-neg-in89.8%
associate-*r*89.8%
distribute-lft-neg-in89.8%
*-commutative89.8%
distribute-rgt-neg-in89.8%
metadata-eval89.8%
Simplified89.8%
Taylor expanded in x around inf 67.3%
associate-/l*72.4%
Simplified72.4%
if 1.5e111 < t Initial program 81.4%
div-sub78.6%
*-commutative78.6%
div-sub81.4%
cancel-sign-sub-inv81.4%
*-commutative81.4%
fma-define84.2%
distribute-rgt-neg-in84.2%
associate-*r*84.2%
distribute-lft-neg-in84.2%
*-commutative84.2%
distribute-rgt-neg-in84.2%
metadata-eval84.2%
Simplified84.2%
Taylor expanded in x around 0 67.3%
associate-*r/67.4%
associate-*r*67.5%
associate-*l/75.0%
associate-*r/75.1%
associate-*l*75.0%
Simplified75.0%
associate-*l/67.3%
*-commutative67.3%
Applied egg-rr67.3%
Taylor expanded in z around 0 67.3%
associate-*r/75.3%
*-commutative75.3%
associate-/r/75.0%
Simplified75.0%
Final simplification70.2%
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a) :precision binary64 (* -4.5 (* z (/ t a))))
assert(x < y && y < z && z < t && t < a);
assert(x < y && y < z && z < t && t < a);
double code(double x, double y, double z, double t, double a) {
return -4.5 * (z * (t / a));
}
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function.
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 = (-4.5d0) * (z * (t / a))
end function
assert x < y && y < z && z < t && t < a;
assert x < y && y < z && z < t && t < a;
public static double code(double x, double y, double z, double t, double a) {
return -4.5 * (z * (t / a));
}
[x, y, z, t, a] = sort([x, y, z, t, a]) [x, y, z, t, a] = sort([x, y, z, t, a]) def code(x, y, z, t, a): return -4.5 * (z * (t / a))
x, y, z, t, a = sort([x, y, z, t, a]) x, y, z, t, a = sort([x, y, z, t, a]) function code(x, y, z, t, a) return Float64(-4.5 * Float64(z * Float64(t / a))) end
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
x, y, z, t, a = num2cell(sort([x, y, z, t, a])){:}
function tmp = code(x, y, z, t, a)
tmp = -4.5 * (z * (t / a));
end
NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. NOTE: x, y, z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_] := N[(-4.5 * N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\\\
[x, y, z, t, a] = \mathsf{sort}([x, y, z, t, a])\\
\\
-4.5 \cdot \left(z \cdot \frac{t}{a}\right)
\end{array}
Initial program 89.5%
div-sub87.6%
*-commutative87.6%
div-sub89.5%
cancel-sign-sub-inv89.5%
*-commutative89.5%
fma-define90.3%
distribute-rgt-neg-in90.3%
associate-*r*90.3%
distribute-lft-neg-in90.3%
*-commutative90.3%
distribute-rgt-neg-in90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in x around 0 45.9%
associate-*r/45.9%
associate-*r*45.8%
associate-*l/47.3%
associate-*r/47.3%
associate-*l*47.3%
Simplified47.3%
Final simplification47.3%
(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 2024170
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:alt
(! :herbie-platform default (if (< a -209046455797670900000000000000000000000000000000000000000000000000000000000000000000000) (- (* 1/2 (/ (* y x) a)) (* 9/2 (/ t (/ a z)))) (if (< a 2144030707833976000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* x y) (* z (* 9 t))) (* a 2)) (- (* (/ y a) (* x 1/2)) (* (/ t a) (* z 9/2))))))
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))