
(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 14 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}
(FPCore (x y z t a) :precision binary64 (if (<= (* (* z 9.0) t) -2e+302) (* z (/ (* t -4.5) a)) (/ (fma x y (* z (* t -9.0))) (* a 2.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z * 9.0) * t) <= -2e+302) {
tmp = z * ((t * -4.5) / a);
} else {
tmp = fma(x, y, (z * (t * -9.0))) / (a * 2.0);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(z * 9.0) * t) <= -2e+302) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); else tmp = Float64(fma(x, y, Float64(z * Float64(t * -9.0))) / Float64(a * 2.0)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision], -2e+302], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(z \cdot 9\right) \cdot t \leq -2 \cdot 10^{+302}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, z \cdot \left(t \cdot -9\right)\right)}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 (*.f64 z 9) t) < -2.0000000000000002e302Initial program 57.0%
Taylor expanded in x around 0 67.1%
associate-*r/67.1%
associate-*r*67.1%
associate-*l/100.0%
associate-*r/99.8%
*-commutative99.8%
associate-*r/100.0%
Simplified100.0%
if -2.0000000000000002e302 < (*.f64 (*.f64 z 9) t) Initial program 94.6%
div-sub93.3%
*-commutative93.3%
div-sub94.6%
cancel-sign-sub-inv94.6%
*-commutative94.6%
fma-define95.0%
distribute-rgt-neg-in95.0%
associate-*r*95.0%
distribute-lft-neg-in95.0%
*-commutative95.0%
distribute-rgt-neg-in95.0%
metadata-eval95.0%
Simplified95.0%
Final simplification95.4%
(FPCore (x y z t a) :precision binary64 (if (<= (* (* z 9.0) t) -5e+210) (* z (/ (* t -4.5) a)) (* (fma x y (* t (* z -9.0))) (/ 0.5 a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z * 9.0) * t) <= -5e+210) {
tmp = z * ((t * -4.5) / a);
} else {
tmp = fma(x, y, (t * (z * -9.0))) * (0.5 / a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(z * 9.0) * t) <= -5e+210) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); else tmp = Float64(fma(x, y, Float64(t * Float64(z * -9.0))) * Float64(0.5 / a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision], -5e+210], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(x * y + N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.5 / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(z \cdot 9\right) \cdot t \leq -5 \cdot 10^{+210}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, y, t \cdot \left(z \cdot -9\right)\right) \cdot \frac{0.5}{a}\\
\end{array}
\end{array}
if (*.f64 (*.f64 z 9) t) < -4.9999999999999998e210Initial program 73.1%
Taylor expanded in x around 0 79.4%
associate-*r/79.4%
associate-*r*79.4%
associate-*l/99.9%
associate-*r/99.9%
*-commutative99.9%
associate-*r/99.9%
Simplified99.9%
if -4.9999999999999998e210 < (*.f64 (*.f64 z 9) t) Initial program 94.3%
div-inv94.2%
fma-neg94.7%
*-commutative94.7%
distribute-rgt-neg-in94.7%
distribute-rgt-neg-in94.7%
metadata-eval94.7%
*-commutative94.7%
associate-/r*94.7%
metadata-eval94.7%
Applied egg-rr94.7%
Final simplification95.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+39)
(* x (/ (* y 0.5) a))
(if (<= (* x y) -1e-46)
(* z (/ (* t -4.5) a))
(if (<= (* x y) -2e-87)
(* (/ 0.5 a) (/ y (/ 1.0 x)))
(if (<= (* x y) 5e-99)
(/ (* z (* t -9.0)) (* a 2.0))
(/ (* x y) (* a 2.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if ((x * y) <= -2e-87) {
tmp = (0.5 / a) * (y / (1.0 / x));
} else if ((x * y) <= 5e-99) {
tmp = (z * (t * -9.0)) / (a * 2.0);
} else {
tmp = (x * y) / (a * 2.0);
}
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 ((x * y) <= (-2d+39)) then
tmp = x * ((y * 0.5d0) / a)
else if ((x * y) <= (-1d-46)) then
tmp = z * ((t * (-4.5d0)) / a)
else if ((x * y) <= (-2d-87)) then
tmp = (0.5d0 / a) * (y / (1.0d0 / x))
else if ((x * y) <= 5d-99) then
tmp = (z * (t * (-9.0d0))) / (a * 2.0d0)
else
tmp = (x * y) / (a * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if ((x * y) <= -2e-87) {
tmp = (0.5 / a) * (y / (1.0 / x));
} else if ((x * y) <= 5e-99) {
tmp = (z * (t * -9.0)) / (a * 2.0);
} else {
tmp = (x * y) / (a * 2.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+39: tmp = x * ((y * 0.5) / a) elif (x * y) <= -1e-46: tmp = z * ((t * -4.5) / a) elif (x * y) <= -2e-87: tmp = (0.5 / a) * (y / (1.0 / x)) elif (x * y) <= 5e-99: tmp = (z * (t * -9.0)) / (a * 2.0) else: tmp = (x * y) / (a * 2.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+39) tmp = Float64(x * Float64(Float64(y * 0.5) / a)); elseif (Float64(x * y) <= -1e-46) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif (Float64(x * y) <= -2e-87) tmp = Float64(Float64(0.5 / a) * Float64(y / Float64(1.0 / x))); elseif (Float64(x * y) <= 5e-99) tmp = Float64(Float64(z * Float64(t * -9.0)) / Float64(a * 2.0)); else tmp = Float64(Float64(x * y) / Float64(a * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e+39) tmp = x * ((y * 0.5) / a); elseif ((x * y) <= -1e-46) tmp = z * ((t * -4.5) / a); elseif ((x * y) <= -2e-87) tmp = (0.5 / a) * (y / (1.0 / x)); elseif ((x * y) <= 5e-99) tmp = (z * (t * -9.0)) / (a * 2.0); else tmp = (x * y) / (a * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[(N[(0.5 / a), $MachinePrecision] * N[(y / N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-99], N[(N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87}:\\
\;\;\;\;\frac{0.5}{a} \cdot \frac{y}{\frac{1}{x}}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-99}:\\
\;\;\;\;\frac{z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e39Initial program 88.6%
Taylor expanded in x around inf 73.5%
*-commutative73.5%
associate-/l*73.4%
associate-*r*73.4%
*-commutative73.4%
associate-*r/73.4%
Simplified73.4%
if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46Initial program 94.3%
Taylor expanded in x around 0 74.8%
associate-*r/74.7%
associate-*r*74.8%
associate-*l/74.7%
associate-*r/74.5%
*-commutative74.5%
associate-*r/74.7%
Simplified74.7%
if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87Initial program 99.6%
Taylor expanded in y around inf 56.2%
fma-define56.2%
*-commutative56.2%
associate-/r*72.9%
*-commutative72.9%
associate-/l*72.9%
associate-*r/72.9%
Simplified72.9%
Taylor expanded in z around 0 51.7%
associate-*r*51.7%
clear-num51.4%
un-div-inv51.7%
Applied egg-rr51.7%
*-commutative51.7%
div-inv51.7%
times-frac77.4%
Applied egg-rr77.4%
if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99Initial program 93.8%
Taylor expanded in x around 0 83.4%
*-commutative83.4%
*-commutative83.4%
associate-*r*83.5%
Simplified83.5%
if 4.99999999999999969e-99 < (*.f64 x y) Initial program 89.8%
Taylor expanded in x around inf 73.7%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+39)
(* x (/ (* y 0.5) a))
(if (<= (* x y) -1e-46)
(* z (/ (* t -4.5) a))
(if (or (<= (* x y) -2e-87) (not (<= (* x y) 5e-99)))
(* (/ 0.5 a) (* x y))
(* -4.5 (/ (* z t) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
tmp = (0.5 / a) * (x * y);
} else {
tmp = -4.5 * ((z * t) / a);
}
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 ((x * y) <= (-2d+39)) then
tmp = x * ((y * 0.5d0) / a)
else if ((x * y) <= (-1d-46)) then
tmp = z * ((t * (-4.5d0)) / a)
else if (((x * y) <= (-2d-87)) .or. (.not. ((x * y) <= 5d-99))) then
tmp = (0.5d0 / a) * (x * y)
else
tmp = (-4.5d0) * ((z * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
tmp = (0.5 / a) * (x * y);
} else {
tmp = -4.5 * ((z * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+39: tmp = x * ((y * 0.5) / a) elif (x * y) <= -1e-46: tmp = z * ((t * -4.5) / a) elif ((x * y) <= -2e-87) or not ((x * y) <= 5e-99): tmp = (0.5 / a) * (x * y) else: tmp = -4.5 * ((z * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+39) tmp = Float64(x * Float64(Float64(y * 0.5) / a)); elseif (Float64(x * y) <= -1e-46) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif ((Float64(x * y) <= -2e-87) || !(Float64(x * y) <= 5e-99)) tmp = Float64(Float64(0.5 / a) * Float64(x * y)); else tmp = Float64(-4.5 * Float64(Float64(z * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e+39) tmp = x * ((y * 0.5) / a); elseif ((x * y) <= -1e-46) tmp = z * ((t * -4.5) / a); elseif (((x * y) <= -2e-87) || ~(((x * y) <= 5e-99))) tmp = (0.5 / a) * (x * y); else tmp = -4.5 * ((z * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e-99]], $MachinePrecision]], N[(N[(0.5 / a), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e39Initial program 88.6%
Taylor expanded in x around inf 73.5%
*-commutative73.5%
associate-/l*73.4%
associate-*r*73.4%
*-commutative73.4%
associate-*r/73.4%
Simplified73.4%
if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46Initial program 94.3%
Taylor expanded in x around 0 74.8%
associate-*r/74.7%
associate-*r*74.8%
associate-*l/74.7%
associate-*r/74.5%
*-commutative74.5%
associate-*r/74.7%
Simplified74.7%
if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87 or 4.99999999999999969e-99 < (*.f64 x y) Initial program 91.0%
div-inv90.9%
fma-neg92.0%
*-commutative92.0%
distribute-rgt-neg-in92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
*-commutative92.0%
associate-/r*92.0%
metadata-eval92.0%
Applied egg-rr92.0%
Taylor expanded in x around inf 74.1%
if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99Initial program 93.8%
Taylor expanded in x around 0 83.4%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+39)
(* x (/ (* y 0.5) a))
(if (<= (* x y) -1e-46)
(* z (/ (* t -4.5) a))
(if (or (<= (* x y) -2e-87) (not (<= (* x y) 5e-99)))
(* (/ 0.5 a) (* x y))
(/ (* -4.5 (* z t)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
tmp = (0.5 / a) * (x * y);
} else {
tmp = (-4.5 * (z * t)) / a;
}
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 ((x * y) <= (-2d+39)) then
tmp = x * ((y * 0.5d0) / a)
else if ((x * y) <= (-1d-46)) then
tmp = z * ((t * (-4.5d0)) / a)
else if (((x * y) <= (-2d-87)) .or. (.not. ((x * y) <= 5d-99))) then
tmp = (0.5d0 / a) * (x * y)
else
tmp = ((-4.5d0) * (z * t)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
tmp = (0.5 / a) * (x * y);
} else {
tmp = (-4.5 * (z * t)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+39: tmp = x * ((y * 0.5) / a) elif (x * y) <= -1e-46: tmp = z * ((t * -4.5) / a) elif ((x * y) <= -2e-87) or not ((x * y) <= 5e-99): tmp = (0.5 / a) * (x * y) else: tmp = (-4.5 * (z * t)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+39) tmp = Float64(x * Float64(Float64(y * 0.5) / a)); elseif (Float64(x * y) <= -1e-46) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif ((Float64(x * y) <= -2e-87) || !(Float64(x * y) <= 5e-99)) tmp = Float64(Float64(0.5 / a) * Float64(x * y)); else tmp = Float64(Float64(-4.5 * Float64(z * t)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e+39) tmp = x * ((y * 0.5) / a); elseif ((x * y) <= -1e-46) tmp = z * ((t * -4.5) / a); elseif (((x * y) <= -2e-87) || ~(((x * y) <= 5e-99))) tmp = (0.5 / a) * (x * y); else tmp = (-4.5 * (z * t)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e-99]], $MachinePrecision]], N[(N[(0.5 / a), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(-4.5 * N[(z * t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{-4.5 \cdot \left(z \cdot t\right)}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e39Initial program 88.6%
Taylor expanded in x around inf 73.5%
*-commutative73.5%
associate-/l*73.4%
associate-*r*73.4%
*-commutative73.4%
associate-*r/73.4%
Simplified73.4%
if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46Initial program 94.3%
Taylor expanded in x around 0 74.8%
associate-*r/74.7%
associate-*r*74.8%
associate-*l/74.7%
associate-*r/74.5%
*-commutative74.5%
associate-*r/74.7%
Simplified74.7%
if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87 or 4.99999999999999969e-99 < (*.f64 x y) Initial program 91.0%
div-inv90.9%
fma-neg92.0%
*-commutative92.0%
distribute-rgt-neg-in92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
*-commutative92.0%
associate-/r*92.0%
metadata-eval92.0%
Applied egg-rr92.0%
Taylor expanded in x around inf 74.1%
if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99Initial program 93.8%
Taylor expanded in x around 0 83.4%
associate-*r/83.5%
Applied egg-rr83.5%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+39)
(* x (/ (* y 0.5) a))
(if (<= (* x y) -1e-46)
(* z (/ (* t -4.5) a))
(if (or (<= (* x y) -2e-87) (not (<= (* x y) 5e-99)))
(* (/ 0.5 a) (* x y))
(/ (* t (* z -4.5)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
tmp = (0.5 / a) * (x * y);
} else {
tmp = (t * (z * -4.5)) / a;
}
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 ((x * y) <= (-2d+39)) then
tmp = x * ((y * 0.5d0) / a)
else if ((x * y) <= (-1d-46)) then
tmp = z * ((t * (-4.5d0)) / a)
else if (((x * y) <= (-2d-87)) .or. (.not. ((x * y) <= 5d-99))) then
tmp = (0.5d0 / a) * (x * y)
else
tmp = (t * (z * (-4.5d0))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if (((x * y) <= -2e-87) || !((x * y) <= 5e-99)) {
tmp = (0.5 / a) * (x * y);
} else {
tmp = (t * (z * -4.5)) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+39: tmp = x * ((y * 0.5) / a) elif (x * y) <= -1e-46: tmp = z * ((t * -4.5) / a) elif ((x * y) <= -2e-87) or not ((x * y) <= 5e-99): tmp = (0.5 / a) * (x * y) else: tmp = (t * (z * -4.5)) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+39) tmp = Float64(x * Float64(Float64(y * 0.5) / a)); elseif (Float64(x * y) <= -1e-46) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif ((Float64(x * y) <= -2e-87) || !(Float64(x * y) <= 5e-99)) tmp = Float64(Float64(0.5 / a) * Float64(x * y)); else tmp = Float64(Float64(t * Float64(z * -4.5)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e+39) tmp = x * ((y * 0.5) / a); elseif ((x * y) <= -1e-46) tmp = z * ((t * -4.5) / a); elseif (((x * y) <= -2e-87) || ~(((x * y) <= 5e-99))) tmp = (0.5 / a) * (x * y); else tmp = (t * (z * -4.5)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[Not[LessEqual[N[(x * y), $MachinePrecision], 5e-99]], $MachinePrecision]], N[(N[(0.5 / a), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(z * -4.5), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87} \lor \neg \left(x \cdot y \leq 5 \cdot 10^{-99}\right):\\
\;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(z \cdot -4.5\right)}{a}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e39Initial program 88.6%
Taylor expanded in x around inf 73.5%
*-commutative73.5%
associate-/l*73.4%
associate-*r*73.4%
*-commutative73.4%
associate-*r/73.4%
Simplified73.4%
if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46Initial program 94.3%
Taylor expanded in x around 0 74.8%
associate-*r/74.7%
associate-*r*74.8%
associate-*l/74.7%
associate-*r/74.5%
*-commutative74.5%
associate-*r/74.7%
Simplified74.7%
if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87 or 4.99999999999999969e-99 < (*.f64 x y) Initial program 91.0%
div-inv90.9%
fma-neg92.0%
*-commutative92.0%
distribute-rgt-neg-in92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
*-commutative92.0%
associate-/r*92.0%
metadata-eval92.0%
Applied egg-rr92.0%
Taylor expanded in x around inf 74.1%
if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99Initial program 93.8%
Taylor expanded in x around 0 83.4%
associate-*r/83.5%
associate-*r*83.5%
associate-*l/73.5%
associate-*r/73.4%
*-commutative73.4%
associate-*l*73.4%
Simplified73.4%
associate-*l/83.5%
*-commutative83.5%
Applied egg-rr83.5%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+39)
(* x (/ (* y 0.5) a))
(if (<= (* x y) -1e-46)
(* z (/ (* t -4.5) a))
(if (<= (* x y) -2e-87)
(* (/ 0.5 a) (* x y))
(if (<= (* x y) 5e-99) (/ (* t (* z -4.5)) a) (/ (* x y) (* a 2.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if ((x * y) <= -2e-87) {
tmp = (0.5 / a) * (x * y);
} else if ((x * y) <= 5e-99) {
tmp = (t * (z * -4.5)) / a;
} else {
tmp = (x * y) / (a * 2.0);
}
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 ((x * y) <= (-2d+39)) then
tmp = x * ((y * 0.5d0) / a)
else if ((x * y) <= (-1d-46)) then
tmp = z * ((t * (-4.5d0)) / a)
else if ((x * y) <= (-2d-87)) then
tmp = (0.5d0 / a) * (x * y)
else if ((x * y) <= 5d-99) then
tmp = (t * (z * (-4.5d0))) / a
else
tmp = (x * y) / (a * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if ((x * y) <= -2e-87) {
tmp = (0.5 / a) * (x * y);
} else if ((x * y) <= 5e-99) {
tmp = (t * (z * -4.5)) / a;
} else {
tmp = (x * y) / (a * 2.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+39: tmp = x * ((y * 0.5) / a) elif (x * y) <= -1e-46: tmp = z * ((t * -4.5) / a) elif (x * y) <= -2e-87: tmp = (0.5 / a) * (x * y) elif (x * y) <= 5e-99: tmp = (t * (z * -4.5)) / a else: tmp = (x * y) / (a * 2.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+39) tmp = Float64(x * Float64(Float64(y * 0.5) / a)); elseif (Float64(x * y) <= -1e-46) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif (Float64(x * y) <= -2e-87) tmp = Float64(Float64(0.5 / a) * Float64(x * y)); elseif (Float64(x * y) <= 5e-99) tmp = Float64(Float64(t * Float64(z * -4.5)) / a); else tmp = Float64(Float64(x * y) / Float64(a * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e+39) tmp = x * ((y * 0.5) / a); elseif ((x * y) <= -1e-46) tmp = z * ((t * -4.5) / a); elseif ((x * y) <= -2e-87) tmp = (0.5 / a) * (x * y); elseif ((x * y) <= 5e-99) tmp = (t * (z * -4.5)) / a; else tmp = (x * y) / (a * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[(N[(0.5 / a), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-99], N[(N[(t * N[(z * -4.5), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87}:\\
\;\;\;\;\frac{0.5}{a} \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-99}:\\
\;\;\;\;\frac{t \cdot \left(z \cdot -4.5\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e39Initial program 88.6%
Taylor expanded in x around inf 73.5%
*-commutative73.5%
associate-/l*73.4%
associate-*r*73.4%
*-commutative73.4%
associate-*r/73.4%
Simplified73.4%
if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46Initial program 94.3%
Taylor expanded in x around 0 74.8%
associate-*r/74.7%
associate-*r*74.8%
associate-*l/74.7%
associate-*r/74.5%
*-commutative74.5%
associate-*r/74.7%
Simplified74.7%
if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87Initial program 99.6%
div-inv99.4%
fma-neg99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Applied egg-rr99.4%
Taylor expanded in x around inf 77.3%
if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99Initial program 93.8%
Taylor expanded in x around 0 83.4%
associate-*r/83.5%
associate-*r*83.5%
associate-*l/73.5%
associate-*r/73.4%
*-commutative73.4%
associate-*l*73.4%
Simplified73.4%
associate-*l/83.5%
*-commutative83.5%
Applied egg-rr83.5%
if 4.99999999999999969e-99 < (*.f64 x y) Initial program 89.8%
Taylor expanded in x around inf 73.7%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* x y) -2e+39)
(* x (/ (* y 0.5) a))
(if (<= (* x y) -1e-46)
(* z (/ (* t -4.5) a))
(if (<= (* x y) -2e-87)
(* (/ 0.5 a) (/ y (/ 1.0 x)))
(if (<= (* x y) 5e-99) (/ (* t (* z -4.5)) a) (/ (* x y) (* a 2.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if ((x * y) <= -2e-87) {
tmp = (0.5 / a) * (y / (1.0 / x));
} else if ((x * y) <= 5e-99) {
tmp = (t * (z * -4.5)) / a;
} else {
tmp = (x * y) / (a * 2.0);
}
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 ((x * y) <= (-2d+39)) then
tmp = x * ((y * 0.5d0) / a)
else if ((x * y) <= (-1d-46)) then
tmp = z * ((t * (-4.5d0)) / a)
else if ((x * y) <= (-2d-87)) then
tmp = (0.5d0 / a) * (y / (1.0d0 / x))
else if ((x * y) <= 5d-99) then
tmp = (t * (z * (-4.5d0))) / a
else
tmp = (x * y) / (a * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x * y) <= -2e+39) {
tmp = x * ((y * 0.5) / a);
} else if ((x * y) <= -1e-46) {
tmp = z * ((t * -4.5) / a);
} else if ((x * y) <= -2e-87) {
tmp = (0.5 / a) * (y / (1.0 / x));
} else if ((x * y) <= 5e-99) {
tmp = (t * (z * -4.5)) / a;
} else {
tmp = (x * y) / (a * 2.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x * y) <= -2e+39: tmp = x * ((y * 0.5) / a) elif (x * y) <= -1e-46: tmp = z * ((t * -4.5) / a) elif (x * y) <= -2e-87: tmp = (0.5 / a) * (y / (1.0 / x)) elif (x * y) <= 5e-99: tmp = (t * (z * -4.5)) / a else: tmp = (x * y) / (a * 2.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x * y) <= -2e+39) tmp = Float64(x * Float64(Float64(y * 0.5) / a)); elseif (Float64(x * y) <= -1e-46) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); elseif (Float64(x * y) <= -2e-87) tmp = Float64(Float64(0.5 / a) * Float64(y / Float64(1.0 / x))); elseif (Float64(x * y) <= 5e-99) tmp = Float64(Float64(t * Float64(z * -4.5)) / a); else tmp = Float64(Float64(x * y) / Float64(a * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x * y) <= -2e+39) tmp = x * ((y * 0.5) / a); elseif ((x * y) <= -1e-46) tmp = z * ((t * -4.5) / a); elseif ((x * y) <= -2e-87) tmp = (0.5 / a) * (y / (1.0 / x)); elseif ((x * y) <= 5e-99) tmp = (t * (z * -4.5)) / a; else tmp = (x * y) / (a * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x * y), $MachinePrecision], -2e+39], N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -1e-46], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], -2e-87], N[(N[(0.5 / a), $MachinePrecision] * N[(y / N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e-99], N[(N[(t * N[(z * -4.5), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \cdot y \leq -2 \cdot 10^{+39}:\\
\;\;\;\;x \cdot \frac{y \cdot 0.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -1 \cdot 10^{-46}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{elif}\;x \cdot y \leq -2 \cdot 10^{-87}:\\
\;\;\;\;\frac{0.5}{a} \cdot \frac{y}{\frac{1}{x}}\\
\mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{-99}:\\
\;\;\;\;\frac{t \cdot \left(z \cdot -4.5\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 x y) < -1.99999999999999988e39Initial program 88.6%
Taylor expanded in x around inf 73.5%
*-commutative73.5%
associate-/l*73.4%
associate-*r*73.4%
*-commutative73.4%
associate-*r/73.4%
Simplified73.4%
if -1.99999999999999988e39 < (*.f64 x y) < -1.00000000000000002e-46Initial program 94.3%
Taylor expanded in x around 0 74.8%
associate-*r/74.7%
associate-*r*74.8%
associate-*l/74.7%
associate-*r/74.5%
*-commutative74.5%
associate-*r/74.7%
Simplified74.7%
if -1.00000000000000002e-46 < (*.f64 x y) < -2.00000000000000004e-87Initial program 99.6%
Taylor expanded in y around inf 56.2%
fma-define56.2%
*-commutative56.2%
associate-/r*72.9%
*-commutative72.9%
associate-/l*72.9%
associate-*r/72.9%
Simplified72.9%
Taylor expanded in z around 0 51.7%
associate-*r*51.7%
clear-num51.4%
un-div-inv51.7%
Applied egg-rr51.7%
*-commutative51.7%
div-inv51.7%
times-frac77.4%
Applied egg-rr77.4%
if -2.00000000000000004e-87 < (*.f64 x y) < 4.99999999999999969e-99Initial program 93.8%
Taylor expanded in x around 0 83.4%
associate-*r/83.5%
associate-*r*83.5%
associate-*l/73.5%
associate-*r/73.4%
*-commutative73.4%
associate-*l*73.4%
Simplified73.4%
associate-*l/83.5%
*-commutative83.5%
Applied egg-rr83.5%
if 4.99999999999999969e-99 < (*.f64 x y) Initial program 89.8%
Taylor expanded in x around inf 73.7%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ (* y 0.5) a))) (t_2 (* -4.5 (/ (* z t) a))))
(if (<= z -5.2e+42)
t_2
(if (<= z 1.7e-145)
t_1
(if (<= z 3.8) t_2 (if (<= z 3.3e+49) t_1 (* -4.5 (* t (/ z a)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y * 0.5) / a);
double t_2 = -4.5 * ((z * t) / a);
double tmp;
if (z <= -5.2e+42) {
tmp = t_2;
} else if (z <= 1.7e-145) {
tmp = t_1;
} else if (z <= 3.8) {
tmp = t_2;
} else if (z <= 3.3e+49) {
tmp = t_1;
} else {
tmp = -4.5 * (t * (z / a));
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y * 0.5d0) / a)
t_2 = (-4.5d0) * ((z * t) / a)
if (z <= (-5.2d+42)) then
tmp = t_2
else if (z <= 1.7d-145) then
tmp = t_1
else if (z <= 3.8d0) then
tmp = t_2
else if (z <= 3.3d+49) then
tmp = t_1
else
tmp = (-4.5d0) * (t * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y * 0.5) / a);
double t_2 = -4.5 * ((z * t) / a);
double tmp;
if (z <= -5.2e+42) {
tmp = t_2;
} else if (z <= 1.7e-145) {
tmp = t_1;
} else if (z <= 3.8) {
tmp = t_2;
} else if (z <= 3.3e+49) {
tmp = t_1;
} else {
tmp = -4.5 * (t * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * ((y * 0.5) / a) t_2 = -4.5 * ((z * t) / a) tmp = 0 if z <= -5.2e+42: tmp = t_2 elif z <= 1.7e-145: tmp = t_1 elif z <= 3.8: tmp = t_2 elif z <= 3.3e+49: tmp = t_1 else: tmp = -4.5 * (t * (z / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(y * 0.5) / a)) t_2 = Float64(-4.5 * Float64(Float64(z * t) / a)) tmp = 0.0 if (z <= -5.2e+42) tmp = t_2; elseif (z <= 1.7e-145) tmp = t_1; elseif (z <= 3.8) tmp = t_2; elseif (z <= 3.3e+49) tmp = t_1; else tmp = Float64(-4.5 * Float64(t * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * ((y * 0.5) / a); t_2 = -4.5 * ((z * t) / a); tmp = 0.0; if (z <= -5.2e+42) tmp = t_2; elseif (z <= 1.7e-145) tmp = t_1; elseif (z <= 3.8) tmp = t_2; elseif (z <= 3.3e+49) tmp = t_1; else tmp = -4.5 * (t * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.2e+42], t$95$2, If[LessEqual[z, 1.7e-145], t$95$1, If[LessEqual[z, 3.8], t$95$2, If[LessEqual[z, 3.3e+49], t$95$1, N[(-4.5 * N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y \cdot 0.5}{a}\\
t_2 := -4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{if}\;z \leq -5.2 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.8:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\end{array}
\end{array}
if z < -5.1999999999999998e42 or 1.6999999999999999e-145 < z < 3.7999999999999998Initial program 88.3%
Taylor expanded in x around 0 64.7%
if -5.1999999999999998e42 < z < 1.6999999999999999e-145 or 3.7999999999999998 < z < 3.2999999999999998e49Initial program 96.7%
Taylor expanded in x around inf 69.5%
*-commutative69.5%
associate-/l*64.9%
associate-*r*64.9%
*-commutative64.9%
associate-*r/64.9%
Simplified64.9%
if 3.2999999999999998e49 < z Initial program 86.9%
Taylor expanded in x around 0 56.8%
associate-/l*66.2%
Simplified66.2%
Final simplification65.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ (* y 0.5) a))) (t_2 (* z (* t (/ -4.5 a)))))
(if (<= z -2.6e+37)
t_2
(if (<= z 1.7e-145)
t_1
(if (<= z 13000000000000.0)
(* -4.5 (/ (* z t) a))
(if (<= z 2.7e+51) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y * 0.5) / a);
double t_2 = z * (t * (-4.5 / a));
double tmp;
if (z <= -2.6e+37) {
tmp = t_2;
} else if (z <= 1.7e-145) {
tmp = t_1;
} else if (z <= 13000000000000.0) {
tmp = -4.5 * ((z * t) / a);
} else if (z <= 2.7e+51) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y * 0.5d0) / a)
t_2 = z * (t * ((-4.5d0) / a))
if (z <= (-2.6d+37)) then
tmp = t_2
else if (z <= 1.7d-145) then
tmp = t_1
else if (z <= 13000000000000.0d0) then
tmp = (-4.5d0) * ((z * t) / a)
else if (z <= 2.7d+51) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y * 0.5) / a);
double t_2 = z * (t * (-4.5 / a));
double tmp;
if (z <= -2.6e+37) {
tmp = t_2;
} else if (z <= 1.7e-145) {
tmp = t_1;
} else if (z <= 13000000000000.0) {
tmp = -4.5 * ((z * t) / a);
} else if (z <= 2.7e+51) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * ((y * 0.5) / a) t_2 = z * (t * (-4.5 / a)) tmp = 0 if z <= -2.6e+37: tmp = t_2 elif z <= 1.7e-145: tmp = t_1 elif z <= 13000000000000.0: tmp = -4.5 * ((z * t) / a) elif z <= 2.7e+51: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(y * 0.5) / a)) t_2 = Float64(z * Float64(t * Float64(-4.5 / a))) tmp = 0.0 if (z <= -2.6e+37) tmp = t_2; elseif (z <= 1.7e-145) tmp = t_1; elseif (z <= 13000000000000.0) tmp = Float64(-4.5 * Float64(Float64(z * t) / a)); elseif (z <= 2.7e+51) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * ((y * 0.5) / a); t_2 = z * (t * (-4.5 / a)); tmp = 0.0; if (z <= -2.6e+37) tmp = t_2; elseif (z <= 1.7e-145) tmp = t_1; elseif (z <= 13000000000000.0) tmp = -4.5 * ((z * t) / a); elseif (z <= 2.7e+51) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(t * N[(-4.5 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+37], t$95$2, If[LessEqual[z, 1.7e-145], t$95$1, If[LessEqual[z, 13000000000000.0], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+51], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y \cdot 0.5}{a}\\
t_2 := z \cdot \left(t \cdot \frac{-4.5}{a}\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 13000000000000:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.5999999999999999e37 or 2.69999999999999992e51 < z Initial program 87.2%
Taylor expanded in x around 0 66.5%
associate-*r/66.4%
Applied egg-rr66.4%
*-commutative66.4%
associate-*r/66.4%
associate-*r*72.3%
*-commutative72.3%
associate-*l*70.1%
Applied egg-rr70.1%
if -2.5999999999999999e37 < z < 1.6999999999999999e-145 or 1.3e13 < z < 2.69999999999999992e51Initial program 97.4%
Taylor expanded in x around inf 71.3%
*-commutative71.3%
associate-/l*65.8%
associate-*r*65.8%
*-commutative65.8%
associate-*r/65.8%
Simplified65.8%
if 1.6999999999999999e-145 < z < 1.3e13Initial program 87.7%
Taylor expanded in x around 0 43.4%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ (* y 0.5) a))) (t_2 (* z (/ (* t -4.5) a))))
(if (<= z -1.95e+37)
t_2
(if (<= z 1.42e-145)
t_1
(if (<= z 1.9e-22) (* -4.5 (/ (* z t) a)) (if (<= z 8e+54) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y * 0.5) / a);
double t_2 = z * ((t * -4.5) / a);
double tmp;
if (z <= -1.95e+37) {
tmp = t_2;
} else if (z <= 1.42e-145) {
tmp = t_1;
} else if (z <= 1.9e-22) {
tmp = -4.5 * ((z * t) / a);
} else if (z <= 8e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * ((y * 0.5d0) / a)
t_2 = z * ((t * (-4.5d0)) / a)
if (z <= (-1.95d+37)) then
tmp = t_2
else if (z <= 1.42d-145) then
tmp = t_1
else if (z <= 1.9d-22) then
tmp = (-4.5d0) * ((z * t) / a)
else if (z <= 8d+54) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * ((y * 0.5) / a);
double t_2 = z * ((t * -4.5) / a);
double tmp;
if (z <= -1.95e+37) {
tmp = t_2;
} else if (z <= 1.42e-145) {
tmp = t_1;
} else if (z <= 1.9e-22) {
tmp = -4.5 * ((z * t) / a);
} else if (z <= 8e+54) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * ((y * 0.5) / a) t_2 = z * ((t * -4.5) / a) tmp = 0 if z <= -1.95e+37: tmp = t_2 elif z <= 1.42e-145: tmp = t_1 elif z <= 1.9e-22: tmp = -4.5 * ((z * t) / a) elif z <= 8e+54: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(Float64(y * 0.5) / a)) t_2 = Float64(z * Float64(Float64(t * -4.5) / a)) tmp = 0.0 if (z <= -1.95e+37) tmp = t_2; elseif (z <= 1.42e-145) tmp = t_1; elseif (z <= 1.9e-22) tmp = Float64(-4.5 * Float64(Float64(z * t) / a)); elseif (z <= 8e+54) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * ((y * 0.5) / a); t_2 = z * ((t * -4.5) / a); tmp = 0.0; if (z <= -1.95e+37) tmp = t_2; elseif (z <= 1.42e-145) tmp = t_1; elseif (z <= 1.9e-22) tmp = -4.5 * ((z * t) / a); elseif (z <= 8e+54) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+37], t$95$2, If[LessEqual[z, 1.42e-145], t$95$1, If[LessEqual[z, 1.9e-22], N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+54], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y \cdot 0.5}{a}\\
t_2 := z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+37}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.42 \cdot 10^{-145}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-22}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.9499999999999999e37 or 8.0000000000000006e54 < z Initial program 87.1%
Taylor expanded in x around 0 66.2%
associate-*r/66.1%
associate-*r*66.2%
associate-*l/69.9%
associate-*r/69.8%
*-commutative69.8%
associate-*r/69.9%
Simplified69.9%
if -1.9499999999999999e37 < z < 1.4200000000000001e-145 or 1.90000000000000012e-22 < z < 8.0000000000000006e54Initial program 97.6%
Taylor expanded in x around inf 70.3%
*-commutative70.3%
associate-/l*65.9%
associate-*r*65.9%
*-commutative65.9%
associate-*r/65.9%
Simplified65.9%
if 1.4200000000000001e-145 < z < 1.90000000000000012e-22Initial program 85.4%
Taylor expanded in x around 0 43.8%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (* z 9.0) t))) (if (<= t_1 -5e+210) (* z (/ (* t -4.5) a)) (/ (- (* x y) t_1) (* a 2.0)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * 9.0) * t;
double tmp;
if (t_1 <= -5e+210) {
tmp = z * ((t * -4.5) / a);
} else {
tmp = ((x * y) - t_1) / (a * 2.0);
}
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) :: t_1
real(8) :: tmp
t_1 = (z * 9.0d0) * t
if (t_1 <= (-5d+210)) then
tmp = z * ((t * (-4.5d0)) / a)
else
tmp = ((x * y) - t_1) / (a * 2.0d0)
end if
code = tmp
end function
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 <= -5e+210) {
tmp = z * ((t * -4.5) / a);
} else {
tmp = ((x * y) - t_1) / (a * 2.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * 9.0) * t tmp = 0 if t_1 <= -5e+210: tmp = z * ((t * -4.5) / a) else: tmp = ((x * y) - t_1) / (a * 2.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * 9.0) * t) tmp = 0.0 if (t_1 <= -5e+210) tmp = Float64(z * Float64(Float64(t * -4.5) / a)); else tmp = Float64(Float64(Float64(x * y) - t_1) / Float64(a * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * 9.0) * t; tmp = 0.0; if (t_1 <= -5e+210) tmp = z * ((t * -4.5) / a); else tmp = ((x * y) - t_1) / (a * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+210], N[(z * N[(N[(t * -4.5), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * y), $MachinePrecision] - t$95$1), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot 9\right) \cdot t\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+210}:\\
\;\;\;\;z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y - t\_1}{a \cdot 2}\\
\end{array}
\end{array}
if (*.f64 (*.f64 z 9) t) < -4.9999999999999998e210Initial program 73.1%
Taylor expanded in x around 0 79.4%
associate-*r/79.4%
associate-*r*79.4%
associate-*l/99.9%
associate-*r/99.9%
*-commutative99.9%
associate-*r/99.9%
Simplified99.9%
if -4.9999999999999998e210 < (*.f64 (*.f64 z 9) t) Initial program 94.3%
Final simplification95.0%
(FPCore (x y z t a) :precision binary64 (* -4.5 (* t (/ z a))))
double code(double x, double y, double z, double t, double a) {
return -4.5 * (t * (z / a));
}
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
public static double code(double x, double y, double z, double t, double a) {
return -4.5 * (t * (z / a));
}
def code(x, y, z, t, a): return -4.5 * (t * (z / a))
function code(x, y, z, t, a) return Float64(-4.5 * Float64(t * Float64(z / a))) end
function tmp = code(x, y, z, t, a) tmp = -4.5 * (t * (z / a)); end
code[x_, y_, z_, t_, a_] := N[(-4.5 * N[(t * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-4.5 \cdot \left(t \cdot \frac{z}{a}\right)
\end{array}
Initial program 91.7%
Taylor expanded in x around 0 49.6%
associate-/l*51.0%
Simplified51.0%
Final simplification51.0%
(FPCore (x y z t a) :precision binary64 (* -4.5 (/ (* z t) a)))
double code(double x, double y, double z, double t, double a) {
return -4.5 * ((z * t) / a);
}
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
public static double code(double x, double y, double z, double t, double a) {
return -4.5 * ((z * t) / a);
}
def code(x, y, z, t, a): return -4.5 * ((z * t) / a)
function code(x, y, z, t, a) return Float64(-4.5 * Float64(Float64(z * t) / a)) end
function tmp = code(x, y, z, t, a) tmp = -4.5 * ((z * t) / a); end
code[x_, y_, z_, t_, a_] := N[(-4.5 * N[(N[(z * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
-4.5 \cdot \frac{z \cdot t}{a}
\end{array}
Initial program 91.7%
Taylor expanded in x around 0 49.6%
Final simplification49.6%
(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 2024080
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:alt
(if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9.0 t))) (* a 2.0)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0)))