
(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 17 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 (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
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) * (y - (t / y))) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
def code(x, y, z, t): return x + ((-0.3333333333333333 * (y - (t / y))) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}
\end{array}
Initial program 94.9%
Simplified97.6%
associate-*l/97.7%
Applied egg-rr97.7%
Final simplification97.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* -0.3333333333333333 y) z)))
(if (<= y -3.4e+202)
(* -0.3333333333333333 (/ y z))
(if (<= y -9e+106)
x
(if (<= y -210.0)
t_1
(if (<= y -2.4e-111)
x
(if (<= y 3.9e-30)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 5.2e+134) x t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = (-0.3333333333333333 * y) / z;
double tmp;
if (y <= -3.4e+202) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= -9e+106) {
tmp = x;
} else if (y <= -210.0) {
tmp = t_1;
} else if (y <= -2.4e-111) {
tmp = x;
} else if (y <= 3.9e-30) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 5.2e+134) {
tmp = x;
} else {
tmp = t_1;
}
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 = ((-0.3333333333333333d0) * y) / z
if (y <= (-3.4d+202)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= (-9d+106)) then
tmp = x
else if (y <= (-210.0d0)) then
tmp = t_1
else if (y <= (-2.4d-111)) then
tmp = x
else if (y <= 3.9d-30) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 5.2d+134) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (-0.3333333333333333 * y) / z;
double tmp;
if (y <= -3.4e+202) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= -9e+106) {
tmp = x;
} else if (y <= -210.0) {
tmp = t_1;
} else if (y <= -2.4e-111) {
tmp = x;
} else if (y <= 3.9e-30) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 5.2e+134) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (-0.3333333333333333 * y) / z tmp = 0 if y <= -3.4e+202: tmp = -0.3333333333333333 * (y / z) elif y <= -9e+106: tmp = x elif y <= -210.0: tmp = t_1 elif y <= -2.4e-111: tmp = x elif y <= 3.9e-30: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 5.2e+134: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-0.3333333333333333 * y) / z) tmp = 0.0 if (y <= -3.4e+202) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= -9e+106) tmp = x; elseif (y <= -210.0) tmp = t_1; elseif (y <= -2.4e-111) tmp = x; elseif (y <= 3.9e-30) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 5.2e+134) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (-0.3333333333333333 * y) / z; tmp = 0.0; if (y <= -3.4e+202) tmp = -0.3333333333333333 * (y / z); elseif (y <= -9e+106) tmp = x; elseif (y <= -210.0) tmp = t_1; elseif (y <= -2.4e-111) tmp = x; elseif (y <= 3.9e-30) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 5.2e+134) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -3.4e+202], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9e+106], x, If[LessEqual[y, -210.0], t$95$1, If[LessEqual[y, -2.4e-111], x, If[LessEqual[y, 3.9e-30], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+134], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+202}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+106}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -210:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-111}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-30}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.4e202Initial program 99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.9%
metadata-eval99.9%
associate-/l/99.9%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in z around -inf 99.9%
mul-1-neg99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
unsub-neg99.9%
distribute-lft-out--99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 81.3%
if -3.4e202 < y < -8.9999999999999994e106 or -210 < y < -2.4000000000000001e-111 or 3.9000000000000003e-30 < y < 5.2000000000000003e134Initial program 99.8%
Simplified99.8%
Taylor expanded in x around inf 57.5%
if -8.9999999999999994e106 < y < -210 or 5.2000000000000003e134 < y Initial program 98.3%
sub-neg98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
metadata-eval98.2%
associate-/l/98.2%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in z around -inf 99.9%
mul-1-neg99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
unsub-neg99.9%
distribute-lft-out--99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 72.5%
associate-*r/72.7%
Applied egg-rr72.7%
if -2.4000000000000001e-111 < y < 3.9000000000000003e-30Initial program 87.1%
sub-neg87.1%
distribute-frac-neg87.1%
neg-mul-187.1%
*-commutative87.1%
times-frac87.1%
metadata-eval87.1%
associate-/l/93.6%
associate-/l/93.7%
Simplified93.7%
Taylor expanded in z around -inf 93.7%
mul-1-neg93.7%
metadata-eval93.7%
cancel-sign-sub-inv93.7%
unsub-neg93.7%
distribute-lft-out--93.7%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 68.5%
Final simplification67.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* -0.3333333333333333 y) z)))
(if (<= y -3.4e+202)
(* -0.3333333333333333 (/ y z))
(if (<= y -1e+108)
x
(if (<= y -210.0)
t_1
(if (<= y -1.25e-113)
x
(if (<= y 1.55e-28)
(* (/ t y) (/ 0.3333333333333333 z))
(if (<= y 5.2e+134) x t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = (-0.3333333333333333 * y) / z;
double tmp;
if (y <= -3.4e+202) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= -1e+108) {
tmp = x;
} else if (y <= -210.0) {
tmp = t_1;
} else if (y <= -1.25e-113) {
tmp = x;
} else if (y <= 1.55e-28) {
tmp = (t / y) * (0.3333333333333333 / z);
} else if (y <= 5.2e+134) {
tmp = x;
} else {
tmp = t_1;
}
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 = ((-0.3333333333333333d0) * y) / z
if (y <= (-3.4d+202)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= (-1d+108)) then
tmp = x
else if (y <= (-210.0d0)) then
tmp = t_1
else if (y <= (-1.25d-113)) then
tmp = x
else if (y <= 1.55d-28) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else if (y <= 5.2d+134) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (-0.3333333333333333 * y) / z;
double tmp;
if (y <= -3.4e+202) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= -1e+108) {
tmp = x;
} else if (y <= -210.0) {
tmp = t_1;
} else if (y <= -1.25e-113) {
tmp = x;
} else if (y <= 1.55e-28) {
tmp = (t / y) * (0.3333333333333333 / z);
} else if (y <= 5.2e+134) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (-0.3333333333333333 * y) / z tmp = 0 if y <= -3.4e+202: tmp = -0.3333333333333333 * (y / z) elif y <= -1e+108: tmp = x elif y <= -210.0: tmp = t_1 elif y <= -1.25e-113: tmp = x elif y <= 1.55e-28: tmp = (t / y) * (0.3333333333333333 / z) elif y <= 5.2e+134: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-0.3333333333333333 * y) / z) tmp = 0.0 if (y <= -3.4e+202) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= -1e+108) tmp = x; elseif (y <= -210.0) tmp = t_1; elseif (y <= -1.25e-113) tmp = x; elseif (y <= 1.55e-28) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); elseif (y <= 5.2e+134) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (-0.3333333333333333 * y) / z; tmp = 0.0; if (y <= -3.4e+202) tmp = -0.3333333333333333 * (y / z); elseif (y <= -1e+108) tmp = x; elseif (y <= -210.0) tmp = t_1; elseif (y <= -1.25e-113) tmp = x; elseif (y <= 1.55e-28) tmp = (t / y) * (0.3333333333333333 / z); elseif (y <= 5.2e+134) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -3.4e+202], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1e+108], x, If[LessEqual[y, -210.0], t$95$1, If[LessEqual[y, -1.25e-113], x, If[LessEqual[y, 1.55e-28], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+134], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+202}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -1 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -210:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-113}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-28}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+134}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.4e202Initial program 99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.9%
metadata-eval99.9%
associate-/l/99.9%
associate-/l/99.9%
Simplified99.9%
Taylor expanded in z around -inf 99.9%
mul-1-neg99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
unsub-neg99.9%
distribute-lft-out--99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 81.3%
if -3.4e202 < y < -1e108 or -210 < y < -1.2499999999999999e-113 or 1.54999999999999996e-28 < y < 5.2000000000000003e134Initial program 99.8%
Simplified99.8%
Taylor expanded in x around inf 57.5%
if -1e108 < y < -210 or 5.2000000000000003e134 < y Initial program 98.3%
sub-neg98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
metadata-eval98.2%
associate-/l/98.2%
associate-/l/98.3%
Simplified98.3%
Taylor expanded in z around -inf 99.9%
mul-1-neg99.9%
metadata-eval99.9%
cancel-sign-sub-inv99.9%
unsub-neg99.9%
distribute-lft-out--99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around inf 72.5%
associate-*r/72.7%
Applied egg-rr72.7%
if -1.2499999999999999e-113 < y < 1.54999999999999996e-28Initial program 87.1%
sub-neg87.1%
distribute-frac-neg87.1%
neg-mul-187.1%
*-commutative87.1%
times-frac87.1%
metadata-eval87.1%
associate-/l/93.6%
associate-/l/93.7%
Simplified93.7%
Taylor expanded in z around -inf 93.7%
mul-1-neg93.7%
metadata-eval93.7%
cancel-sign-sub-inv93.7%
unsub-neg93.7%
distribute-lft-out--93.7%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 68.5%
associate-*r/68.5%
*-commutative68.5%
times-frac72.9%
Simplified72.9%
Final simplification69.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -14600.0) (not (<= y 3.5e-15))) (- x (/ (* y 0.3333333333333333) z)) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -14600.0) || !(y <= 3.5e-15)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x + ((t / 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)) .or. (.not. (y <= 3.5d-15))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = x + ((t / 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) || !(y <= 3.5e-15)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -14600.0) or not (y <= 3.5e-15): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -14600.0) || !(y <= 3.5e-15)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -14600.0) || ~((y <= 3.5e-15))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -14600.0], N[Not[LessEqual[y, 3.5e-15]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -14600 \lor \neg \left(y \leq 3.5 \cdot 10^{-15}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -14600 or 3.5000000000000001e-15 < y Initial program 99.1%
Taylor expanded in t around 0 93.6%
associate-*r/93.7%
Applied egg-rr93.7%
if -14600 < y < 3.5000000000000001e-15Initial program 90.2%
Simplified95.1%
Taylor expanded in y around 0 85.2%
associate-/r*90.2%
associate-*r/90.2%
*-commutative90.2%
*-rgt-identity90.2%
associate-*r/90.1%
associate-*l*90.1%
associate-*r/90.1%
metadata-eval90.1%
Simplified90.1%
Final simplification92.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -22500.0) (not (<= y 1e-15))) (- x (/ (* y 0.3333333333333333) z)) (+ x (/ (* (/ t y) 0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -22500.0) || !(y <= 1e-15)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x + (((t / 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 <= (-22500.0d0)) .or. (.not. (y <= 1d-15))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = x + (((t / 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 <= -22500.0) || !(y <= 1e-15)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x + (((t / y) * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -22500.0) or not (y <= 1e-15): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = x + (((t / y) * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -22500.0) || !(y <= 1e-15)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(x + Float64(Float64(Float64(t / y) * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -22500.0) || ~((y <= 1e-15))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = x + (((t / y) * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -22500.0], N[Not[LessEqual[y, 1e-15]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -22500 \lor \neg \left(y \leq 10^{-15}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -22500 or 1.0000000000000001e-15 < y Initial program 99.1%
Taylor expanded in t around 0 93.6%
associate-*r/93.7%
Applied egg-rr93.7%
if -22500 < y < 1.0000000000000001e-15Initial program 90.2%
Simplified95.1%
associate-*l/95.2%
Applied egg-rr95.2%
Taylor expanded in y around 0 90.2%
Final simplification92.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9500.0) (not (<= y 1.4e-14))) (- x (/ (* y 0.3333333333333333) z)) (- x (/ -0.3333333333333333 (* z (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9500.0) || !(y <= 1.4e-14)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x - (-0.3333333333333333 / (z * (y / t)));
}
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 <= (-9500.0d0)) .or. (.not. (y <= 1.4d-14))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = x - ((-0.3333333333333333d0) / (z * (y / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9500.0) || !(y <= 1.4e-14)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = x - (-0.3333333333333333 / (z * (y / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9500.0) or not (y <= 1.4e-14): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = x - (-0.3333333333333333 / (z * (y / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9500.0) || !(y <= 1.4e-14)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(x - Float64(-0.3333333333333333 / Float64(z * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9500.0) || ~((y <= 1.4e-14))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = x - (-0.3333333333333333 / (z * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9500.0], N[Not[LessEqual[y, 1.4e-14]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(-0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9500 \lor \neg \left(y \leq 1.4 \cdot 10^{-14}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{-0.3333333333333333}{z \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -9500 or 1.4e-14 < y Initial program 99.1%
Taylor expanded in t around 0 93.6%
associate-*r/93.7%
Applied egg-rr93.7%
if -9500 < y < 1.4e-14Initial program 90.2%
associate-+l-90.2%
*-commutative90.2%
associate-/r*95.1%
sub-div95.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 85.2%
associate-*r/85.2%
associate-/l*85.2%
associate-*l/91.1%
*-commutative91.1%
Simplified91.1%
Final simplification92.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.7e-111) (not (<= y 1.7e-37))) (+ x (/ -0.3333333333333333 (/ z y))) (* (/ t y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e-111) || !(y <= 1.7e-37)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = (t / 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 <= (-2.7d-111)) .or. (.not. (y <= 1.7d-37))) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else
tmp = (t / 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 <= -2.7e-111) || !(y <= 1.7e-37)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = (t / y) * (0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.7e-111) or not (y <= 1.7e-37): tmp = x + (-0.3333333333333333 / (z / y)) else: tmp = (t / y) * (0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.7e-111) || !(y <= 1.7e-37)) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); else tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.7e-111) || ~((y <= 1.7e-37))) tmp = x + (-0.3333333333333333 / (z / y)); else tmp = (t / y) * (0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.7e-111], N[Not[LessEqual[y, 1.7e-37]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-111} \lor \neg \left(y \leq 1.7 \cdot 10^{-37}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.69999999999999989e-111 or 1.70000000000000009e-37 < y Initial program 99.2%
Taylor expanded in t around 0 88.7%
associate-*r/88.8%
Applied egg-rr88.8%
sub-neg88.8%
associate-/l*88.7%
distribute-neg-frac88.7%
metadata-eval88.7%
Applied egg-rr88.7%
if -2.69999999999999989e-111 < y < 1.70000000000000009e-37Initial program 86.9%
sub-neg86.9%
distribute-frac-neg86.9%
neg-mul-186.9%
*-commutative86.9%
times-frac86.9%
metadata-eval86.9%
associate-/l/93.5%
associate-/l/93.6%
Simplified93.6%
Taylor expanded in z around -inf 93.6%
mul-1-neg93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
unsub-neg93.6%
distribute-lft-out--93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 69.3%
associate-*r/69.2%
*-commutative69.2%
times-frac73.7%
Simplified73.7%
Final simplification83.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.8e-115) (not (<= y 1.8e-33))) (+ x (/ y (/ z -0.3333333333333333))) (* (/ t y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.8e-115) || !(y <= 1.8e-33)) {
tmp = x + (y / (z / -0.3333333333333333));
} else {
tmp = (t / 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 <= (-5.8d-115)) .or. (.not. (y <= 1.8d-33))) then
tmp = x + (y / (z / (-0.3333333333333333d0)))
else
tmp = (t / 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 <= -5.8e-115) || !(y <= 1.8e-33)) {
tmp = x + (y / (z / -0.3333333333333333));
} else {
tmp = (t / y) * (0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.8e-115) or not (y <= 1.8e-33): tmp = x + (y / (z / -0.3333333333333333)) else: tmp = (t / y) * (0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.8e-115) || !(y <= 1.8e-33)) tmp = Float64(x + Float64(y / Float64(z / -0.3333333333333333))); else tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.8e-115) || ~((y <= 1.8e-33))) tmp = x + (y / (z / -0.3333333333333333)); else tmp = (t / y) * (0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.8e-115], N[Not[LessEqual[y, 1.8e-33]], $MachinePrecision]], N[(x + N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-115} \lor \neg \left(y \leq 1.8 \cdot 10^{-33}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.7999999999999996e-115 or 1.80000000000000017e-33 < y Initial program 99.2%
Simplified99.8%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.7%
associate-*r/88.8%
*-commutative88.8%
associate-/l*88.7%
Simplified88.7%
if -5.7999999999999996e-115 < y < 1.80000000000000017e-33Initial program 86.9%
sub-neg86.9%
distribute-frac-neg86.9%
neg-mul-186.9%
*-commutative86.9%
times-frac86.9%
metadata-eval86.9%
associate-/l/93.5%
associate-/l/93.6%
Simplified93.6%
Taylor expanded in z around -inf 93.6%
mul-1-neg93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
unsub-neg93.6%
distribute-lft-out--93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 69.3%
associate-*r/69.2%
*-commutative69.2%
times-frac73.7%
Simplified73.7%
Final simplification83.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2e-112) (not (<= y 2.7e-34))) (- x (* y (/ 0.3333333333333333 z))) (* (/ t y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-112) || !(y <= 2.7e-34)) {
tmp = x - (y * (0.3333333333333333 / z));
} else {
tmp = (t / 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 <= (-2d-112)) .or. (.not. (y <= 2.7d-34))) then
tmp = x - (y * (0.3333333333333333d0 / z))
else
tmp = (t / 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 <= -2e-112) || !(y <= 2.7e-34)) {
tmp = x - (y * (0.3333333333333333 / z));
} else {
tmp = (t / y) * (0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2e-112) or not (y <= 2.7e-34): tmp = x - (y * (0.3333333333333333 / z)) else: tmp = (t / y) * (0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2e-112) || !(y <= 2.7e-34)) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); else tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2e-112) || ~((y <= 2.7e-34))) tmp = x - (y * (0.3333333333333333 / z)); else tmp = (t / y) * (0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2e-112], N[Not[LessEqual[y, 2.7e-34]], $MachinePrecision]], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-112} \lor \neg \left(y \leq 2.7 \cdot 10^{-34}\right):\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.9999999999999999e-112 or 2.70000000000000017e-34 < y Initial program 99.2%
associate-+l-99.2%
*-commutative99.2%
associate-/r*99.2%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 88.7%
associate-*r/88.8%
associate-/l*88.7%
associate-/r/88.8%
Simplified88.8%
if -1.9999999999999999e-112 < y < 2.70000000000000017e-34Initial program 86.9%
sub-neg86.9%
distribute-frac-neg86.9%
neg-mul-186.9%
*-commutative86.9%
times-frac86.9%
metadata-eval86.9%
associate-/l/93.5%
associate-/l/93.6%
Simplified93.6%
Taylor expanded in z around -inf 93.6%
mul-1-neg93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
unsub-neg93.6%
distribute-lft-out--93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 69.3%
associate-*r/69.2%
*-commutative69.2%
times-frac73.7%
Simplified73.7%
Final simplification83.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4e-113) (not (<= y 3.5e-37))) (- x (/ (* y 0.3333333333333333) z)) (* (/ t y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-113) || !(y <= 3.5e-37)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = (t / 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 <= (-4d-113)) .or. (.not. (y <= 3.5d-37))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = (t / 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 <= -4e-113) || !(y <= 3.5e-37)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = (t / y) * (0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e-113) or not (y <= 3.5e-37): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = (t / y) * (0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e-113) || !(y <= 3.5e-37)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4e-113) || ~((y <= 3.5e-37))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = (t / y) * (0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e-113], N[Not[LessEqual[y, 3.5e-37]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-113} \lor \neg \left(y \leq 3.5 \cdot 10^{-37}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.99999999999999991e-113 or 3.5000000000000001e-37 < y Initial program 99.2%
Taylor expanded in t around 0 88.7%
associate-*r/88.8%
Applied egg-rr88.8%
if -3.99999999999999991e-113 < y < 3.5000000000000001e-37Initial program 86.9%
sub-neg86.9%
distribute-frac-neg86.9%
neg-mul-186.9%
*-commutative86.9%
times-frac86.9%
metadata-eval86.9%
associate-/l/93.5%
associate-/l/93.6%
Simplified93.6%
Taylor expanded in z around -inf 93.6%
mul-1-neg93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
unsub-neg93.6%
distribute-lft-out--93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 69.3%
associate-*r/69.2%
*-commutative69.2%
times-frac73.7%
Simplified73.7%
Final simplification83.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.9e-112) (not (<= y 8.5e-39))) (- x (/ (* y 0.3333333333333333) z)) (/ 0.3333333333333333 (* z (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-112) || !(y <= 8.5e-39)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = 0.3333333333333333 / (z * (y / t));
}
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.9d-112)) .or. (.not. (y <= 8.5d-39))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = 0.3333333333333333d0 / (z * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-112) || !(y <= 8.5e-39)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = 0.3333333333333333 / (z * (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.9e-112) or not (y <= 8.5e-39): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = 0.3333333333333333 / (z * (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.9e-112) || !(y <= 8.5e-39)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(0.3333333333333333 / Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.9e-112) || ~((y <= 8.5e-39))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = 0.3333333333333333 / (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.9e-112], N[Not[LessEqual[y, 8.5e-39]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-112} \lor \neg \left(y \leq 8.5 \cdot 10^{-39}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -1.89999999999999997e-112 or 8.5000000000000005e-39 < y Initial program 99.2%
Taylor expanded in t around 0 88.7%
associate-*r/88.8%
Applied egg-rr88.8%
if -1.89999999999999997e-112 < y < 8.5000000000000005e-39Initial program 86.9%
sub-neg86.9%
distribute-frac-neg86.9%
neg-mul-186.9%
*-commutative86.9%
times-frac86.9%
metadata-eval86.9%
associate-/l/93.5%
associate-/l/93.6%
Simplified93.6%
Taylor expanded in z around -inf 93.6%
mul-1-neg93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
unsub-neg93.6%
distribute-lft-out--93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 69.3%
associate-*r/69.2%
*-commutative69.2%
times-frac73.7%
Simplified73.7%
clear-num73.7%
frac-times75.0%
metadata-eval75.0%
Applied egg-rr75.0%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.4e-111) (not (<= y 9.2e-39))) (- x (/ (* y 0.3333333333333333) z)) (/ (/ t z) (* y 3.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.4e-111) || !(y <= 9.2e-39)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = (t / z) / (y * 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 <= (-2.4d-111)) .or. (.not. (y <= 9.2d-39))) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else
tmp = (t / z) / (y * 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.4e-111) || !(y <= 9.2e-39)) {
tmp = x - ((y * 0.3333333333333333) / z);
} else {
tmp = (t / z) / (y * 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.4e-111) or not (y <= 9.2e-39): tmp = x - ((y * 0.3333333333333333) / z) else: tmp = (t / z) / (y * 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.4e-111) || !(y <= 9.2e-39)) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); else tmp = Float64(Float64(t / z) / Float64(y * 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.4e-111) || ~((y <= 9.2e-39))) tmp = x - ((y * 0.3333333333333333) / z); else tmp = (t / z) / (y * 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.4e-111], N[Not[LessEqual[y, 9.2e-39]], $MachinePrecision]], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-111} \lor \neg \left(y \leq 9.2 \cdot 10^{-39}\right):\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -2.4000000000000001e-111 or 9.20000000000000033e-39 < y Initial program 99.2%
Taylor expanded in t around 0 88.7%
associate-*r/88.8%
Applied egg-rr88.8%
if -2.4000000000000001e-111 < y < 9.20000000000000033e-39Initial program 86.9%
sub-neg86.9%
distribute-frac-neg86.9%
neg-mul-186.9%
*-commutative86.9%
times-frac86.9%
metadata-eval86.9%
associate-/l/93.5%
associate-/l/93.6%
Simplified93.6%
Taylor expanded in z around -inf 93.6%
mul-1-neg93.6%
metadata-eval93.6%
cancel-sign-sub-inv93.6%
unsub-neg93.6%
distribute-lft-out--93.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 69.3%
associate-*r/69.2%
*-commutative69.2%
times-frac73.7%
Simplified73.7%
*-commutative73.7%
clear-num73.7%
frac-times69.3%
*-un-lft-identity69.3%
div-inv69.3%
metadata-eval69.3%
associate-*r*69.4%
*-commutative69.4%
associate-/r*79.7%
Applied egg-rr79.7%
Final simplification85.6%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
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 - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 94.9%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t) :precision binary64 (if (<= z -8.5e-16) x (if (<= z 3.5e+44) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.5e-16) {
tmp = x;
} else if (z <= 3.5e+44) {
tmp = -0.3333333333333333 * (y / z);
} 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 (z <= (-8.5d-16)) then
tmp = x
else if (z <= 3.5d+44) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.5e-16) {
tmp = x;
} else if (z <= 3.5e+44) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8.5e-16: tmp = x elif z <= 3.5e+44: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8.5e-16) tmp = x; elseif (z <= 3.5e+44) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -8.5e-16) tmp = x; elseif (z <= 3.5e+44) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.5e-16], x, If[LessEqual[z, 3.5e+44], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+44}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.5000000000000001e-16 or 3.4999999999999999e44 < z Initial program 99.5%
Simplified95.9%
Taylor expanded in x around inf 56.5%
if -8.5000000000000001e-16 < z < 3.4999999999999999e44Initial program 90.8%
sub-neg90.8%
distribute-frac-neg90.8%
neg-mul-190.8%
*-commutative90.8%
times-frac90.8%
metadata-eval90.8%
associate-/l/98.4%
associate-/l/98.5%
Simplified98.5%
Taylor expanded in z around -inf 99.2%
mul-1-neg99.2%
metadata-eval99.2%
cancel-sign-sub-inv99.2%
unsub-neg99.2%
distribute-lft-out--99.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in y around inf 45.9%
Final simplification50.8%
(FPCore (x y z t) :precision binary64 (if (<= z -1.55e-15) x (if (<= z 1.4e+44) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.55e-15) {
tmp = x;
} else if (z <= 1.4e+44) {
tmp = y * (-0.3333333333333333 / z);
} 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 (z <= (-1.55d-15)) then
tmp = x
else if (z <= 1.4d+44) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.55e-15) {
tmp = x;
} else if (z <= 1.4e+44) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.55e-15: tmp = x elif z <= 1.4e+44: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.55e-15) tmp = x; elseif (z <= 1.4e+44) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.55e-15) tmp = x; elseif (z <= 1.4e+44) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.55e-15], x, If[LessEqual[z, 1.4e+44], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+44}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.5499999999999999e-15 or 1.4e44 < z Initial program 99.5%
Simplified95.9%
Taylor expanded in x around inf 56.5%
if -1.5499999999999999e-15 < z < 1.4e44Initial program 90.8%
sub-neg90.8%
distribute-frac-neg90.8%
neg-mul-190.8%
*-commutative90.8%
times-frac90.8%
metadata-eval90.8%
associate-/l/98.4%
associate-/l/98.5%
Simplified98.5%
Taylor expanded in z around -inf 99.2%
mul-1-neg99.2%
metadata-eval99.2%
cancel-sign-sub-inv99.2%
unsub-neg99.2%
distribute-lft-out--99.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in y around inf 45.9%
*-commutative45.9%
associate-*l/45.9%
associate-*r/45.9%
Simplified45.9%
Final simplification50.8%
(FPCore (x y z t) :precision binary64 (if (<= z -1.65e-15) x (if (<= z 3.7e+43) (/ (* -0.3333333333333333 y) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.65e-15) {
tmp = x;
} else if (z <= 3.7e+43) {
tmp = (-0.3333333333333333 * y) / z;
} 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 (z <= (-1.65d-15)) then
tmp = x
else if (z <= 3.7d+43) then
tmp = ((-0.3333333333333333d0) * y) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.65e-15) {
tmp = x;
} else if (z <= 3.7e+43) {
tmp = (-0.3333333333333333 * y) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.65e-15: tmp = x elif z <= 3.7e+43: tmp = (-0.3333333333333333 * y) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.65e-15) tmp = x; elseif (z <= 3.7e+43) tmp = Float64(Float64(-0.3333333333333333 * y) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.65e-15) tmp = x; elseif (z <= 3.7e+43) tmp = (-0.3333333333333333 * y) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.65e-15], x, If[LessEqual[z, 3.7e+43], N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+43}:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.65e-15 or 3.7000000000000001e43 < z Initial program 99.5%
Simplified95.9%
Taylor expanded in x around inf 56.5%
if -1.65e-15 < z < 3.7000000000000001e43Initial program 90.8%
sub-neg90.8%
distribute-frac-neg90.8%
neg-mul-190.8%
*-commutative90.8%
times-frac90.8%
metadata-eval90.8%
associate-/l/98.4%
associate-/l/98.5%
Simplified98.5%
Taylor expanded in z around -inf 99.2%
mul-1-neg99.2%
metadata-eval99.2%
cancel-sign-sub-inv99.2%
unsub-neg99.2%
distribute-lft-out--99.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in y around inf 45.9%
associate-*r/45.9%
Applied egg-rr45.9%
Final simplification50.9%
(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 94.9%
Simplified97.6%
Taylor expanded in x around inf 31.5%
Final simplification31.5%
(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 2023293
(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))))