
(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}
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 1e+291)))
(- (* x (/ y (* a 2.0))) (* z (/ (* 9.0 t) (* a 2.0))))
(/ t_1 (* 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 <= 1e+291)) {
tmp = (x * (y / (a * 2.0))) - (z * ((9.0 * t) / (a * 2.0)));
} else {
tmp = t_1 / (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 <= 1e+291)) {
tmp = (x * (y / (a * 2.0))) - (z * ((9.0 * t) / (a * 2.0)));
} else {
tmp = t_1 / (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 <= 1e+291): tmp = (x * (y / (a * 2.0))) - (z * ((9.0 * t) / (a * 2.0))) else: tmp = t_1 / (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 <= 1e+291)) tmp = Float64(Float64(x * Float64(y / Float64(a * 2.0))) - Float64(z * Float64(Float64(9.0 * t) / Float64(a * 2.0)))); else tmp = Float64(t_1 / 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 <= 1e+291)))
tmp = (x * (y / (a * 2.0))) - (z * ((9.0 * t) / (a * 2.0)));
else
tmp = t_1 / (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, 1e+291]], $MachinePrecision]], N[(N[(x * N[(y / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[(N[(9.0 * t), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / 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 10^{+291}\right):\\
\;\;\;\;x \cdot \frac{y}{a \cdot 2} - z \cdot \frac{9 \cdot t}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a \cdot 2}\\
\end{array}
\end{array}
if (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < -inf.0 or 9.9999999999999996e290 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) Initial program 64.9%
div-sub59.5%
*-commutative59.5%
div-sub64.9%
cancel-sign-sub-inv64.9%
*-commutative64.9%
fma-define65.0%
distribute-rgt-neg-in65.0%
associate-*r*65.0%
distribute-lft-neg-in65.0%
*-commutative65.0%
distribute-rgt-neg-in65.0%
metadata-eval65.0%
Simplified65.0%
*-un-lft-identity65.0%
*-un-lft-identity65.0%
*-commutative65.0%
associate-*r*65.0%
metadata-eval65.0%
distribute-rgt-neg-in65.0%
distribute-lft-neg-in65.0%
fmm-def64.9%
div-sub59.5%
associate-/l*74.5%
associate-*l*74.5%
associate-/l*90.9%
Applied egg-rr90.9%
if -inf.0 < (-.f64 (*.f64 x y) (*.f64 (*.f64 z #s(literal 9 binary64)) t)) < 9.9999999999999996e290Initial program 98.3%
Final simplification96.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
(let* ((t_1 (* (* z 9.0) t)))
(if (<= t_1 (- INFINITY))
(* z (/ (* t -4.5) a))
(if (<= t_1 1e+299)
(/ (- (* x y) t_1) (* a 2.0))
(* -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) {
double t_1 = (z * 9.0) * t;
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * ((t * -4.5) / a);
} else if (t_1 <= 1e+299) {
tmp = ((x * y) - t_1) / (a * 2.0);
} else {
tmp = -4.5 * (z * (t / 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 = (z * 9.0) * t;
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((t * -4.5) / a);
} else if (t_1 <= 1e+299) {
tmp = ((x * y) - t_1) / (a * 2.0);
} else {
tmp = -4.5 * (z * (t / 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 = (z * 9.0) * t tmp = 0 if t_1 <= -math.inf: tmp = z * ((t * -4.5) / a) elif t_1 <= 1e+299: tmp = ((x * y) - t_1) / (a * 2.0) else: tmp = -4.5 * (z * (t / 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(z * 9.0) * t) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif (t_1 <= 1e+299) tmp = Float64(Float64(Float64(x * y) - t_1) / Float64(a * 2.0)); else tmp = Float64(-4.5 * Float64(z * Float64(t / 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 = (z * 9.0) * t;
tmp = 0.0;
if (t_1 <= -Inf)
tmp = z * ((t * -4.5) / a);
elseif (t_1 <= 1e+299)
tmp = ((x * y) - t_1) / (a * 2.0);
else
tmp = -4.5 * (z * (t / 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[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+299], N[(N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
t_1 := \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;t\_1 \leq 10^{+299}:\\
\;\;\;\;\frac{x \cdot y - t\_1}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 z #s(literal 9 binary64)) t) < -inf.0Initial program 69.1%
div-sub63.6%
*-commutative63.6%
div-sub69.1%
cancel-sign-sub-inv69.1%
*-commutative69.1%
fma-define69.1%
distribute-rgt-neg-in69.1%
associate-*r*69.1%
distribute-lft-neg-in69.1%
*-commutative69.1%
distribute-rgt-neg-in69.1%
metadata-eval69.1%
Simplified69.1%
Taylor expanded in a around 0 69.1%
associate-*r/69.1%
+-commutative69.1%
metadata-eval69.1%
cancel-sign-sub-inv69.1%
cancel-sign-sub-inv69.1%
metadata-eval69.1%
*-commutative69.1%
*-commutative69.1%
associate-*r*69.1%
fma-define69.1%
associate-*l/69.1%
*-commutative69.1%
fma-define69.1%
+-commutative69.1%
fma-define69.1%
Simplified69.1%
Taylor expanded in z around inf 69.1%
associate-*r/69.1%
*-commutative69.1%
*-commutative69.1%
associate-*l*69.1%
associate-/l*99.9%
associate-*l/99.9%
*-commutative99.9%
associate-*r/99.9%
Simplified99.9%
if -inf.0 < (*.f64 (*.f64 z #s(literal 9 binary64)) t) < 1.0000000000000001e299Initial program 94.3%
if 1.0000000000000001e299 < (*.f64 (*.f64 z #s(literal 9 binary64)) t) Initial program 68.4%
div-sub61.7%
*-commutative61.7%
div-sub68.4%
cancel-sign-sub-inv68.4%
*-commutative68.4%
fma-define68.7%
distribute-rgt-neg-in68.7%
associate-*r*68.7%
distribute-lft-neg-in68.7%
*-commutative68.7%
distribute-rgt-neg-in68.7%
metadata-eval68.7%
Simplified68.7%
Taylor expanded in x around 0 68.7%
associate-*r/68.7%
associate-*r*68.7%
associate-*l/99.0%
associate-*r/99.1%
associate-*l*99.2%
Simplified99.2%
Final simplification95.0%
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+79)
(/ (* x 0.5) (/ a y))
(if (<= (* x y) -5e-70)
(* y (* x (/ 0.5 a)))
(if (<= (* x y) 5e-21) (* -4.5 (/ (* z t) a)) (/ (* x y) (* 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 tmp;
if ((x * y) <= -5e+79) {
tmp = (x * 0.5) / (a / y);
} else if ((x * y) <= -5e-70) {
tmp = y * (x * (0.5 / a));
} else if ((x * y) <= 5e-21) {
tmp = -4.5 * ((z * t) / a);
} else {
tmp = (x * y) / (a * 2.0);
}
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+79)) then
tmp = (x * 0.5d0) / (a / y)
else if ((x * y) <= (-5d-70)) then
tmp = y * (x * (0.5d0 / a))
else if ((x * y) <= 5d-21) then
tmp = (-4.5d0) * ((z * t) / a)
else
tmp = (x * y) / (a * 2.0d0)
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+79) {
tmp = (x * 0.5) / (a / y);
} else if ((x * y) <= -5e-70) {
tmp = y * (x * (0.5 / a));
} else if ((x * y) <= 5e-21) {
tmp = -4.5 * ((z * t) / a);
} else {
tmp = (x * y) / (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): tmp = 0 if (x * y) <= -5e+79: tmp = (x * 0.5) / (a / y) elif (x * y) <= -5e-70: tmp = y * (x * (0.5 / a)) elif (x * y) <= 5e-21: tmp = -4.5 * ((z * t) / a) else: tmp = (x * y) / (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) tmp = 0.0 if (Float64(x * y) <= -5e+79) tmp = Float64(Float64(x * 0.5) / Float64(a / y)); elseif (Float64(x * y) <= -5e-70) tmp = Float64(y * Float64(x * Float64(0.5 / a))); elseif (Float64(x * y) <= 5e-21) tmp = Float64(-4.5 * Float64(Float64(z * t) / a)); else tmp = Float64(Float64(x * y) / 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)
tmp = 0.0;
if ((x * y) <= -5e+79)
tmp = (x * 0.5) / (a / y);
elseif ((x * y) <= -5e-70)
tmp = y * (x * (0.5 / a));
elseif ((x * y) <= 5e-21)
tmp = -4.5 * ((z * t) / a);
else
tmp = (x * y) / (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_] := If[LessEqual[N[(x * y), $MachinePrecision], -5e+79], N[(N[(x * 0.5), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -5e-70], N[(y * N[(x * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-21], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $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}
\mathbf{if}\;x \cdot y \leq -5 \cdot 10^{+79}:\\
\;\;\;\;\frac{x \cdot 0.5}{\frac{a}{y}}\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-70}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{0.5}{a}\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-21}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 x y) < -5e79Initial program 84.6%
div-sub78.5%
*-commutative78.5%
div-sub84.6%
cancel-sign-sub-inv84.6%
*-commutative84.6%
fma-define84.6%
distribute-rgt-neg-in84.6%
associate-*r*84.6%
distribute-lft-neg-in84.6%
*-commutative84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Simplified84.6%
Taylor expanded in x around inf 68.3%
associate-/l*77.8%
Simplified77.8%
associate-*r*77.8%
clear-num77.8%
un-div-inv77.8%
*-commutative77.8%
Applied egg-rr77.8%
if -5e79 < (*.f64 x y) < -4.9999999999999998e-70Initial program 96.9%
div-sub96.8%
*-commutative96.8%
div-sub96.9%
cancel-sign-sub-inv96.9%
*-commutative96.9%
fma-define96.9%
distribute-rgt-neg-in96.9%
associate-*r*96.9%
distribute-lft-neg-in96.9%
*-commutative96.9%
distribute-rgt-neg-in96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in x around inf 68.9%
div-inv68.8%
*-commutative68.8%
associate-*l*62.9%
*-commutative62.9%
associate-/r*62.9%
metadata-eval62.9%
Applied egg-rr62.9%
if -4.9999999999999998e-70 < (*.f64 x y) < 4.99999999999999973e-21Initial program 92.9%
div-sub92.9%
*-commutative92.9%
div-sub92.9%
cancel-sign-sub-inv92.9%
*-commutative92.9%
fma-define92.9%
distribute-rgt-neg-in92.9%
associate-*r*92.9%
distribute-lft-neg-in92.9%
*-commutative92.9%
distribute-rgt-neg-in92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in x around 0 88.5%
if 4.99999999999999973e-21 < (*.f64 x y) Initial program 89.8%
div-sub82.2%
*-commutative82.2%
div-sub89.8%
cancel-sign-sub-inv89.8%
*-commutative89.8%
fma-define89.9%
distribute-rgt-neg-in89.9%
associate-*r*89.9%
distribute-lft-neg-in89.9%
*-commutative89.9%
distribute-rgt-neg-in89.9%
metadata-eval89.9%
Simplified89.9%
Taylor expanded in x around inf 73.7%
Final simplification79.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 (<= z -3.9e+116)
(* -4.5 (* z (/ t a)))
(if (<= z -6e-253)
(* y (* x (/ 0.5 a)))
(if (<= z 2.4e-41) (* 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 (z <= -3.9e+116) {
tmp = -4.5 * (z * (t / a));
} else if (z <= -6e-253) {
tmp = y * (x * (0.5 / a));
} else if (z <= 2.4e-41) {
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 (z <= (-3.9d+116)) then
tmp = (-4.5d0) * (z * (t / a))
else if (z <= (-6d-253)) then
tmp = y * (x * (0.5d0 / a))
else if (z <= 2.4d-41) 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 (z <= -3.9e+116) {
tmp = -4.5 * (z * (t / a));
} else if (z <= -6e-253) {
tmp = y * (x * (0.5 / a));
} else if (z <= 2.4e-41) {
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 z <= -3.9e+116: tmp = -4.5 * (z * (t / a)) elif z <= -6e-253: tmp = y * (x * (0.5 / a)) elif z <= 2.4e-41: 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 (z <= -3.9e+116) tmp = Float64(-4.5 * Float64(z * Float64(t / a))); elseif (z <= -6e-253) tmp = Float64(y * Float64(x * Float64(0.5 / a))); elseif (z <= 2.4e-41) tmp = Float64(0.5 * Float64(x * Float64(y / a))); else tmp = Float64(t * Float64(z * Float64(-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 (z <= -3.9e+116)
tmp = -4.5 * (z * (t / a));
elseif (z <= -6e-253)
tmp = y * (x * (0.5 / a));
elseif (z <= 2.4e-41)
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[LessEqual[z, -3.9e+116], N[(-4.5 * N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6e-253], N[(y * N[(x * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-41], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(-4.5 / 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}\;z \leq -3.9 \cdot 10^{+116}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-253}:\\
\;\;\;\;y \cdot \left(x \cdot \frac{0.5}{a}\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-41}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\
\end{array}
\end{array}
if z < -3.90000000000000032e116Initial program 80.6%
div-sub75.5%
*-commutative75.5%
div-sub80.6%
cancel-sign-sub-inv80.6%
*-commutative80.6%
fma-define80.7%
distribute-rgt-neg-in80.7%
associate-*r*80.7%
distribute-lft-neg-in80.7%
*-commutative80.7%
distribute-rgt-neg-in80.7%
metadata-eval80.7%
Simplified80.7%
Taylor expanded in x around 0 70.4%
associate-*r/70.3%
associate-*r*70.4%
associate-*l/86.8%
associate-*r/86.9%
associate-*l*86.9%
Simplified86.9%
if -3.90000000000000032e116 < z < -6.0000000000000004e-253Initial program 95.0%
div-sub91.2%
*-commutative91.2%
div-sub95.0%
cancel-sign-sub-inv95.0%
*-commutative95.0%
fma-define95.0%
distribute-rgt-neg-in95.0%
associate-*r*95.1%
distribute-lft-neg-in95.1%
*-commutative95.1%
distribute-rgt-neg-in95.1%
metadata-eval95.1%
Simplified95.1%
Taylor expanded in x around inf 56.9%
div-inv56.9%
*-commutative56.9%
associate-*l*55.6%
*-commutative55.6%
associate-/r*55.6%
metadata-eval55.6%
Applied egg-rr55.6%
if -6.0000000000000004e-253 < z < 2.40000000000000022e-41Initial program 92.2%
div-sub92.2%
*-commutative92.2%
div-sub92.2%
cancel-sign-sub-inv92.2%
*-commutative92.2%
fma-define92.2%
distribute-rgt-neg-in92.2%
associate-*r*92.2%
distribute-lft-neg-in92.2%
*-commutative92.2%
distribute-rgt-neg-in92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in x around inf 73.6%
associate-/l*70.4%
Simplified70.4%
if 2.40000000000000022e-41 < z Initial program 91.1%
div-sub87.1%
*-commutative87.1%
div-sub91.1%
cancel-sign-sub-inv91.1%
*-commutative91.1%
fma-define91.1%
distribute-rgt-neg-in91.1%
associate-*r*91.1%
distribute-lft-neg-in91.1%
*-commutative91.1%
distribute-rgt-neg-in91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in x around 0 59.7%
*-commutative59.7%
associate-/l*59.6%
associate-*r*59.6%
*-commutative59.6%
Simplified59.6%
clear-num59.6%
un-div-inv59.6%
Applied egg-rr59.6%
associate-/r/59.6%
Simplified59.6%
Final simplification65.1%
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 (<= (* a 2.0) 2e+118) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* y (/ x (* a 2.0))) (* 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 ((a * 2.0) <= 2e+118) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = (y * (x / (a * 2.0))) - (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 ((a * 2.0d0) <= 2d+118) then
tmp = ((x * y) - (z * (9.0d0 * t))) / (a * 2.0d0)
else
tmp = (y * (x / (a * 2.0d0))) - (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 ((a * 2.0) <= 2e+118) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = (y * (x / (a * 2.0))) - (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 (a * 2.0) <= 2e+118: tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0) else: tmp = (y * (x / (a * 2.0))) - (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 (Float64(a * 2.0) <= 2e+118) tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0)); else tmp = Float64(Float64(y * Float64(x / Float64(a * 2.0))) - 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 ((a * 2.0) <= 2e+118)
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
else
tmp = (y * (x / (a * 2.0))) - (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[LessEqual[N[(a * 2.0), $MachinePrecision], 2e+118], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(z * 4.5), $MachinePrecision] / 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}\;a \cdot 2 \leq 2 \cdot 10^{+118}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a \cdot 2} - t \cdot \frac{z \cdot 4.5}{a}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 2 binary64)) < 1.99999999999999993e118Initial program 93.1%
div-sub89.3%
*-commutative89.3%
div-sub93.1%
cancel-sign-sub-inv93.1%
*-commutative93.1%
fma-define93.1%
distribute-rgt-neg-in93.1%
associate-*r*93.2%
distribute-lft-neg-in93.2%
*-commutative93.2%
distribute-rgt-neg-in93.2%
metadata-eval93.2%
Simplified93.2%
*-commutative93.2%
associate-*r*93.1%
metadata-eval93.1%
distribute-rgt-neg-in93.1%
distribute-lft-neg-in93.1%
fmm-def93.1%
associate-*l*93.2%
Applied egg-rr93.2%
if 1.99999999999999993e118 < (*.f64 a #s(literal 2 binary64)) Initial program 81.2%
div-sub81.2%
*-commutative81.2%
div-sub81.2%
cancel-sign-sub-inv81.2%
*-commutative81.2%
fma-define81.3%
distribute-rgt-neg-in81.3%
associate-*r*81.3%
distribute-lft-neg-in81.3%
*-commutative81.3%
distribute-rgt-neg-in81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in a around 0 81.3%
associate-*r/81.3%
+-commutative81.3%
metadata-eval81.3%
cancel-sign-sub-inv81.3%
cancel-sign-sub-inv81.3%
metadata-eval81.3%
*-commutative81.3%
*-commutative81.3%
associate-*r*81.2%
fma-define81.3%
associate-*l/81.1%
*-commutative81.1%
fma-define81.0%
+-commutative81.0%
fma-define81.0%
Simplified81.0%
Taylor expanded in t around -inf 79.2%
Simplified85.1%
Final simplification91.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 (<= (* a 2.0) 2e+118) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (+ (* y (/ x (* a 2.0))) (* -4.5 (* t (/ 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 ((a * 2.0) <= 2e+118) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = (y * (x / (a * 2.0))) + (-4.5 * (t * (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 ((a * 2.0d0) <= 2d+118) then
tmp = ((x * y) - (z * (9.0d0 * t))) / (a * 2.0d0)
else
tmp = (y * (x / (a * 2.0d0))) + ((-4.5d0) * (t * (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 ((a * 2.0) <= 2e+118) {
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
} else {
tmp = (y * (x / (a * 2.0))) + (-4.5 * (t * (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 (a * 2.0) <= 2e+118: tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0) else: tmp = (y * (x / (a * 2.0))) + (-4.5 * (t * (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 (Float64(a * 2.0) <= 2e+118) tmp = Float64(Float64(Float64(x * y) - Float64(z * Float64(9.0 * t))) / Float64(a * 2.0)); else tmp = Float64(Float64(y * Float64(x / Float64(a * 2.0))) + Float64(-4.5 * Float64(t * 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 ((a * 2.0) <= 2e+118)
tmp = ((x * y) - (z * (9.0 * t))) / (a * 2.0);
else
tmp = (y * (x / (a * 2.0))) + (-4.5 * (t * (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[LessEqual[N[(a * 2.0), $MachinePrecision], 2e+118], N[(N[(N[(x * y), $MachinePrecision] - N[(z * N[(9.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(x / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-4.5 * N[(t * N[(z / 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}
\mathbf{if}\;a \cdot 2 \leq 2 \cdot 10^{+118}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{a \cdot 2} + -4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\end{array}
\end{array}
if (*.f64 a #s(literal 2 binary64)) < 1.99999999999999993e118Initial program 93.1%
div-sub89.3%
*-commutative89.3%
div-sub93.1%
cancel-sign-sub-inv93.1%
*-commutative93.1%
fma-define93.1%
distribute-rgt-neg-in93.1%
associate-*r*93.2%
distribute-lft-neg-in93.2%
*-commutative93.2%
distribute-rgt-neg-in93.2%
metadata-eval93.2%
Simplified93.2%
*-commutative93.2%
associate-*r*93.1%
metadata-eval93.1%
distribute-rgt-neg-in93.1%
distribute-lft-neg-in93.1%
fmm-def93.1%
associate-*l*93.2%
Applied egg-rr93.2%
if 1.99999999999999993e118 < (*.f64 a #s(literal 2 binary64)) Initial program 81.2%
div-sub81.2%
*-commutative81.2%
div-sub81.2%
cancel-sign-sub-inv81.2%
*-commutative81.2%
fma-define81.3%
distribute-rgt-neg-in81.3%
associate-*r*81.3%
distribute-lft-neg-in81.3%
*-commutative81.3%
distribute-rgt-neg-in81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in a around 0 81.3%
associate-*r/81.3%
+-commutative81.3%
metadata-eval81.3%
cancel-sign-sub-inv81.3%
cancel-sign-sub-inv81.3%
metadata-eval81.3%
*-commutative81.3%
*-commutative81.3%
associate-*r*81.2%
fma-define81.3%
associate-*l/81.1%
*-commutative81.1%
fma-define81.0%
+-commutative81.0%
fma-define81.0%
Simplified81.0%
Taylor expanded in t around -inf 79.2%
Simplified85.1%
Taylor expanded in t around 0 81.1%
associate-*r/85.2%
Simplified85.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 (if (<= (* x y) (- INFINITY)) (/ (* x 0.5) (/ a y)) (/ (- (* 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 tmp;
if ((x * y) <= -((double) INFINITY)) {
tmp = (x * 0.5) / (a / y);
} 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 tmp;
if ((x * y) <= -Double.POSITIVE_INFINITY) {
tmp = (x * 0.5) / (a / y);
} 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): tmp = 0 if (x * y) <= -math.inf: tmp = (x * 0.5) / (a / y) 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) tmp = 0.0 if (Float64(x * y) <= Float64(-Inf)) tmp = Float64(Float64(x * 0.5) / Float64(a / y)); 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)
tmp = 0.0;
if ((x * y) <= -Inf)
tmp = (x * 0.5) / (a / y);
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_] := If[LessEqual[N[(x * y), $MachinePrecision], (-Infinity)], N[(N[(x * 0.5), $MachinePrecision] / N[(a / y), $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}
\mathbf{if}\;x \cdot y \leq -\infty:\\
\;\;\;\;\frac{x \cdot 0.5}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 x y) < -inf.0Initial program 56.7%
div-sub56.7%
*-commutative56.7%
div-sub56.7%
cancel-sign-sub-inv56.7%
*-commutative56.7%
fma-define56.7%
distribute-rgt-neg-in56.7%
associate-*r*56.7%
distribute-lft-neg-in56.7%
*-commutative56.7%
distribute-rgt-neg-in56.7%
metadata-eval56.7%
Simplified56.7%
Taylor expanded in x around inf 56.7%
associate-/l*99.9%
Simplified99.9%
associate-*r*99.9%
clear-num99.9%
un-div-inv99.9%
*-commutative99.9%
Applied egg-rr99.9%
if -inf.0 < (*.f64 x y) Initial program 92.8%
div-sub89.5%
*-commutative89.5%
div-sub92.8%
cancel-sign-sub-inv92.8%
*-commutative92.8%
fma-define92.8%
distribute-rgt-neg-in92.8%
associate-*r*92.9%
distribute-lft-neg-in92.9%
*-commutative92.9%
distribute-rgt-neg-in92.9%
metadata-eval92.9%
Simplified92.9%
*-commutative92.9%
associate-*r*92.8%
metadata-eval92.8%
distribute-rgt-neg-in92.8%
distribute-lft-neg-in92.8%
fmm-def92.8%
associate-*l*92.8%
Applied egg-rr92.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 (<= z -1.65e-38) (* -4.5 (* z (/ t a))) (if (<= z 3.8e-40) (* 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 (z <= -1.65e-38) {
tmp = -4.5 * (z * (t / a));
} else if (z <= 3.8e-40) {
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 (z <= (-1.65d-38)) then
tmp = (-4.5d0) * (z * (t / a))
else if (z <= 3.8d-40) 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 (z <= -1.65e-38) {
tmp = -4.5 * (z * (t / a));
} else if (z <= 3.8e-40) {
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 z <= -1.65e-38: tmp = -4.5 * (z * (t / a)) elif z <= 3.8e-40: 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 (z <= -1.65e-38) tmp = Float64(-4.5 * Float64(z * Float64(t / a))); elseif (z <= 3.8e-40) tmp = Float64(0.5 * Float64(x * Float64(y / a))); else tmp = Float64(t * Float64(z * Float64(-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 (z <= -1.65e-38)
tmp = -4.5 * (z * (t / a));
elseif (z <= 3.8e-40)
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[LessEqual[z, -1.65e-38], N[(-4.5 * N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-40], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(-4.5 / 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}\;z \leq -1.65 \cdot 10^{-38}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-40}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \frac{-4.5}{a}\right)\\
\end{array}
\end{array}
if z < -1.6500000000000001e-38Initial program 87.0%
div-sub80.9%
*-commutative80.9%
div-sub87.0%
cancel-sign-sub-inv87.0%
*-commutative87.0%
fma-define87.1%
distribute-rgt-neg-in87.1%
associate-*r*87.1%
distribute-lft-neg-in87.1%
*-commutative87.1%
distribute-rgt-neg-in87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in x around 0 66.4%
associate-*r/66.5%
associate-*r*66.5%
associate-*l/76.1%
associate-*r/76.2%
associate-*l*76.3%
Simplified76.3%
if -1.6500000000000001e-38 < z < 3.7999999999999999e-40Initial program 93.2%
div-sub92.3%
*-commutative92.3%
div-sub93.2%
cancel-sign-sub-inv93.2%
*-commutative93.2%
fma-define93.2%
distribute-rgt-neg-in93.2%
associate-*r*93.3%
distribute-lft-neg-in93.3%
*-commutative93.3%
distribute-rgt-neg-in93.3%
metadata-eval93.3%
Simplified93.3%
Taylor expanded in x around inf 70.5%
associate-/l*66.4%
Simplified66.4%
if 3.7999999999999999e-40 < z Initial program 91.1%
div-sub87.1%
*-commutative87.1%
div-sub91.1%
cancel-sign-sub-inv91.1%
*-commutative91.1%
fma-define91.1%
distribute-rgt-neg-in91.1%
associate-*r*91.1%
distribute-lft-neg-in91.1%
*-commutative91.1%
distribute-rgt-neg-in91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in x around 0 59.7%
*-commutative59.7%
associate-/l*59.6%
associate-*r*59.6%
*-commutative59.6%
Simplified59.6%
clear-num59.6%
un-div-inv59.6%
Applied egg-rr59.6%
associate-/r/59.6%
Simplified59.6%
Final simplification66.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 (<= z -3.4e-41) (* -4.5 (* z (/ t a))) (if (<= z 2.8e-41) (* 0.5 (* x (/ y a))) (* -4.5 (* t (/ 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 (z <= -3.4e-41) {
tmp = -4.5 * (z * (t / a));
} else if (z <= 2.8e-41) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = -4.5 * (t * (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 (z <= (-3.4d-41)) then
tmp = (-4.5d0) * (z * (t / a))
else if (z <= 2.8d-41) then
tmp = 0.5d0 * (x * (y / a))
else
tmp = (-4.5d0) * (t * (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 (z <= -3.4e-41) {
tmp = -4.5 * (z * (t / a));
} else if (z <= 2.8e-41) {
tmp = 0.5 * (x * (y / a));
} else {
tmp = -4.5 * (t * (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 z <= -3.4e-41: tmp = -4.5 * (z * (t / a)) elif z <= 2.8e-41: tmp = 0.5 * (x * (y / a)) else: tmp = -4.5 * (t * (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 (z <= -3.4e-41) tmp = Float64(-4.5 * Float64(z * Float64(t / a))); elseif (z <= 2.8e-41) tmp = Float64(0.5 * Float64(x * Float64(y / a))); else tmp = Float64(-4.5 * Float64(t * 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 (z <= -3.4e-41)
tmp = -4.5 * (z * (t / a));
elseif (z <= 2.8e-41)
tmp = 0.5 * (x * (y / a));
else
tmp = -4.5 * (t * (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[LessEqual[z, -3.4e-41], N[(-4.5 * N[(z * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-41], N[(0.5 * N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(t * 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}\;z \leq -3.4 \cdot 10^{-41}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-41}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\end{array}
\end{array}
if z < -3.3999999999999998e-41Initial program 87.0%
div-sub80.9%
*-commutative80.9%
div-sub87.0%
cancel-sign-sub-inv87.0%
*-commutative87.0%
fma-define87.1%
distribute-rgt-neg-in87.1%
associate-*r*87.1%
distribute-lft-neg-in87.1%
*-commutative87.1%
distribute-rgt-neg-in87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in x around 0 66.4%
associate-*r/66.5%
associate-*r*66.5%
associate-*l/76.1%
associate-*r/76.2%
associate-*l*76.3%
Simplified76.3%
if -3.3999999999999998e-41 < z < 2.8000000000000002e-41Initial program 93.2%
div-sub92.3%
*-commutative92.3%
div-sub93.2%
cancel-sign-sub-inv93.2%
*-commutative93.2%
fma-define93.2%
distribute-rgt-neg-in93.2%
associate-*r*93.3%
distribute-lft-neg-in93.3%
*-commutative93.3%
distribute-rgt-neg-in93.3%
metadata-eval93.3%
Simplified93.3%
Taylor expanded in x around inf 70.5%
associate-/l*66.4%
Simplified66.4%
if 2.8000000000000002e-41 < z Initial program 91.1%
div-sub87.1%
*-commutative87.1%
div-sub91.1%
cancel-sign-sub-inv91.1%
*-commutative91.1%
fma-define91.1%
distribute-rgt-neg-in91.1%
associate-*r*91.1%
distribute-lft-neg-in91.1%
*-commutative91.1%
distribute-rgt-neg-in91.1%
metadata-eval91.1%
Simplified91.1%
Taylor expanded in x around 0 59.7%
associate-/l*59.6%
Simplified59.6%
Final simplification66.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 (<= a 1e-66) (* -4.5 (/ (* z t) a)) (* -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) {
double tmp;
if (a <= 1e-66) {
tmp = -4.5 * ((z * t) / a);
} else {
tmp = -4.5 * (z * (t / 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 (a <= 1d-66) then
tmp = (-4.5d0) * ((z * t) / a)
else
tmp = (-4.5d0) * (z * (t / 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 (a <= 1e-66) {
tmp = -4.5 * ((z * t) / a);
} else {
tmp = -4.5 * (z * (t / 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 a <= 1e-66: tmp = -4.5 * ((z * t) / a) else: tmp = -4.5 * (z * (t / 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 (a <= 1e-66) tmp = Float64(-4.5 * Float64(Float64(z * t) / a)); else tmp = Float64(-4.5 * Float64(z * Float64(t / 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 (a <= 1e-66)
tmp = -4.5 * ((z * t) / a);
else
tmp = -4.5 * (z * (t / 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[a, 1e-66], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], 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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 10^{-66}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\end{array}
\end{array}
if a < 9.9999999999999998e-67Initial program 92.0%
div-sub87.3%
*-commutative87.3%
div-sub92.0%
cancel-sign-sub-inv92.0%
*-commutative92.0%
fma-define92.0%
distribute-rgt-neg-in92.0%
associate-*r*92.1%
distribute-lft-neg-in92.1%
*-commutative92.1%
distribute-rgt-neg-in92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in x around 0 54.1%
if 9.9999999999999998e-67 < a Initial program 89.0%
div-sub89.0%
*-commutative89.0%
div-sub89.0%
cancel-sign-sub-inv89.0%
*-commutative89.0%
fma-define89.1%
distribute-rgt-neg-in89.1%
associate-*r*89.1%
distribute-lft-neg-in89.1%
*-commutative89.1%
distribute-rgt-neg-in89.1%
metadata-eval89.1%
Simplified89.1%
Taylor expanded in x around 0 45.1%
associate-*r/45.1%
associate-*r*45.1%
associate-*l/49.9%
associate-*r/49.9%
associate-*l*50.0%
Simplified50.0%
Final simplification52.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 (* -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 91.0%
div-sub87.9%
*-commutative87.9%
div-sub91.0%
cancel-sign-sub-inv91.0%
*-commutative91.0%
fma-define91.0%
distribute-rgt-neg-in91.0%
associate-*r*91.0%
distribute-lft-neg-in91.0%
*-commutative91.0%
distribute-rgt-neg-in91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in x around 0 51.0%
associate-*r/51.0%
associate-*r*51.0%
associate-*l/53.3%
associate-*r/53.3%
associate-*l*53.3%
Simplified53.3%
Final simplification53.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 (* -4.5 (* t (/ 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) {
return -4.5 * (t * (z / 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) * (t * (z / 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 * (t * (z / 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 * (t * (z / 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(t * Float64(z / 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 * (t * (z / 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[(t * 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])\\
\\
-4.5 \cdot \left(t \cdot \frac{z}{a}\right)
\end{array}
Initial program 91.0%
div-sub87.9%
*-commutative87.9%
div-sub91.0%
cancel-sign-sub-inv91.0%
*-commutative91.0%
fma-define91.0%
distribute-rgt-neg-in91.0%
associate-*r*91.0%
distribute-lft-neg-in91.0%
*-commutative91.0%
distribute-rgt-neg-in91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in x around 0 51.0%
associate-/l*50.2%
Simplified50.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 2024169
(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)))