
(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 16 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
(if (<= y -1.5e-188)
(+ x (* (/ -0.3333333333333333 z) (+ y (/ -1.0 (/ y t)))))
(if (<= y 1.1e-64)
(/ (+ (* 0.3333333333333333 (/ t z)) (* x y)) y)
(+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.5e-188) {
tmp = x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t))));
} else if (y <= 1.1e-64) {
tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y;
} else {
tmp = x + ((y - (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 <= (-1.5d-188)) then
tmp = x + (((-0.3333333333333333d0) / z) * (y + ((-1.0d0) / (y / t))))
else if (y <= 1.1d-64) then
tmp = ((0.3333333333333333d0 * (t / z)) + (x * y)) / y
else
tmp = x + ((y - (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 <= -1.5e-188) {
tmp = x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t))));
} else if (y <= 1.1e-64) {
tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y;
} else {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.5e-188: tmp = x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t)))) elif y <= 1.1e-64: tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y else: tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.5e-188) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y + Float64(-1.0 / Float64(y / t))))); elseif (y <= 1.1e-64) tmp = Float64(Float64(Float64(0.3333333333333333 * Float64(t / z)) + Float64(x * y)) / y); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.5e-188) tmp = x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t)))); elseif (y <= 1.1e-64) tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y; else tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.5e-188], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y + N[(-1.0 / N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e-64], N[(N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-188}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y + \frac{-1}{\frac{y}{t}}\right)\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-64}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z} + x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.50000000000000008e-188Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
sub-neg97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
neg-mul-197.6%
times-frac98.6%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -1.50000000000000008e-188 < y < 1.1e-64Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
sub-neg95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
neg-mul-195.4%
times-frac83.4%
distribute-lft-out--83.4%
*-commutative83.4%
associate-/r*83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in y around 0 98.6%
if 1.1e-64 < y Initial program 97.9%
sub-neg97.9%
associate-+l+97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
sub-neg97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.8%
*-commutative97.8%
neg-mul-197.8%
times-frac98.6%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0))))))
(if (<= t_1 4.75e+298)
t_1
(+ x (/ 1.0 (/ (/ z -0.3333333333333333) (- y (/ t y))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 4.75e+298) {
tmp = t_1;
} else {
tmp = x + (1.0 / ((z / -0.3333333333333333) / (y - (t / 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) :: t_1
real(8) :: tmp
t_1 = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
if (t_1 <= 4.75d+298) then
tmp = t_1
else
tmp = x + (1.0d0 / ((z / (-0.3333333333333333d0)) / (y - (t / y))))
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))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 4.75e+298) {
tmp = t_1;
} else {
tmp = x + (1.0 / ((z / -0.3333333333333333) / (y - (t / y))));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) tmp = 0 if t_1 <= 4.75e+298: tmp = t_1 else: tmp = x + (1.0 / ((z / -0.3333333333333333) / (y - (t / y)))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) tmp = 0.0 if (t_1 <= 4.75e+298) tmp = t_1; else tmp = Float64(x + Float64(1.0 / Float64(Float64(z / -0.3333333333333333) / Float64(y - Float64(t / y))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); tmp = 0.0; if (t_1 <= 4.75e+298) tmp = t_1; else tmp = x + (1.0 / ((z / -0.3333333333333333) / (y - (t / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 4.75e+298], t$95$1, N[(x + N[(1.0 / N[(N[(z / -0.3333333333333333), $MachinePrecision] / N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;t\_1 \leq 4.75 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{\frac{z}{-0.3333333333333333}}{y - \frac{t}{y}}}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < 4.74999999999999969e298Initial program 98.7%
if 4.74999999999999969e298 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 86.8%
sub-neg86.8%
associate-+l+86.8%
remove-double-neg86.8%
distribute-frac-neg86.8%
sub-neg86.8%
distribute-frac-neg86.8%
neg-mul-186.8%
*-commutative86.8%
associate-/l*86.8%
*-commutative86.8%
neg-mul-186.8%
times-frac94.5%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
associate-*l/99.9%
clear-num99.8%
Applied egg-rr99.8%
associate-/r*100.0%
Simplified100.0%
Final simplification98.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -4.2e+118)
t_1
(if (<= y -2.6e-142)
x
(if (<= y 1.32e-126)
(* (/ t z) (/ 0.3333333333333333 y))
(if (<= y 1.3e+117) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -4.2e+118) {
tmp = t_1;
} else if (y <= -2.6e-142) {
tmp = x;
} else if (y <= 1.32e-126) {
tmp = (t / z) * (0.3333333333333333 / y);
} else if (y <= 1.3e+117) {
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 = y / (z * (-3.0d0))
if (y <= (-4.2d+118)) then
tmp = t_1
else if (y <= (-2.6d-142)) then
tmp = x
else if (y <= 1.32d-126) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else if (y <= 1.3d+117) 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 = y / (z * -3.0);
double tmp;
if (y <= -4.2e+118) {
tmp = t_1;
} else if (y <= -2.6e-142) {
tmp = x;
} else if (y <= 1.32e-126) {
tmp = (t / z) * (0.3333333333333333 / y);
} else if (y <= 1.3e+117) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -4.2e+118: tmp = t_1 elif y <= -2.6e-142: tmp = x elif y <= 1.32e-126: tmp = (t / z) * (0.3333333333333333 / y) elif y <= 1.3e+117: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -4.2e+118) tmp = t_1; elseif (y <= -2.6e-142) tmp = x; elseif (y <= 1.32e-126) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); elseif (y <= 1.3e+117) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -4.2e+118) tmp = t_1; elseif (y <= -2.6e-142) tmp = x; elseif (y <= 1.32e-126) tmp = (t / z) * (0.3333333333333333 / y); elseif (y <= 1.3e+117) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+118], t$95$1, If[LessEqual[y, -2.6e-142], x, If[LessEqual[y, 1.32e-126], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+117], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.32 \cdot 10^{-126}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+117}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.2e118 or 1.3e117 < y Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
sub-neg98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.5%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.1%
Taylor expanded in x around 0 77.8%
Taylor expanded in y around 0 77.7%
metadata-eval77.7%
times-frac77.9%
*-un-lft-identity77.9%
*-commutative77.9%
Applied egg-rr77.9%
if -4.2e118 < y < -2.6e-142 or 1.31999999999999992e-126 < y < 1.3e117Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
sub-neg97.3%
distribute-frac-neg97.3%
neg-mul-197.3%
*-commutative97.3%
associate-/l*97.3%
*-commutative97.3%
neg-mul-197.3%
times-frac98.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 52.6%
if -2.6e-142 < y < 1.31999999999999992e-126Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
remove-double-neg94.8%
distribute-frac-neg94.8%
sub-neg94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
associate-/l*94.8%
*-commutative94.8%
neg-mul-194.8%
times-frac81.5%
distribute-lft-out--81.5%
*-commutative81.5%
associate-/r*81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in y around 0 94.8%
Taylor expanded in x around 0 74.5%
associate-*r/74.5%
*-commutative74.5%
*-commutative74.5%
times-frac76.7%
Simplified76.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -4.1e+118)
t_1
(if (<= y -1.4e-140)
x
(if (<= y 8.8e-138)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 9e+115) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -4.1e+118) {
tmp = t_1;
} else if (y <= -1.4e-140) {
tmp = x;
} else if (y <= 8.8e-138) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 9e+115) {
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 = y / (z * (-3.0d0))
if (y <= (-4.1d+118)) then
tmp = t_1
else if (y <= (-1.4d-140)) then
tmp = x
else if (y <= 8.8d-138) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 9d+115) 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 = y / (z * -3.0);
double tmp;
if (y <= -4.1e+118) {
tmp = t_1;
} else if (y <= -1.4e-140) {
tmp = x;
} else if (y <= 8.8e-138) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 9e+115) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -4.1e+118: tmp = t_1 elif y <= -1.4e-140: tmp = x elif y <= 8.8e-138: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 9e+115: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -4.1e+118) tmp = t_1; elseif (y <= -1.4e-140) tmp = x; elseif (y <= 8.8e-138) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 9e+115) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -4.1e+118) tmp = t_1; elseif (y <= -1.4e-140) tmp = x; elseif (y <= 8.8e-138) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 9e+115) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e+118], t$95$1, If[LessEqual[y, -1.4e-140], x, If[LessEqual[y, 8.8e-138], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+115], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-138}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+115}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.0999999999999997e118 or 8.99999999999999927e115 < y Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
sub-neg98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.5%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.1%
Taylor expanded in x around 0 77.8%
Taylor expanded in y around 0 77.7%
metadata-eval77.7%
times-frac77.9%
*-un-lft-identity77.9%
*-commutative77.9%
Applied egg-rr77.9%
if -4.0999999999999997e118 < y < -1.4000000000000001e-140 or 8.7999999999999995e-138 < y < 8.99999999999999927e115Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
sub-neg97.3%
distribute-frac-neg97.3%
neg-mul-197.3%
*-commutative97.3%
associate-/l*97.3%
*-commutative97.3%
neg-mul-197.3%
times-frac98.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 52.6%
if -1.4000000000000001e-140 < y < 8.7999999999999995e-138Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
remove-double-neg94.8%
distribute-frac-neg94.8%
sub-neg94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
associate-/l*94.8%
*-commutative94.8%
neg-mul-194.8%
times-frac81.5%
distribute-lft-out--81.5%
*-commutative81.5%
associate-/r*81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in y around 0 94.8%
Taylor expanded in x around 0 74.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9e-189) (not (<= y 1.45e-64))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (/ (+ (* 0.3333333333333333 (/ t z)) (* x y)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e-189) || !(y <= 1.45e-64)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / 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 <= (-9d-189)) .or. (.not. (y <= 1.45d-64))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = ((0.3333333333333333d0 * (t / z)) + (x * y)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e-189) || !(y <= 1.45e-64)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9e-189) or not (y <= 1.45e-64): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9e-189) || !(y <= 1.45e-64)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(Float64(0.3333333333333333 * Float64(t / z)) + Float64(x * y)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9e-189) || ~((y <= 1.45e-64))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = ((0.3333333333333333 * (t / z)) + (x * y)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9e-189], N[Not[LessEqual[y, 1.45e-64]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-189} \lor \neg \left(y \leq 1.45 \cdot 10^{-64}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z} + x \cdot y}{y}\\
\end{array}
\end{array}
if y < -8.9999999999999992e-189 or 1.4499999999999999e-64 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.7%
*-commutative97.7%
neg-mul-197.7%
times-frac98.6%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
if -8.9999999999999992e-189 < y < 1.4499999999999999e-64Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
sub-neg95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
neg-mul-195.4%
times-frac83.4%
distribute-lft-out--83.4%
*-commutative83.4%
associate-/r*83.5%
metadata-eval83.5%
Simplified83.5%
Taylor expanded in y around 0 98.6%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5e-190) (not (<= y 2.05e-64))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (* 0.3333333333333333 (* (/ t z) (/ 1.0 y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e-190) || !(y <= 2.05e-64)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / 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 <= (-5d-190)) .or. (.not. (y <= 2.05d-64))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + (0.3333333333333333d0 * ((t / z) * (1.0d0 / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e-190) || !(y <= 2.05e-64)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5e-190) or not (y <= 2.05e-64): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5e-190) || !(y <= 2.05e-64)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) * Float64(1.0 / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5e-190) || ~((y <= 2.05e-64))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5e-190], N[Not[LessEqual[y, 2.05e-64]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-190} \lor \neg \left(y \leq 2.05 \cdot 10^{-64}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \left(\frac{t}{z} \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if y < -5.00000000000000034e-190 or 2.05e-64 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.7%
*-commutative97.7%
neg-mul-197.7%
times-frac98.6%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
if -5.00000000000000034e-190 < y < 2.05e-64Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
remove-double-neg95.3%
distribute-frac-neg95.3%
sub-neg95.3%
distribute-frac-neg95.3%
neg-mul-195.3%
*-commutative95.3%
associate-/l*95.3%
*-commutative95.3%
neg-mul-195.3%
times-frac83.1%
distribute-lft-out--83.1%
*-commutative83.1%
associate-/r*83.1%
metadata-eval83.1%
Simplified83.1%
Taylor expanded in y around 0 95.2%
*-un-lft-identity95.2%
times-frac98.5%
Applied egg-rr98.5%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.3e+64) (not (<= y 1.75e+75))) (+ x (/ y (* z -3.0))) (+ x (* 0.3333333333333333 (* (/ t z) (/ 1.0 y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.3e+64) || !(y <= 1.75e+75)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / 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 <= (-4.3d+64)) .or. (.not. (y <= 1.75d+75))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (0.3333333333333333d0 * ((t / z) * (1.0d0 / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.3e+64) || !(y <= 1.75e+75)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.3e+64) or not (y <= 1.75e+75): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.3e+64) || !(y <= 1.75e+75)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) * Float64(1.0 / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.3e+64) || ~((y <= 1.75e+75))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 * ((t / z) * (1.0 / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.3e+64], N[Not[LessEqual[y, 1.75e+75]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+64} \lor \neg \left(y \leq 1.75 \cdot 10^{+75}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \left(\frac{t}{z} \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if y < -4.2999999999999998e64 or 1.7499999999999999e75 < y Initial program 98.2%
Taylor expanded in t around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
metadata-eval96.6%
times-frac96.7%
*-un-lft-identity96.7%
*-commutative96.7%
Applied egg-rr96.7%
if -4.2999999999999998e64 < y < 1.7499999999999999e75Initial program 96.2%
sub-neg96.2%
associate-+l+96.2%
remove-double-neg96.2%
distribute-frac-neg96.2%
sub-neg96.2%
distribute-frac-neg96.2%
neg-mul-196.2%
*-commutative96.2%
associate-/l*96.2%
*-commutative96.2%
neg-mul-196.2%
times-frac90.3%
distribute-lft-out--91.0%
*-commutative91.0%
associate-/r*91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in y around 0 90.7%
*-un-lft-identity90.7%
times-frac91.9%
Applied egg-rr91.9%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.7e+64) (not (<= y 1.3e+79))) (+ x (/ y (* z -3.0))) (+ x (/ (* t 0.3333333333333333) (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.7e+64) || !(y <= 1.3e+79)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t * 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 ((y <= (-3.7d+64)) .or. (.not. (y <= 1.3d+79))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + ((t * 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 ((y <= -3.7e+64) || !(y <= 1.3e+79)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t * 0.3333333333333333) / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.7e+64) or not (y <= 1.3e+79): tmp = x + (y / (z * -3.0)) else: tmp = x + ((t * 0.3333333333333333) / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.7e+64) || !(y <= 1.3e+79)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.7e+64) || ~((y <= 1.3e+79))) tmp = x + (y / (z * -3.0)); else tmp = x + ((t * 0.3333333333333333) / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.7e+64], N[Not[LessEqual[y, 1.3e+79]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+64} \lor \neg \left(y \leq 1.3 \cdot 10^{+79}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -3.69999999999999983e64 or 1.30000000000000007e79 < y Initial program 98.2%
Taylor expanded in t around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
metadata-eval96.6%
times-frac96.7%
*-un-lft-identity96.7%
*-commutative96.7%
Applied egg-rr96.7%
if -3.69999999999999983e64 < y < 1.30000000000000007e79Initial program 96.2%
sub-neg96.2%
associate-+l+96.2%
remove-double-neg96.2%
distribute-frac-neg96.2%
sub-neg96.2%
distribute-frac-neg96.2%
neg-mul-196.2%
*-commutative96.2%
associate-/l*96.2%
*-commutative96.2%
neg-mul-196.2%
times-frac90.3%
distribute-lft-out--91.0%
*-commutative91.0%
associate-/r*91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in y around 0 90.7%
associate-*r/90.7%
*-commutative90.7%
Applied egg-rr90.7%
Final simplification93.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.2e+62) (not (<= y 2.3e+75))) (+ x (/ y (* z -3.0))) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e+62) || !(y <= 2.3e+75)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (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 ((y <= (-4.2d+62)) .or. (.not. (y <= 2.3d+75))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.2e+62) || !(y <= 2.3e+75)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.2e+62) or not (y <= 2.3e+75): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.2e+62) || !(y <= 2.3e+75)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.2e+62) || ~((y <= 2.3e+75))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.2e+62], N[Not[LessEqual[y, 2.3e+75]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+62} \lor \neg \left(y \leq 2.3 \cdot 10^{+75}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -4.2e62 or 2.2999999999999999e75 < y Initial program 98.2%
Taylor expanded in t around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
metadata-eval96.6%
times-frac96.7%
*-un-lft-identity96.7%
*-commutative96.7%
Applied egg-rr96.7%
if -4.2e62 < y < 2.2999999999999999e75Initial program 96.2%
sub-neg96.2%
associate-+l+96.2%
remove-double-neg96.2%
distribute-frac-neg96.2%
sub-neg96.2%
distribute-frac-neg96.2%
neg-mul-196.2%
*-commutative96.2%
associate-/l*96.2%
*-commutative96.2%
neg-mul-196.2%
times-frac90.3%
distribute-lft-out--91.0%
*-commutative91.0%
associate-/r*91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in y around 0 90.7%
Final simplification93.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.5e-141) (not (<= y 1.35e-126))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (* (/ t z) (/ 1.0 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-141) || !(y <= 1.35e-126)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * ((t / z) * (1.0 / 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 <= (-4.5d-141)) .or. (.not. (y <= 1.35d-126))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 0.3333333333333333d0 * ((t / z) * (1.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-141) || !(y <= 1.35e-126)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * ((t / z) * (1.0 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.5e-141) or not (y <= 1.35e-126): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * ((t / z) * (1.0 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.5e-141) || !(y <= 1.35e-126)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) * Float64(1.0 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.5e-141) || ~((y <= 1.35e-126))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * ((t / z) * (1.0 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.5e-141], N[Not[LessEqual[y, 1.35e-126]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-141} \lor \neg \left(y \leq 1.35 \cdot 10^{-126}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \left(\frac{t}{z} \cdot \frac{1}{y}\right)\\
\end{array}
\end{array}
if y < -4.5e-141 or 1.34999999999999998e-126 < y Initial program 97.9%
Taylor expanded in t around 0 83.0%
cancel-sign-sub-inv83.0%
metadata-eval83.0%
metadata-eval83.0%
times-frac83.1%
*-un-lft-identity83.1%
*-commutative83.1%
Applied egg-rr83.1%
if -4.5e-141 < y < 1.34999999999999998e-126Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
remove-double-neg94.8%
distribute-frac-neg94.8%
sub-neg94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
associate-/l*94.8%
*-commutative94.8%
neg-mul-194.8%
times-frac81.5%
distribute-lft-out--81.5%
*-commutative81.5%
associate-/r*81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in y around 0 94.8%
Taylor expanded in x around 0 74.5%
*-un-lft-identity94.8%
times-frac98.3%
Applied egg-rr76.7%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= x -4.6e+40)
(+ x (/ y (* z -3.0)))
(if (<= x 9e+51)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
(- x (* y (/ 0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.6e+40) {
tmp = x + (y / (z * -3.0));
} else if (x <= 9e+51) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} 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 (x <= (-4.6d+40)) then
tmp = x + (y / (z * (-3.0d0)))
else if (x <= 9d+51) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
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 (x <= -4.6e+40) {
tmp = x + (y / (z * -3.0));
} else if (x <= 9e+51) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.6e+40: tmp = x + (y / (z * -3.0)) elif x <= 9e+51: tmp = 0.3333333333333333 * (((t / y) - y) / z) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.6e+40) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (x <= 9e+51) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); 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 (x <= -4.6e+40) tmp = x + (y / (z * -3.0)); elseif (x <= 9e+51) tmp = 0.3333333333333333 * (((t / y) - y) / z); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.6e+40], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+51], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+40}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+51}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if x < -4.59999999999999987e40Initial program 94.0%
Taylor expanded in t around 0 77.0%
cancel-sign-sub-inv77.0%
metadata-eval77.0%
metadata-eval77.0%
times-frac77.0%
*-un-lft-identity77.0%
*-commutative77.0%
Applied egg-rr77.0%
if -4.59999999999999987e40 < x < 8.9999999999999999e51Initial program 98.0%
+-commutative98.0%
associate-+r-98.0%
sub-neg98.0%
associate-*l*97.9%
*-commutative97.9%
distribute-frac-neg297.9%
distribute-rgt-neg-in97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in z around 0 84.7%
+-commutative84.7%
metadata-eval84.7%
cancel-sign-sub-inv84.7%
distribute-lft-out--84.7%
Simplified84.7%
associate-/l*84.8%
*-commutative84.8%
Applied egg-rr84.8%
if 8.9999999999999999e51 < x Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.1%
*-commutative98.1%
neg-mul-198.1%
times-frac94.6%
distribute-lft-out--94.6%
*-commutative94.6%
associate-/r*94.7%
metadata-eval94.7%
Simplified94.7%
Taylor expanded in t around 0 84.7%
associate-*r/84.7%
associate-*l/84.7%
*-commutative84.7%
cancel-sign-sub84.7%
distribute-lft-neg-out84.7%
distribute-rgt-neg-out84.7%
distribute-neg-frac84.7%
metadata-eval84.7%
Simplified84.7%
Final simplification82.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.45e-141) (not (<= y 6.5e-127))) (+ x (/ y (* z -3.0))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.45e-141) || !(y <= 6.5e-127)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (t / z) * (0.3333333333333333 / 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 <= (-1.45d-141)) .or. (.not. (y <= 6.5d-127))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.45e-141) || !(y <= 6.5e-127)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.45e-141) or not (y <= 6.5e-127): tmp = x + (y / (z * -3.0)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.45e-141) || !(y <= 6.5e-127)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.45e-141) || ~((y <= 6.5e-127))) tmp = x + (y / (z * -3.0)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.45e-141], N[Not[LessEqual[y, 6.5e-127]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{-141} \lor \neg \left(y \leq 6.5 \cdot 10^{-127}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -1.45e-141 or 6.49999999999999998e-127 < y Initial program 97.9%
Taylor expanded in t around 0 83.0%
cancel-sign-sub-inv83.0%
metadata-eval83.0%
metadata-eval83.0%
times-frac83.1%
*-un-lft-identity83.1%
*-commutative83.1%
Applied egg-rr83.1%
if -1.45e-141 < y < 6.49999999999999998e-127Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
remove-double-neg94.8%
distribute-frac-neg94.8%
sub-neg94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
associate-/l*94.8%
*-commutative94.8%
neg-mul-194.8%
times-frac81.5%
distribute-lft-out--81.5%
*-commutative81.5%
associate-/r*81.5%
metadata-eval81.5%
Simplified81.5%
Taylor expanded in y around 0 94.8%
Taylor expanded in x around 0 74.5%
associate-*r/74.5%
*-commutative74.5%
*-commutative74.5%
times-frac76.7%
Simplified76.7%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= x -1.42e+41) x (if (<= x 0.155) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.42e+41) {
tmp = x;
} else if (x <= 0.155) {
tmp = y / (z * -3.0);
} 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 (x <= (-1.42d+41)) then
tmp = x
else if (x <= 0.155d0) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.42e+41) {
tmp = x;
} else if (x <= 0.155) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.42e+41: tmp = x elif x <= 0.155: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.42e+41) tmp = x; elseif (x <= 0.155) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.42e+41) tmp = x; elseif (x <= 0.155) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.42e+41], x, If[LessEqual[x, 0.155], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.42 \cdot 10^{+41}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 0.155:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.42000000000000007e41 or 0.154999999999999999 < x Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
sub-neg96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
*-commutative96.3%
neg-mul-196.3%
times-frac94.2%
distribute-lft-out--95.0%
*-commutative95.0%
associate-/r*95.0%
metadata-eval95.0%
Simplified95.0%
Taylor expanded in x around inf 59.5%
if -1.42000000000000007e41 < x < 0.154999999999999999Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.6%
*-commutative97.6%
neg-mul-197.6%
times-frac92.9%
distribute-lft-out--93.7%
*-commutative93.7%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf 54.6%
Taylor expanded in x around 0 47.4%
Taylor expanded in y around 0 47.4%
metadata-eval47.4%
times-frac47.5%
*-un-lft-identity47.5%
*-commutative47.5%
Applied egg-rr47.5%
(FPCore (x y z t) :precision binary64 (if (<= x -5.2e+41) x (if (<= x 0.052) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5.2e+41) {
tmp = x;
} else if (x <= 0.052) {
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 (x <= (-5.2d+41)) then
tmp = x
else if (x <= 0.052d0) 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 (x <= -5.2e+41) {
tmp = x;
} else if (x <= 0.052) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -5.2e+41: tmp = x elif x <= 0.052: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -5.2e+41) tmp = x; elseif (x <= 0.052) 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 (x <= -5.2e+41) tmp = x; elseif (x <= 0.052) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -5.2e+41], x, If[LessEqual[x, 0.052], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+41}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 0.052:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.2000000000000001e41 or 0.0519999999999999976 < x Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
sub-neg96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
*-commutative96.3%
neg-mul-196.3%
times-frac94.2%
distribute-lft-out--95.0%
*-commutative95.0%
associate-/r*95.0%
metadata-eval95.0%
Simplified95.0%
Taylor expanded in x around inf 59.5%
if -5.2000000000000001e41 < x < 0.0519999999999999976Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.6%
*-commutative97.6%
neg-mul-197.6%
times-frac92.9%
distribute-lft-out--93.7%
*-commutative93.7%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf 54.6%
Taylor expanded in x around 0 47.4%
Taylor expanded in y around 0 47.4%
(FPCore (x y z t) :precision binary64 (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (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 / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
def code(x, y, z, t): return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0))
function code(x, y, z, t) return Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}
\end{array}
Initial program 97.0%
+-commutative97.0%
associate-+r-97.0%
sub-neg97.0%
associate-*l*97.0%
*-commutative97.0%
distribute-frac-neg297.0%
distribute-rgt-neg-in97.0%
metadata-eval97.0%
Simplified97.0%
Final simplification97.0%
(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 97.0%
sub-neg97.0%
associate-+l+97.0%
remove-double-neg97.0%
distribute-frac-neg97.0%
sub-neg97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac93.6%
distribute-lft-out--94.3%
*-commutative94.3%
associate-/r*94.4%
metadata-eval94.4%
Simplified94.4%
Taylor expanded in x around inf 34.6%
(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 2024185
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))