
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= (* z 3.0) -2e+35)
(+ t_1 (/ t (* z (* y 3.0))))
(if (<= (* z 3.0) 5e-30)
(+ x (/ (- (/ t y) y) (* z 3.0)))
(+ t_1 (/ t (* y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -2e+35) {
tmp = t_1 + (t / (z * (y * 3.0)));
} else if ((z * 3.0) <= 5e-30) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = t_1 + (t / (y * (z * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y / (z * 3.0d0))
if ((z * 3.0d0) <= (-2d+35)) then
tmp = t_1 + (t / (z * (y * 3.0d0)))
else if ((z * 3.0d0) <= 5d-30) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = t_1 + (t / (y * (z * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -2e+35) {
tmp = t_1 + (t / (z * (y * 3.0)));
} else if ((z * 3.0) <= 5e-30) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = t_1 + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if (z * 3.0) <= -2e+35: tmp = t_1 + (t / (z * (y * 3.0))) elif (z * 3.0) <= 5e-30: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = t_1 + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (Float64(z * 3.0) <= -2e+35) tmp = Float64(t_1 + Float64(t / Float64(z * Float64(y * 3.0)))); elseif (Float64(z * 3.0) <= 5e-30) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(t_1 + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if ((z * 3.0) <= -2e+35) tmp = t_1 + (t / (z * (y * 3.0))); elseif ((z * 3.0) <= 5e-30) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = t_1 + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+35], N[(t$95$1 + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 5e-30], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+35}:\\
\;\;\;\;t_1 + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\mathbf{elif}\;z \cdot 3 \leq 5 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.9999999999999999e35Initial program 99.6%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if -1.9999999999999999e35 < (*.f64 z 3) < 4.99999999999999972e-30Initial program 91.5%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
*-commutative91.5%
associate-*l*91.5%
associate-+l-91.5%
*-commutative91.5%
associate-/r*99.0%
sub-div99.8%
Applied egg-rr99.8%
if 4.99999999999999972e-30 < (*.f64 z 3) Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* 0.3333333333333333 (/ t (* y z))))))
(if (<= y -130000000000.0)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 5.2e-165)
t_1
(if (<= y 1.16e-110)
(* (/ 0.3333333333333333 z) (- (/ t y) y))
(if (<= y 8.5e+26) t_1 (+ x (* y (/ -0.3333333333333333 z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (y * z)));
double tmp;
if (y <= -130000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.2e-165) {
tmp = t_1;
} else if (y <= 1.16e-110) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else if (y <= 8.5e+26) {
tmp = t_1;
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (0.3333333333333333d0 * (t / (y * z)))
if (y <= (-130000000000.0d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 5.2d-165) then
tmp = t_1
else if (y <= 1.16d-110) then
tmp = (0.3333333333333333d0 / z) * ((t / y) - y)
else if (y <= 8.5d+26) then
tmp = t_1
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (y * z)));
double tmp;
if (y <= -130000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.2e-165) {
tmp = t_1;
} else if (y <= 1.16e-110) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else if (y <= 8.5e+26) {
tmp = t_1;
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (0.3333333333333333 * (t / (y * z))) tmp = 0 if y <= -130000000000.0: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 5.2e-165: tmp = t_1 elif y <= 1.16e-110: tmp = (0.3333333333333333 / z) * ((t / y) - y) elif y <= 8.5e+26: tmp = t_1 else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))) tmp = 0.0 if (y <= -130000000000.0) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 5.2e-165) tmp = t_1; elseif (y <= 1.16e-110) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); elseif (y <= 8.5e+26) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (0.3333333333333333 * (t / (y * z))); tmp = 0.0; if (y <= -130000000000.0) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 5.2e-165) tmp = t_1; elseif (y <= 1.16e-110) tmp = (0.3333333333333333 / z) * ((t / y) - y); elseif (y <= 8.5e+26) tmp = t_1; else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -130000000000.0], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-165], t$95$1, If[LessEqual[y, 1.16e-110], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e+26], t$95$1, N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{if}\;y \leq -130000000000:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-165}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{-110}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.3e11Initial program 98.3%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.6%
if -1.3e11 < y < 5.20000000000000015e-165 or 1.16000000000000001e-110 < y < 8.5e26Initial program 95.6%
Simplified89.6%
Taylor expanded in t around inf 92.3%
if 5.20000000000000015e-165 < y < 1.16000000000000001e-110Initial program 63.3%
associate-*l*63.4%
*-commutative63.4%
Simplified63.4%
+-commutative63.4%
*-commutative63.4%
associate-*l*63.3%
associate-+r-63.3%
associate-*l*63.4%
*-commutative63.4%
associate-/r*100.0%
div-inv100.0%
metadata-eval100.0%
div-inv100.0%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.2%
div-sub88.2%
*-commutative88.2%
associate-*l/88.1%
fma-neg88.1%
fma-def88.1%
distribute-neg-frac88.1%
distribute-lft-neg-in88.1%
associate-*r/88.1%
*-commutative88.1%
distribute-lft-out88.1%
sub-neg88.1%
Simplified88.1%
if 8.5e26 < y Initial program 99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
*-commutative96.7%
associate-*l/96.7%
associate-*r/96.8%
Simplified96.8%
Final simplification94.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -72000000000.0)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 5.2e-165)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(if (<= y 1.16e-110)
(* (/ 0.3333333333333333 z) (- (/ t y) y))
(if (<= y 6.2e+20)
(+ x (* (/ 0.3333333333333333 z) (/ t y)))
(+ x (* y (/ -0.3333333333333333 z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -72000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.2e-165) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= 1.16e-110) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else if (y <= 6.2e+20) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-72000000000.0d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 5.2d-165) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else if (y <= 1.16d-110) then
tmp = (0.3333333333333333d0 / z) * ((t / y) - y)
else if (y <= 6.2d+20) then
tmp = x + ((0.3333333333333333d0 / z) * (t / y))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -72000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.2e-165) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= 1.16e-110) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else if (y <= 6.2e+20) {
tmp = x + ((0.3333333333333333 / z) * (t / y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -72000000000.0: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 5.2e-165: tmp = x + (0.3333333333333333 * (t / (y * z))) elif y <= 1.16e-110: tmp = (0.3333333333333333 / z) * ((t / y) - y) elif y <= 6.2e+20: tmp = x + ((0.3333333333333333 / z) * (t / y)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -72000000000.0) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 5.2e-165) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); elseif (y <= 1.16e-110) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); elseif (y <= 6.2e+20) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(t / y))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -72000000000.0) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 5.2e-165) tmp = x + (0.3333333333333333 * (t / (y * z))); elseif (y <= 1.16e-110) tmp = (0.3333333333333333 / z) * ((t / y) - y); elseif (y <= 6.2e+20) tmp = x + ((0.3333333333333333 / z) * (t / y)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -72000000000.0], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-165], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.16e-110], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e+20], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -72000000000:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-165}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{-110}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+20}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.2e10Initial program 98.3%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.6%
if -7.2e10 < y < 5.20000000000000015e-165Initial program 94.6%
Simplified87.1%
Taylor expanded in t around inf 92.3%
if 5.20000000000000015e-165 < y < 1.16000000000000001e-110Initial program 63.3%
associate-*l*63.4%
*-commutative63.4%
Simplified63.4%
+-commutative63.4%
*-commutative63.4%
associate-*l*63.3%
associate-+r-63.3%
associate-*l*63.4%
*-commutative63.4%
associate-/r*100.0%
div-inv100.0%
metadata-eval100.0%
div-inv100.0%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.2%
div-sub88.2%
*-commutative88.2%
associate-*l/88.1%
fma-neg88.1%
fma-def88.1%
distribute-neg-frac88.1%
distribute-lft-neg-in88.1%
associate-*r/88.1%
*-commutative88.1%
distribute-lft-out88.1%
sub-neg88.1%
Simplified88.1%
if 1.16000000000000001e-110 < y < 6.2e20Initial program 99.7%
Simplified99.6%
Taylor expanded in t around inf 92.1%
associate-/r*92.2%
associate-*r/92.2%
associate-*l/92.1%
*-commutative92.1%
Simplified92.1%
if 6.2e20 < y Initial program 99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
*-commutative96.7%
associate-*l/96.7%
associate-*r/96.8%
Simplified96.8%
Final simplification94.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -230000000000.0)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 5.1e-165)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(if (<= y 1.16e-110)
(* (/ 0.3333333333333333 z) (- (/ t y) y))
(if (<= y 5.2e+20)
(+ x (/ 0.3333333333333333 (* z (/ y t))))
(+ x (* y (/ -0.3333333333333333 z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -230000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.1e-165) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= 1.16e-110) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else if (y <= 5.2e+20) {
tmp = x + (0.3333333333333333 / (z * (y / t)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-230000000000.0d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 5.1d-165) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else if (y <= 1.16d-110) then
tmp = (0.3333333333333333d0 / z) * ((t / y) - y)
else if (y <= 5.2d+20) then
tmp = x + (0.3333333333333333d0 / (z * (y / t)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -230000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.1e-165) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else if (y <= 1.16e-110) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else if (y <= 5.2e+20) {
tmp = x + (0.3333333333333333 / (z * (y / t)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -230000000000.0: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 5.1e-165: tmp = x + (0.3333333333333333 * (t / (y * z))) elif y <= 1.16e-110: tmp = (0.3333333333333333 / z) * ((t / y) - y) elif y <= 5.2e+20: tmp = x + (0.3333333333333333 / (z * (y / t))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -230000000000.0) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 5.1e-165) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); elseif (y <= 1.16e-110) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); elseif (y <= 5.2e+20) tmp = Float64(x + Float64(0.3333333333333333 / Float64(z * Float64(y / t)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -230000000000.0) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 5.1e-165) tmp = x + (0.3333333333333333 * (t / (y * z))); elseif (y <= 1.16e-110) tmp = (0.3333333333333333 / z) * ((t / y) - y); elseif (y <= 5.2e+20) tmp = x + (0.3333333333333333 / (z * (y / t))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -230000000000.0], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.1e-165], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.16e-110], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+20], N[(x + N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -230000000000:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{-165}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 1.16 \cdot 10^{-110}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+20}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.3e11Initial program 98.3%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.6%
if -2.3e11 < y < 5.1e-165Initial program 94.6%
Simplified87.1%
Taylor expanded in t around inf 92.3%
if 5.1e-165 < y < 1.16000000000000001e-110Initial program 63.3%
associate-*l*63.4%
*-commutative63.4%
Simplified63.4%
+-commutative63.4%
*-commutative63.4%
associate-*l*63.3%
associate-+r-63.3%
associate-*l*63.4%
*-commutative63.4%
associate-/r*100.0%
div-inv100.0%
metadata-eval100.0%
div-inv100.0%
clear-num100.0%
Applied egg-rr100.0%
Taylor expanded in z around 0 88.2%
div-sub88.2%
*-commutative88.2%
associate-*l/88.1%
fma-neg88.1%
fma-def88.1%
distribute-neg-frac88.1%
distribute-lft-neg-in88.1%
associate-*r/88.1%
*-commutative88.1%
distribute-lft-out88.1%
sub-neg88.1%
Simplified88.1%
if 1.16000000000000001e-110 < y < 5.2e20Initial program 99.7%
Simplified99.6%
Taylor expanded in t around inf 92.1%
associate-*r/92.2%
*-commutative92.2%
associate-/l/92.2%
div-inv92.2%
associate-/l*92.3%
frac-times92.3%
metadata-eval92.3%
Applied egg-rr92.3%
if 5.2e20 < y Initial program 99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
*-commutative96.7%
associate-*l/96.7%
associate-*r/96.8%
Simplified96.8%
Final simplification94.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -2e+35) (not (<= (* z 3.0) 5e-30))) (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0)))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -2e+35) || !((z * 3.0) <= 5e-30)) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-2d+35)) .or. (.not. ((z * 3.0d0) <= 5d-30))) then
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (y * 3.0d0)))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -2e+35) || !((z * 3.0) <= 5e-30)) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -2e+35) or not ((z * 3.0) <= 5e-30): tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -2e+35) || !(Float64(z * 3.0) <= 5e-30)) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0)))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -2e+35) || ~(((z * 3.0) <= 5e-30))) tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+35], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 5e-30]], $MachinePrecision]], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+35} \lor \neg \left(z \cdot 3 \leq 5 \cdot 10^{-30}\right):\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.9999999999999999e35 or 4.99999999999999972e-30 < (*.f64 z 3) Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if -1.9999999999999999e35 < (*.f64 z 3) < 4.99999999999999972e-30Initial program 91.5%
associate-*l*91.5%
*-commutative91.5%
Simplified91.5%
*-commutative91.5%
associate-*l*91.5%
associate-+l-91.5%
*-commutative91.5%
associate-/r*99.0%
sub-div99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(if (<= (* z 3.0) -1e+63)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= (* z 3.0) 2e+20)
(* (/ 0.3333333333333333 z) (- (/ t y) y))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+63) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if ((z * 3.0) <= 2e+20) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-1d+63)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if ((z * 3.0d0) <= 2d+20) then
tmp = (0.3333333333333333d0 / z) * ((t / y) - y)
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+63) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if ((z * 3.0) <= 2e+20) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e+63: tmp = x + (y * (-0.3333333333333333 / z)) elif (z * 3.0) <= 2e+20: tmp = (0.3333333333333333 / z) * ((t / y) - y) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e+63) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (Float64(z * 3.0) <= 2e+20) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -1e+63) tmp = x + (y * (-0.3333333333333333 / z)); elseif ((z * 3.0) <= 2e+20) tmp = (0.3333333333333333 / z) * ((t / y) - y); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+63], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e+20], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+63}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{+20}:\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.00000000000000006e63Initial program 99.7%
Simplified89.2%
Taylor expanded in t around 0 83.7%
*-commutative83.7%
associate-*l/83.8%
associate-*r/83.8%
Simplified83.8%
if -1.00000000000000006e63 < (*.f64 z 3) < 2e20Initial program 92.3%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
+-commutative92.3%
*-commutative92.3%
associate-*l*92.3%
associate-+r-92.3%
associate-*l*92.3%
*-commutative92.3%
associate-/r*95.5%
div-inv95.5%
metadata-eval95.5%
div-inv95.4%
clear-num95.4%
Applied egg-rr95.4%
Taylor expanded in z around 0 91.7%
div-sub90.9%
*-commutative90.9%
associate-*l/91.0%
fma-neg91.7%
fma-def91.0%
distribute-neg-frac91.0%
distribute-lft-neg-in91.0%
associate-*r/90.9%
*-commutative90.9%
distribute-lft-out91.6%
sub-neg91.6%
Simplified91.6%
if 2e20 < (*.f64 z 3) Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 74.4%
Final simplification85.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -52000.0)
(/ (/ y -3.0) z)
(if (<= y 5.8e-105)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 4.5e+144)
(+ x (* 0.3333333333333333 (/ y z)))
(/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -52000.0) {
tmp = (y / -3.0) / z;
} else if (y <= 5.8e-105) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 4.5e+144) {
tmp = x + (0.3333333333333333 * (y / z));
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-52000.0d0)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 5.8d-105) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 4.5d+144) then
tmp = x + (0.3333333333333333d0 * (y / z))
else
tmp = (y / z) / (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -52000.0) {
tmp = (y / -3.0) / z;
} else if (y <= 5.8e-105) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 4.5e+144) {
tmp = x + (0.3333333333333333 * (y / z));
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -52000.0: tmp = (y / -3.0) / z elif y <= 5.8e-105: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 4.5e+144: tmp = x + (0.3333333333333333 * (y / z)) else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -52000.0) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 5.8e-105) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 4.5e+144) tmp = Float64(x + Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -52000.0) tmp = (y / -3.0) / z; elseif (y <= 5.8e-105) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 4.5e+144) tmp = x + (0.3333333333333333 * (y / z)); else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -52000.0], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 5.8e-105], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+144], N[(x + N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -52000:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-105}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+144}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -52000Initial program 98.3%
associate-*l*98.3%
*-commutative98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*l*98.3%
associate-+r-98.3%
associate-*l*98.3%
*-commutative98.3%
associate-/r*98.3%
div-inv98.2%
metadata-eval98.2%
div-inv98.0%
clear-num98.1%
Applied egg-rr98.1%
Taylor expanded in y around inf 68.3%
associate-*r/68.3%
*-commutative68.3%
metadata-eval68.3%
distribute-rgt-neg-in68.3%
distribute-lft-neg-in68.3%
associate-*r/68.2%
distribute-lft-neg-out68.2%
distribute-rgt-neg-in68.2%
distribute-neg-frac68.2%
metadata-eval68.2%
Simplified68.2%
associate-*r/68.3%
associate-/l*68.3%
div-inv68.4%
metadata-eval68.4%
*-commutative68.4%
associate-/r*68.4%
Applied egg-rr68.4%
if -52000 < y < 5.80000000000000007e-105Initial program 90.5%
*-un-lft-identity90.5%
times-frac90.5%
Applied egg-rr90.5%
*-commutative90.5%
associate-*l/90.5%
div-inv90.5%
Applied egg-rr90.5%
Taylor expanded in y around 0 66.4%
*-commutative66.4%
associate-/r*70.8%
Simplified70.8%
if 5.80000000000000007e-105 < y < 4.49999999999999967e144Initial program 99.8%
Simplified99.8%
Taylor expanded in t around 0 70.8%
*-commutative70.8%
associate-*l/70.8%
associate-*r/70.8%
Simplified70.8%
*-un-lft-identity70.8%
fma-def70.8%
add-sqr-sqrt37.7%
sqrt-unprod63.4%
frac-times63.4%
metadata-eval63.4%
metadata-eval63.4%
frac-times63.4%
sqrt-unprod25.5%
add-sqr-sqrt57.8%
associate-*r/57.8%
Applied egg-rr57.8%
fma-udef57.8%
*-lft-identity57.8%
*-commutative57.8%
associate-*r/57.8%
Simplified57.8%
if 4.49999999999999967e144 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.4%
div-inv91.4%
metadata-eval91.4%
div-inv91.4%
clear-num91.3%
Applied egg-rr91.3%
Taylor expanded in y around inf 81.1%
associate-*r/81.1%
*-commutative81.1%
metadata-eval81.1%
distribute-rgt-neg-in81.1%
distribute-lft-neg-in81.1%
associate-*r/81.1%
distribute-lft-neg-out81.1%
distribute-rgt-neg-in81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
associate-*r/81.1%
associate-/l*81.2%
div-inv81.2%
metadata-eval81.2%
associate-/r*81.2%
Applied egg-rr81.2%
Final simplification70.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1600000000.0)
(/ (/ y -3.0) z)
(if (<= y 8.5e-114)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 4.5e+144) x (/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1600000000.0) {
tmp = (y / -3.0) / z;
} else if (y <= 8.5e-114) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 4.5e+144) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1600000000.0d0)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 8.5d-114) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 4.5d+144) then
tmp = x
else
tmp = (y / z) / (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1600000000.0) {
tmp = (y / -3.0) / z;
} else if (y <= 8.5e-114) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 4.5e+144) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1600000000.0: tmp = (y / -3.0) / z elif y <= 8.5e-114: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 4.5e+144: tmp = x else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1600000000.0) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 8.5e-114) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 4.5e+144) tmp = x; else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1600000000.0) tmp = (y / -3.0) / z; elseif (y <= 8.5e-114) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 4.5e+144) tmp = x; else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1600000000.0], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 8.5e-114], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+144], x, N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1600000000:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-114}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+144}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -1.6e9Initial program 98.3%
associate-*l*98.3%
*-commutative98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*l*98.3%
associate-+r-98.3%
associate-*l*98.3%
*-commutative98.3%
associate-/r*98.3%
div-inv98.2%
metadata-eval98.2%
div-inv98.0%
clear-num98.1%
Applied egg-rr98.1%
Taylor expanded in y around inf 68.3%
associate-*r/68.3%
*-commutative68.3%
metadata-eval68.3%
distribute-rgt-neg-in68.3%
distribute-lft-neg-in68.3%
associate-*r/68.2%
distribute-lft-neg-out68.2%
distribute-rgt-neg-in68.2%
distribute-neg-frac68.2%
metadata-eval68.2%
Simplified68.2%
associate-*r/68.3%
associate-/l*68.3%
div-inv68.4%
metadata-eval68.4%
*-commutative68.4%
associate-/r*68.4%
Applied egg-rr68.4%
if -1.6e9 < y < 8.5000000000000006e-114Initial program 91.3%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
+-commutative91.3%
*-commutative91.3%
associate-*l*91.3%
associate-+r-91.3%
associate-*l*91.3%
*-commutative91.3%
associate-/r*97.0%
div-inv97.0%
metadata-eval97.0%
div-inv97.0%
clear-num97.0%
Applied egg-rr97.0%
Taylor expanded in z around 0 66.7%
div-sub66.7%
*-commutative66.7%
associate-*l/66.7%
fma-neg66.7%
fma-def66.7%
distribute-neg-frac66.7%
distribute-lft-neg-in66.7%
associate-*r/66.7%
*-commutative66.7%
distribute-lft-out66.7%
sub-neg66.7%
Simplified66.7%
Taylor expanded in t around inf 67.6%
if 8.5000000000000006e-114 < y < 4.49999999999999967e144Initial program 97.5%
Simplified99.8%
Taylor expanded in x around inf 54.9%
if 4.49999999999999967e144 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.4%
div-inv91.4%
metadata-eval91.4%
div-inv91.4%
clear-num91.3%
Applied egg-rr91.3%
Taylor expanded in y around inf 81.1%
associate-*r/81.1%
*-commutative81.1%
metadata-eval81.1%
distribute-rgt-neg-in81.1%
distribute-lft-neg-in81.1%
associate-*r/81.1%
distribute-lft-neg-out81.1%
distribute-rgt-neg-in81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
associate-*r/81.1%
associate-/l*81.2%
div-inv81.2%
metadata-eval81.2%
associate-/r*81.2%
Applied egg-rr81.2%
Final simplification68.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -22500000000.0)
(/ (/ y -3.0) z)
(if (<= y 5.5e-106)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 5.8e+144) x (/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -22500000000.0) {
tmp = (y / -3.0) / z;
} else if (y <= 5.5e-106) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 5.8e+144) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-22500000000.0d0)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 5.5d-106) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 5.8d+144) then
tmp = x
else
tmp = (y / z) / (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -22500000000.0) {
tmp = (y / -3.0) / z;
} else if (y <= 5.5e-106) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 5.8e+144) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -22500000000.0: tmp = (y / -3.0) / z elif y <= 5.5e-106: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 5.8e+144: tmp = x else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -22500000000.0) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 5.5e-106) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 5.8e+144) tmp = x; else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -22500000000.0) tmp = (y / -3.0) / z; elseif (y <= 5.5e-106) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 5.8e+144) tmp = x; else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -22500000000.0], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 5.5e-106], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e+144], x, N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -22500000000:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-106}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+144}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -2.25e10Initial program 98.3%
associate-*l*98.3%
*-commutative98.3%
Simplified98.3%
+-commutative98.3%
*-commutative98.3%
associate-*l*98.3%
associate-+r-98.3%
associate-*l*98.3%
*-commutative98.3%
associate-/r*98.3%
div-inv98.2%
metadata-eval98.2%
div-inv98.0%
clear-num98.1%
Applied egg-rr98.1%
Taylor expanded in y around inf 68.3%
associate-*r/68.3%
*-commutative68.3%
metadata-eval68.3%
distribute-rgt-neg-in68.3%
distribute-lft-neg-in68.3%
associate-*r/68.2%
distribute-lft-neg-out68.2%
distribute-rgt-neg-in68.2%
distribute-neg-frac68.2%
metadata-eval68.2%
Simplified68.2%
associate-*r/68.3%
associate-/l*68.3%
div-inv68.4%
metadata-eval68.4%
*-commutative68.4%
associate-/r*68.4%
Applied egg-rr68.4%
if -2.25e10 < y < 5.5000000000000001e-106Initial program 90.5%
*-un-lft-identity90.5%
times-frac90.5%
Applied egg-rr90.5%
*-commutative90.5%
associate-*l/90.5%
div-inv90.5%
Applied egg-rr90.5%
Taylor expanded in y around 0 66.4%
*-commutative66.4%
associate-/r*70.8%
Simplified70.8%
if 5.5000000000000001e-106 < y < 5.79999999999999996e144Initial program 99.8%
Simplified99.8%
Taylor expanded in x around inf 57.4%
if 5.79999999999999996e144 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.4%
div-inv91.4%
metadata-eval91.4%
div-inv91.4%
clear-num91.3%
Applied egg-rr91.3%
Taylor expanded in y around inf 81.1%
associate-*r/81.1%
*-commutative81.1%
metadata-eval81.1%
distribute-rgt-neg-in81.1%
distribute-lft-neg-in81.1%
associate-*r/81.1%
distribute-lft-neg-out81.1%
distribute-rgt-neg-in81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
associate-*r/81.1%
associate-/l*81.2%
div-inv81.2%
metadata-eval81.2%
associate-/r*81.2%
Applied egg-rr81.2%
Final simplification70.0%
(FPCore (x y z t) :precision binary64 (if (<= y 7.5e-174) (- (+ (/ (/ t z) (* y 3.0)) x) (* y (/ 0.3333333333333333 z))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 7.5e-174) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 7.5d-174) then
tmp = (((t / z) / (y * 3.0d0)) + x) - (y * (0.3333333333333333d0 / z))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 7.5e-174) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 7.5e-174: tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 7.5e-174) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x) - Float64(y * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 7.5e-174) tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 7.5e-174], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{-174}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if y < 7.5000000000000003e-174Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
+-commutative96.1%
*-commutative96.1%
associate-*l*96.1%
associate-+r-96.1%
associate-*l*96.1%
*-commutative96.1%
associate-/r*97.9%
div-inv97.9%
metadata-eval97.9%
div-inv97.8%
clear-num97.8%
Applied egg-rr97.8%
if 7.5000000000000003e-174 < y Initial program 95.2%
associate-*l*95.2%
*-commutative95.2%
Simplified95.2%
*-commutative95.2%
associate-*l*95.2%
associate-+l-95.2%
*-commutative95.2%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -510000000000.0)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 2.7e+23)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -510000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.7e+23) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-510000000000.0d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 2.7d+23) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -510000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.7e+23) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -510000000000.0: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 2.7e+23: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -510000000000.0) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 2.7e+23) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -510000000000.0) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 2.7e+23) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -510000000000.0], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+23], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -510000000000:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.1e11Initial program 98.3%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.6%
if -5.1e11 < y < 2.6999999999999999e23Initial program 92.2%
Simplified90.6%
Taylor expanded in y around 0 88.4%
+-commutative88.4%
associate-*r/88.5%
associate-/r*86.2%
Simplified86.2%
associate-/l/88.5%
*-commutative88.5%
times-frac93.0%
Applied egg-rr93.0%
if 2.6999999999999999e23 < y Initial program 99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
*-commutative96.7%
associate-*l/96.7%
associate-*r/96.8%
Simplified96.8%
Final simplification94.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -50000000000.0)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 2.9e+22)
(+ (/ (/ t z) (* y 3.0)) x)
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -50000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.9e+22) {
tmp = ((t / z) / (y * 3.0)) + x;
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-50000000000.0d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 2.9d+22) then
tmp = ((t / z) / (y * 3.0d0)) + x
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -50000000000.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.9e+22) {
tmp = ((t / z) / (y * 3.0)) + x;
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -50000000000.0: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 2.9e+22: tmp = ((t / z) / (y * 3.0)) + x else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -50000000000.0) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 2.9e+22) tmp = Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -50000000000.0) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 2.9e+22) tmp = ((t / z) / (y * 3.0)) + x; else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -50000000000.0], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+22], N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -50000000000:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+22}:\\
\;\;\;\;\frac{\frac{t}{z}}{y \cdot 3} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5e10Initial program 98.3%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.6%
if -5e10 < y < 2.9e22Initial program 92.2%
Simplified90.6%
Taylor expanded in y around 0 88.4%
+-commutative88.4%
associate-*r/88.5%
associate-/r*86.2%
Simplified86.2%
associate-/l/88.5%
*-commutative88.5%
times-frac93.0%
Applied egg-rr93.0%
clear-num93.0%
un-div-inv93.0%
div-inv93.1%
metadata-eval93.1%
*-commutative93.1%
Applied egg-rr93.1%
if 2.9e22 < y Initial program 99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
*-commutative96.7%
associate-*l/96.7%
associate-*r/96.8%
Simplified96.8%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -14600.0) (not (<= y 3.2e-111))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -14600.0) || !(y <= 3.2e-111)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-14600.0d0)) .or. (.not. (y <= 3.2d-111))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -14600.0) || !(y <= 3.2e-111)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -14600.0) or not (y <= 3.2e-111): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -14600.0) || !(y <= 3.2e-111)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -14600.0) || ~((y <= 3.2e-111))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -14600.0], N[Not[LessEqual[y, 3.2e-111]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -14600 \lor \neg \left(y \leq 3.2 \cdot 10^{-111}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -14600 or 3.1999999999999998e-111 < y Initial program 98.6%
Simplified99.7%
Taylor expanded in t around 0 90.6%
*-commutative90.6%
associate-*l/90.6%
associate-*r/90.6%
Simplified90.6%
if -14600 < y < 3.1999999999999998e-111Initial program 91.3%
*-un-lft-identity91.3%
times-frac91.3%
Applied egg-rr91.3%
*-commutative91.3%
associate-*l/91.3%
div-inv91.3%
Applied egg-rr91.3%
Taylor expanded in y around 0 67.6%
*-commutative67.6%
associate-/r*72.1%
Simplified72.1%
Final simplification83.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -14600.0)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 7e-120)
(* 0.3333333333333333 (/ (/ t z) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -14600.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 7e-120) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-14600.0d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 7d-120) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -14600.0) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 7e-120) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -14600.0: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 7e-120: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -14600.0) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 7e-120) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -14600.0) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 7e-120) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -14600.0], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-120], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -14600:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-120}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -14600Initial program 98.3%
associate-*l*98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in t around 0 95.6%
if -14600 < y < 7e-120Initial program 91.3%
*-un-lft-identity91.3%
times-frac91.3%
Applied egg-rr91.3%
*-commutative91.3%
associate-*l/91.3%
div-inv91.3%
Applied egg-rr91.3%
Taylor expanded in y around 0 67.6%
*-commutative67.6%
associate-/r*72.1%
Simplified72.1%
if 7e-120 < y Initial program 98.8%
Simplified99.8%
Taylor expanded in t around 0 86.7%
*-commutative86.7%
associate-*l/86.7%
associate-*r/86.8%
Simplified86.8%
Final simplification83.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.8e+43) (not (<= y 4.5e+144))) (* (/ y z) -0.3333333333333333) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e+43) || !(y <= 4.5e+144)) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.8d+43)) .or. (.not. (y <= 4.5d+144))) then
tmp = (y / z) * (-0.3333333333333333d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e+43) || !(y <= 4.5e+144)) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.8e+43) or not (y <= 4.5e+144): tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.8e+43) || !(y <= 4.5e+144)) tmp = Float64(Float64(y / z) * -0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.8e+43) || ~((y <= 4.5e+144))) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.8e+43], N[Not[LessEqual[y, 4.5e+144]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+43} \lor \neg \left(y \leq 4.5 \cdot 10^{+144}\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.80000000000000005e43 or 4.49999999999999967e144 < y Initial program 98.8%
associate-*l*98.8%
*-commutative98.8%
Simplified98.8%
+-commutative98.8%
*-commutative98.8%
associate-*l*98.8%
associate-+r-98.8%
associate-*l*98.8%
*-commutative98.8%
associate-/r*95.0%
div-inv94.9%
metadata-eval94.9%
div-inv94.8%
clear-num94.9%
Applied egg-rr94.9%
Taylor expanded in y around inf 77.2%
if -1.80000000000000005e43 < y < 4.49999999999999967e144Initial program 93.6%
Simplified92.3%
Taylor expanded in x around inf 35.8%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.7e+42) (not (<= y 1.7e+160))) (/ y (/ z -0.3333333333333333)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.7e+42) || !(y <= 1.7e+160)) {
tmp = y / (z / -0.3333333333333333);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9.7d+42)) .or. (.not. (y <= 1.7d+160))) then
tmp = y / (z / (-0.3333333333333333d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.7e+42) || !(y <= 1.7e+160)) {
tmp = y / (z / -0.3333333333333333);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.7e+42) or not (y <= 1.7e+160): tmp = y / (z / -0.3333333333333333) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.7e+42) || !(y <= 1.7e+160)) tmp = Float64(y / Float64(z / -0.3333333333333333)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.7e+42) || ~((y <= 1.7e+160))) tmp = y / (z / -0.3333333333333333); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.7e+42], N[Not[LessEqual[y, 1.7e+160]], $MachinePrecision]], N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.7 \cdot 10^{+42} \lor \neg \left(y \leq 1.7 \cdot 10^{+160}\right):\\
\;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.6999999999999999e42 or 1.70000000000000015e160 < y Initial program 98.8%
associate-*l*98.8%
*-commutative98.8%
Simplified98.8%
+-commutative98.8%
*-commutative98.8%
associate-*l*98.8%
associate-+r-98.8%
associate-*l*98.8%
*-commutative98.8%
associate-/r*94.9%
div-inv94.8%
metadata-eval94.8%
div-inv94.7%
clear-num94.8%
Applied egg-rr94.8%
Taylor expanded in y around inf 77.8%
associate-*r/77.8%
*-commutative77.8%
associate-/l*77.9%
Simplified77.9%
if -9.6999999999999999e42 < y < 1.70000000000000015e160Initial program 93.7%
Simplified92.4%
Taylor expanded in x around inf 35.9%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.1e+43) (* (/ y z) -0.3333333333333333) (if (<= y 1.7e+160) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+43) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 1.7e+160) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.1d+43)) then
tmp = (y / z) * (-0.3333333333333333d0)
else if (y <= 1.7d+160) then
tmp = x
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+43) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 1.7e+160) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+43: tmp = (y / z) * -0.3333333333333333 elif y <= 1.7e+160: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+43) tmp = Float64(Float64(y / z) * -0.3333333333333333); elseif (y <= 1.7e+160) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.1e+43) tmp = (y / z) * -0.3333333333333333; elseif (y <= 1.7e+160) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+43], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, 1.7e+160], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+43}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+160}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.1e43Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
+-commutative97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+r-97.9%
associate-*l*97.9%
*-commutative97.9%
associate-/r*97.9%
div-inv97.8%
metadata-eval97.8%
div-inv97.7%
clear-num97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 74.1%
if -1.1e43 < y < 1.70000000000000015e160Initial program 93.7%
Simplified92.4%
Taylor expanded in x around inf 35.9%
if 1.70000000000000015e160 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.0%
div-inv91.0%
metadata-eval91.0%
div-inv91.0%
clear-num90.9%
Applied egg-rr90.9%
Taylor expanded in y around inf 82.4%
associate-*r/82.5%
*-commutative82.5%
metadata-eval82.5%
distribute-rgt-neg-in82.5%
distribute-lft-neg-in82.5%
associate-*r/82.5%
distribute-lft-neg-out82.5%
distribute-rgt-neg-in82.5%
distribute-neg-frac82.5%
metadata-eval82.5%
Simplified82.5%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.8e+43) (/ (* y -0.3333333333333333) z) (if (<= y 1.7e+160) x (/ y (/ z -0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e+43) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 1.7e+160) {
tmp = x;
} else {
tmp = y / (z / -0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.8d+43)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 1.7d+160) then
tmp = x
else
tmp = y / (z / (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e+43) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 1.7e+160) {
tmp = x;
} else {
tmp = y / (z / -0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.8e+43: tmp = (y * -0.3333333333333333) / z elif y <= 1.7e+160: tmp = x else: tmp = y / (z / -0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.8e+43) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 1.7e+160) tmp = x; else tmp = Float64(y / Float64(z / -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.8e+43) tmp = (y * -0.3333333333333333) / z; elseif (y <= 1.7e+160) tmp = x; else tmp = y / (z / -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.8e+43], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.7e+160], x, N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+43}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+160}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -1.80000000000000005e43Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in z around 0 76.5%
Taylor expanded in t around 0 74.1%
*-commutative74.1%
Simplified74.1%
if -1.80000000000000005e43 < y < 1.70000000000000015e160Initial program 93.7%
Simplified92.4%
Taylor expanded in x around inf 35.9%
if 1.70000000000000015e160 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.0%
div-inv91.0%
metadata-eval91.0%
div-inv91.0%
clear-num90.9%
Applied egg-rr90.9%
Taylor expanded in y around inf 82.4%
associate-*r/82.5%
*-commutative82.5%
associate-/l*82.6%
Simplified82.6%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (<= y -9.5e+42) (/ (/ y -3.0) z) (if (<= y 1.7e+160) x (/ y (/ z -0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e+42) {
tmp = (y / -3.0) / z;
} else if (y <= 1.7e+160) {
tmp = x;
} else {
tmp = y / (z / -0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.5d+42)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 1.7d+160) then
tmp = x
else
tmp = y / (z / (-0.3333333333333333d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e+42) {
tmp = (y / -3.0) / z;
} else if (y <= 1.7e+160) {
tmp = x;
} else {
tmp = y / (z / -0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.5e+42: tmp = (y / -3.0) / z elif y <= 1.7e+160: tmp = x else: tmp = y / (z / -0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.5e+42) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 1.7e+160) tmp = x; else tmp = Float64(y / Float64(z / -0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.5e+42) tmp = (y / -3.0) / z; elseif (y <= 1.7e+160) tmp = x; else tmp = y / (z / -0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.5e+42], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.7e+160], x, N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+160}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -9.50000000000000019e42Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
+-commutative97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+r-97.9%
associate-*l*97.9%
*-commutative97.9%
associate-/r*97.9%
div-inv97.8%
metadata-eval97.8%
div-inv97.7%
clear-num97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 74.1%
associate-*r/74.1%
*-commutative74.1%
metadata-eval74.1%
distribute-rgt-neg-in74.1%
distribute-lft-neg-in74.1%
associate-*r/74.1%
distribute-lft-neg-out74.1%
distribute-rgt-neg-in74.1%
distribute-neg-frac74.1%
metadata-eval74.1%
Simplified74.1%
associate-*r/74.1%
associate-/l*74.1%
div-inv74.2%
metadata-eval74.2%
*-commutative74.2%
associate-/r*74.2%
Applied egg-rr74.2%
if -9.50000000000000019e42 < y < 1.70000000000000015e160Initial program 93.7%
Simplified92.4%
Taylor expanded in x around inf 35.9%
if 1.70000000000000015e160 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.0%
div-inv91.0%
metadata-eval91.0%
div-inv91.0%
clear-num90.9%
Applied egg-rr90.9%
Taylor expanded in y around inf 82.4%
associate-*r/82.5%
*-commutative82.5%
associate-/l*82.6%
Simplified82.6%
Final simplification52.7%
(FPCore (x y z t) :precision binary64 (if (<= y -1.75e+43) (/ (/ y -3.0) z) (if (<= y 4.5e+144) x (/ (/ y z) -3.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.75e+43) {
tmp = (y / -3.0) / z;
} else if (y <= 4.5e+144) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.75d+43)) then
tmp = (y / (-3.0d0)) / z
else if (y <= 4.5d+144) then
tmp = x
else
tmp = (y / z) / (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.75e+43) {
tmp = (y / -3.0) / z;
} else if (y <= 4.5e+144) {
tmp = x;
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.75e+43: tmp = (y / -3.0) / z elif y <= 4.5e+144: tmp = x else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.75e+43) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= 4.5e+144) tmp = x; else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.75e+43) tmp = (y / -3.0) / z; elseif (y <= 4.5e+144) tmp = x; else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.75e+43], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 4.5e+144], x, N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+43}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+144}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -1.7500000000000001e43Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
+-commutative97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+r-97.9%
associate-*l*97.9%
*-commutative97.9%
associate-/r*97.9%
div-inv97.8%
metadata-eval97.8%
div-inv97.7%
clear-num97.8%
Applied egg-rr97.8%
Taylor expanded in y around inf 74.1%
associate-*r/74.1%
*-commutative74.1%
metadata-eval74.1%
distribute-rgt-neg-in74.1%
distribute-lft-neg-in74.1%
associate-*r/74.1%
distribute-lft-neg-out74.1%
distribute-rgt-neg-in74.1%
distribute-neg-frac74.1%
metadata-eval74.1%
Simplified74.1%
associate-*r/74.1%
associate-/l*74.1%
div-inv74.2%
metadata-eval74.2%
*-commutative74.2%
associate-/r*74.2%
Applied egg-rr74.2%
if -1.7500000000000001e43 < y < 4.49999999999999967e144Initial program 93.6%
Simplified92.3%
Taylor expanded in x around inf 35.8%
if 4.49999999999999967e144 < y Initial program 99.9%
associate-*l*99.9%
*-commutative99.9%
Simplified99.9%
+-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
associate-+r-99.9%
associate-*l*99.9%
*-commutative99.9%
associate-/r*91.4%
div-inv91.4%
metadata-eval91.4%
div-inv91.4%
clear-num91.3%
Applied egg-rr91.3%
Taylor expanded in y around inf 81.1%
associate-*r/81.1%
*-commutative81.1%
metadata-eval81.1%
distribute-rgt-neg-in81.1%
distribute-lft-neg-in81.1%
associate-*r/81.1%
distribute-lft-neg-out81.1%
distribute-rgt-neg-in81.1%
distribute-neg-frac81.1%
metadata-eval81.1%
Simplified81.1%
associate-*r/81.1%
associate-/l*81.2%
div-inv81.2%
metadata-eval81.2%
associate-/r*81.2%
Applied egg-rr81.2%
Final simplification52.7%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((0.3333333333333333d0 / z) * ((t / y) - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
def code(x, y, z, t): return x + ((0.3333333333333333 / z) * ((t / y) - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)
\end{array}
Initial program 95.7%
Simplified95.3%
Final simplification95.3%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 95.7%
associate-*l*95.7%
*-commutative95.7%
Simplified95.7%
*-commutative95.7%
associate-*l*95.7%
associate-+l-95.7%
*-commutative95.7%
associate-/r*95.0%
sub-div95.4%
Applied egg-rr95.4%
Final simplification95.4%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.7%
Simplified95.3%
Taylor expanded in x around inf 30.1%
Final simplification30.1%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024011
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))