
(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 18 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 (<= (* z 3.0) 1e+67) (+ x (/ (- y (/ t y)) (* z -3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e+67) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.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 ((z * 3.0d0) <= 1d+67) then
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
else
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e+67) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 1e+67: tmp = x + ((y - (t / y)) / (z * -3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 1e+67) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 1e+67) tmp = x + ((y - (t / y)) / (z * -3.0)); else tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+67], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 10^{+67}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < 9.99999999999999983e66Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.1%
distribute-neg-frac94.1%
neg-mul-194.1%
times-frac98.7%
distribute-lft-out--98.7%
*-commutative98.7%
associate-/r*98.7%
metadata-eval98.7%
Simplified98.7%
*-commutative98.7%
clear-num98.6%
un-div-inv98.7%
div-inv98.9%
metadata-eval98.9%
Applied egg-rr98.9%
if 9.99999999999999983e66 < (*.f64 z 3) Initial program 99.8%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ y (* z -3.0)))))
(if (<= y -2.6e+38)
t_1
(if (<= y 1.3e-257)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(if (<= y 9.8e-56) (+ x (* 0.3333333333333333 (/ t (* z y)))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y / (z * -3.0));
double tmp;
if (y <= -2.6e+38) {
tmp = t_1;
} else if (y <= 1.3e-257) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= 9.8e-56) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} 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 = x + (y / (z * (-3.0d0)))
if (y <= (-2.6d+38)) then
tmp = t_1
else if (y <= 1.3d-257) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else if (y <= 9.8d-56) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
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 = x + (y / (z * -3.0));
double tmp;
if (y <= -2.6e+38) {
tmp = t_1;
} else if (y <= 1.3e-257) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= 9.8e-56) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y / (z * -3.0)) tmp = 0 if y <= -2.6e+38: tmp = t_1 elif y <= 1.3e-257: tmp = x + ((t / y) * (0.3333333333333333 / z)) elif y <= 9.8e-56: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y / Float64(z * -3.0))) tmp = 0.0 if (y <= -2.6e+38) tmp = t_1; elseif (y <= 1.3e-257) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); elseif (y <= 9.8e-56) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y / (z * -3.0)); tmp = 0.0; if (y <= -2.6e+38) tmp = t_1; elseif (y <= 1.3e-257) tmp = x + ((t / y) * (0.3333333333333333 / z)); elseif (y <= 9.8e-56) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+38], t$95$1, If[LessEqual[y, 1.3e-257], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-56], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-257}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-56}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.5999999999999999e38 or 9.8e-56 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*r/93.7%
/-rgt-identity93.7%
associate-*r/93.6%
associate-*l/93.6%
associate-/l*93.7%
metadata-eval93.7%
associate-/r*93.8%
Simplified93.8%
if -2.5999999999999999e38 < y < 1.3e-257Initial program 91.0%
associate-+l-91.0%
sub-neg91.0%
sub-neg91.0%
distribute-neg-in91.0%
unsub-neg91.0%
neg-mul-191.0%
associate-*r/91.0%
associate-*l/91.0%
distribute-neg-frac91.0%
neg-mul-191.0%
times-frac96.3%
distribute-lft-out--96.3%
*-commutative96.3%
associate-/r*96.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in y around 0 84.3%
*-commutative84.3%
associate-*l/84.4%
times-frac89.8%
Simplified89.8%
if 1.3e-257 < y < 9.8e-56Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac81.3%
distribute-lft-out--81.3%
*-commutative81.3%
associate-/r*81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in y around 0 90.6%
Final simplification91.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.3e-202) (not (<= y 1.16e-64))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (/ 0.3333333333333333 (* y (/ z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.3e-202) || !(y <= 1.16e-64)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + (0.3333333333333333 / (y * (z / 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 <= (-3.3d-202)) .or. (.not. (y <= 1.16d-64))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x + (0.3333333333333333d0 / (y * (z / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.3e-202) || !(y <= 1.16e-64)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + (0.3333333333333333 / (y * (z / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.3e-202) or not (y <= 1.16e-64): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + (0.3333333333333333 / (y * (z / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.3e-202) || !(y <= 1.16e-64)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(y * Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.3e-202) || ~((y <= 1.16e-64))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + (0.3333333333333333 / (y * (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.3e-202], N[Not[LessEqual[y, 1.16e-64]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-202} \lor \neg \left(y \leq 1.16 \cdot 10^{-64}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\end{array}
\end{array}
if y < -3.29999999999999989e-202 or 1.15999999999999992e-64 < y Initial program 98.2%
associate-+l-98.2%
sub-neg98.2%
sub-neg98.2%
distribute-neg-in98.2%
unsub-neg98.2%
neg-mul-198.2%
associate-*r/98.2%
associate-*l/98.1%
distribute-neg-frac98.1%
neg-mul-198.1%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.6%
if -3.29999999999999989e-202 < y < 1.15999999999999992e-64Initial program 89.4%
associate-+l-89.4%
sub-neg89.4%
sub-neg89.4%
distribute-neg-in89.4%
unsub-neg89.4%
neg-mul-189.4%
associate-*r/89.4%
associate-*l/89.4%
distribute-neg-frac89.4%
neg-mul-189.4%
times-frac84.4%
distribute-lft-out--84.4%
*-commutative84.4%
associate-/r*84.5%
metadata-eval84.5%
Simplified84.5%
Taylor expanded in y around 0 88.1%
associate-*r/89.2%
associate-/l/96.0%
div-inv96.0%
associate-/l*96.0%
frac-times96.1%
metadata-eval96.1%
Applied egg-rr96.1%
Final simplification98.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.6e-44) (not (<= y 2.5e-74))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (/ (/ (/ t 3.0) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.6e-44) || !(y <= 2.5e-74)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6.6d-44)) .or. (.not. (y <= 2.5d-74))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + (((t / 3.0d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.6e-44) || !(y <= 2.5e-74)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.6e-44) or not (y <= 2.5e-74): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + (((t / 3.0) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.6e-44) || !(y <= 2.5e-74)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.6e-44) || ~((y <= 2.5e-74))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + (((t / 3.0) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.6e-44], N[Not[LessEqual[y, 2.5e-74]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{-44} \lor \neg \left(y \leq 2.5 \cdot 10^{-74}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\end{array}
\end{array}
if y < -6.60000000000000011e-44 or 2.49999999999999999e-74 < y Initial program 99.2%
associate-+l-99.2%
sub-neg99.2%
sub-neg99.2%
distribute-neg-in99.2%
unsub-neg99.2%
neg-mul-199.2%
associate-*r/99.2%
associate-*l/99.1%
distribute-neg-frac99.1%
neg-mul-199.1%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
if -6.60000000000000011e-44 < y < 2.49999999999999999e-74Initial program 89.9%
associate-/r*97.8%
Simplified97.8%
Taylor expanded in x around inf 96.9%
Taylor expanded in t around 0 96.8%
*-commutative96.8%
metadata-eval96.8%
times-frac96.9%
*-commutative96.9%
times-frac96.9%
*-commutative96.9%
associate-*l/96.9%
*-lft-identity96.9%
Simplified96.9%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.8e-44) (not (<= y 7e-75))) (+ x (/ (- y (/ t y)) (* z -3.0))) (+ x (/ (/ (/ t 3.0) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.8e-44) || !(y <= 7e-75)) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.8d-44)) .or. (.not. (y <= 7d-75))) then
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
else
tmp = x + (((t / 3.0d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.8e-44) || !(y <= 7e-75)) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.8e-44) or not (y <= 7e-75): tmp = x + ((y - (t / y)) / (z * -3.0)) else: tmp = x + (((t / 3.0) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.8e-44) || !(y <= 7e-75)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.8e-44) || ~((y <= 7e-75))) tmp = x + ((y - (t / y)) / (z * -3.0)); else tmp = x + (((t / 3.0) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.8e-44], N[Not[LessEqual[y, 7e-75]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-44} \lor \neg \left(y \leq 7 \cdot 10^{-75}\right):\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\end{array}
\end{array}
if y < -2.8e-44 or 6.9999999999999997e-75 < y Initial program 99.2%
associate-+l-99.2%
sub-neg99.2%
sub-neg99.2%
distribute-neg-in99.2%
unsub-neg99.2%
neg-mul-199.2%
associate-*r/99.2%
associate-*l/99.1%
distribute-neg-frac99.1%
neg-mul-199.1%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
if -2.8e-44 < y < 6.9999999999999997e-75Initial program 89.9%
associate-/r*97.8%
Simplified97.8%
Taylor expanded in x around inf 96.9%
Taylor expanded in t around 0 96.8%
*-commutative96.8%
metadata-eval96.8%
times-frac96.9%
*-commutative96.9%
times-frac96.9%
*-commutative96.9%
associate-*l/96.9%
*-lft-identity96.9%
Simplified96.9%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -3.8e-50)
(+ x (/ (* t_1 -0.3333333333333333) z))
(if (<= y 1e-74)
(+ x (/ (/ (/ t 3.0) z) y))
(+ x (* t_1 (/ -0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.8e-50) {
tmp = x + ((t_1 * -0.3333333333333333) / z);
} else if (y <= 1e-74) {
tmp = x + (((t / 3.0) / z) / y);
} else {
tmp = x + (t_1 * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-3.8d-50)) then
tmp = x + ((t_1 * (-0.3333333333333333d0)) / z)
else if (y <= 1d-74) then
tmp = x + (((t / 3.0d0) / z) / y)
else
tmp = x + (t_1 * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.8e-50) {
tmp = x + ((t_1 * -0.3333333333333333) / z);
} else if (y <= 1e-74) {
tmp = x + (((t / 3.0) / z) / y);
} else {
tmp = x + (t_1 * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -3.8e-50: tmp = x + ((t_1 * -0.3333333333333333) / z) elif y <= 1e-74: tmp = x + (((t / 3.0) / z) / y) else: tmp = x + (t_1 * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -3.8e-50) tmp = Float64(x + Float64(Float64(t_1 * -0.3333333333333333) / z)); elseif (y <= 1e-74) tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); else tmp = Float64(x + Float64(t_1 * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -3.8e-50) tmp = x + ((t_1 * -0.3333333333333333) / z); elseif (y <= 1e-74) tmp = x + (((t / 3.0) / z) / y); else tmp = x + (t_1 * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e-50], N[(x + N[(N[(t$95$1 * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-74], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{-50}:\\
\;\;\;\;x + \frac{t_1 \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 10^{-74}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + t_1 \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.7999999999999999e-50Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
associate-*l/99.7%
Applied egg-rr99.7%
if -3.7999999999999999e-50 < y < 9.99999999999999958e-75Initial program 89.9%
associate-/r*97.8%
Simplified97.8%
Taylor expanded in x around inf 96.9%
Taylor expanded in t around 0 96.8%
*-commutative96.8%
metadata-eval96.8%
times-frac96.9%
*-commutative96.9%
times-frac96.9%
*-commutative96.9%
associate-*l/96.9%
*-lft-identity96.9%
Simplified96.9%
if 9.99999999999999958e-75 < y Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
sub-neg98.5%
distribute-neg-in98.5%
unsub-neg98.5%
neg-mul-198.5%
associate-*r/98.5%
associate-*l/98.3%
distribute-neg-frac98.3%
neg-mul-198.3%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.7e+38) (not (<= y 4.6e-56))) (+ x (/ y (* z -3.0))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e+38) || !(y <= 4.6e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.7d+38)) .or. (.not. (y <= 4.6d-56))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e+38) || !(y <= 4.6e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.7e+38) or not (y <= 4.6e-56): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.7e+38) || !(y <= 4.6e-56)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.7e+38) || ~((y <= 4.6e-56))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.7e+38], N[Not[LessEqual[y, 4.6e-56]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+38} \lor \neg \left(y \leq 4.6 \cdot 10^{-56}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.69999999999999996e38 or 4.60000000000000005e-56 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*r/93.7%
/-rgt-identity93.7%
associate-*r/93.6%
associate-*l/93.6%
associate-/l*93.7%
metadata-eval93.7%
associate-/r*93.8%
Simplified93.8%
if -2.69999999999999996e38 < y < 4.60000000000000005e-56Initial program 92.2%
associate-+l-92.2%
sub-neg92.2%
sub-neg92.2%
distribute-neg-in92.2%
unsub-neg92.2%
neg-mul-192.2%
associate-*r/92.2%
associate-*l/92.2%
distribute-neg-frac92.2%
neg-mul-192.2%
times-frac90.7%
distribute-lft-out--90.6%
*-commutative90.6%
associate-/r*90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in y around 0 86.7%
Final simplification90.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.6e+38) (not (<= y 9.8e-56))) (+ x (/ y (* z -3.0))) (+ x (/ 0.3333333333333333 (* y (/ z t))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e+38) || !(y <= 9.8e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 / (y * (z / 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 <= (-4.6d+38)) .or. (.not. (y <= 9.8d-56))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (0.3333333333333333d0 / (y * (z / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e+38) || !(y <= 9.8e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 / (y * (z / t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.6e+38) or not (y <= 9.8e-56): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 / (y * (z / t))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.6e+38) || !(y <= 9.8e-56)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(y * Float64(z / t)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.6e+38) || ~((y <= 9.8e-56))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 / (y * (z / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.6e+38], N[Not[LessEqual[y, 9.8e-56]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+38} \lor \neg \left(y \leq 9.8 \cdot 10^{-56}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\end{array}
\end{array}
if y < -4.6000000000000002e38 or 9.8e-56 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*r/93.7%
/-rgt-identity93.7%
associate-*r/93.6%
associate-*l/93.6%
associate-/l*93.7%
metadata-eval93.7%
associate-/r*93.8%
Simplified93.8%
if -4.6000000000000002e38 < y < 9.8e-56Initial program 92.2%
associate-+l-92.2%
sub-neg92.2%
sub-neg92.2%
distribute-neg-in92.2%
unsub-neg92.2%
neg-mul-192.2%
associate-*r/92.2%
associate-*l/92.2%
distribute-neg-frac92.2%
neg-mul-192.2%
times-frac90.7%
distribute-lft-out--90.6%
*-commutative90.6%
associate-/r*90.6%
metadata-eval90.6%
Simplified90.6%
Taylor expanded in y around 0 86.7%
associate-*r/87.3%
associate-/l/92.7%
div-inv92.7%
associate-/l*92.8%
frac-times92.8%
metadata-eval92.8%
Applied egg-rr92.8%
Final simplification93.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.6e+38) (not (<= y 9.8e-56))) (+ x (/ y (* z -3.0))) (+ x (/ (/ t (* z 3.0)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e+38) || !(y <= 9.8e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / (z * 3.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 <= (-2.6d+38)) .or. (.not. (y <= 9.8d-56))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + ((t / (z * 3.0d0)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e+38) || !(y <= 9.8e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / (z * 3.0)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.6e+38) or not (y <= 9.8e-56): tmp = x + (y / (z * -3.0)) else: tmp = x + ((t / (z * 3.0)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.6e+38) || !(y <= 9.8e-56)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.6e+38) || ~((y <= 9.8e-56))) tmp = x + (y / (z * -3.0)); else tmp = x + ((t / (z * 3.0)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.6e+38], N[Not[LessEqual[y, 9.8e-56]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+38} \lor \neg \left(y \leq 9.8 \cdot 10^{-56}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\end{array}
\end{array}
if y < -2.5999999999999999e38 or 9.8e-56 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*r/93.7%
/-rgt-identity93.7%
associate-*r/93.6%
associate-*l/93.6%
associate-/l*93.7%
metadata-eval93.7%
associate-/r*93.8%
Simplified93.8%
if -2.5999999999999999e38 < y < 9.8e-56Initial program 92.2%
associate-/r*98.3%
Simplified98.3%
Taylor expanded in x around inf 92.8%
Final simplification93.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.9e+38) (not (<= y 9.8e-56))) (+ x (/ y (* z -3.0))) (+ x (/ (/ (/ t 3.0) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.9e+38) || !(y <= 9.8e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.9d+38)) .or. (.not. (y <= 9.8d-56))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (((t / 3.0d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.9e+38) || !(y <= 9.8e-56)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.9e+38) or not (y <= 9.8e-56): tmp = x + (y / (z * -3.0)) else: tmp = x + (((t / 3.0) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.9e+38) || !(y <= 9.8e-56)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.9e+38) || ~((y <= 9.8e-56))) tmp = x + (y / (z * -3.0)); else tmp = x + (((t / 3.0) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.9e+38], N[Not[LessEqual[y, 9.8e-56]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+38} \lor \neg \left(y \leq 9.8 \cdot 10^{-56}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\end{array}
\end{array}
if y < -2.90000000000000007e38 or 9.8e-56 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*r/93.7%
/-rgt-identity93.7%
associate-*r/93.6%
associate-*l/93.6%
associate-/l*93.7%
metadata-eval93.7%
associate-/r*93.8%
Simplified93.8%
if -2.90000000000000007e38 < y < 9.8e-56Initial program 92.2%
associate-/r*98.3%
Simplified98.3%
Taylor expanded in x around inf 92.8%
Taylor expanded in t around 0 92.8%
*-commutative92.8%
metadata-eval92.8%
times-frac92.8%
*-commutative92.8%
times-frac92.8%
*-commutative92.8%
associate-*l/92.8%
*-lft-identity92.8%
Simplified92.8%
Final simplification93.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7.2e+38) (not (<= y 4.5e-64))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.2e+38) || !(y <= 4.5e-64)) {
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 ((y <= (-7.2d+38)) .or. (.not. (y <= 4.5d-64))) 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 ((y <= -7.2e+38) || !(y <= 4.5e-64)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7.2e+38) or not (y <= 4.5e-64): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7.2e+38) || !(y <= 4.5e-64)) 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 ((y <= -7.2e+38) || ~((y <= 4.5e-64))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7.2e+38], N[Not[LessEqual[y, 4.5e-64]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+38} \lor \neg \left(y \leq 4.5 \cdot 10^{-64}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.19999999999999938e38 or 4.5000000000000001e-64 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 90.8%
Taylor expanded in x around 0 69.8%
if -7.19999999999999938e38 < y < 4.5000000000000001e-64Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/91.9%
distribute-neg-frac91.9%
neg-mul-191.9%
times-frac90.3%
distribute-lft-out--90.3%
*-commutative90.3%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 33.8%
Taylor expanded in x around inf 29.1%
Final simplification49.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5e+38) (not (<= y 1.66e-62))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e+38) || !(y <= 1.66e-62)) {
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 ((y <= (-5d+38)) .or. (.not. (y <= 1.66d-62))) 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 ((y <= -5e+38) || !(y <= 1.66e-62)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5e+38) or not (y <= 1.66e-62): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5e+38) || !(y <= 1.66e-62)) 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 ((y <= -5e+38) || ~((y <= 1.66e-62))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5e+38], N[Not[LessEqual[y, 1.66e-62]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+38} \lor \neg \left(y \leq 1.66 \cdot 10^{-62}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.9999999999999997e38 or 1.65999999999999992e-62 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 90.8%
Taylor expanded in x around 0 69.8%
associate-*r/69.9%
associate-*l/69.9%
*-commutative69.9%
Simplified69.9%
if -4.9999999999999997e38 < y < 1.65999999999999992e-62Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/91.9%
distribute-neg-frac91.9%
neg-mul-191.9%
times-frac90.3%
distribute-lft-out--90.3%
*-commutative90.3%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 33.8%
Taylor expanded in x around inf 29.1%
Final simplification49.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.5e+38) (not (<= y 2.8e-62))) (/ y (* z -3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e+38) || !(y <= 2.8e-62)) {
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 ((y <= (-5.5d+38)) .or. (.not. (y <= 2.8d-62))) 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 ((y <= -5.5e+38) || !(y <= 2.8e-62)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.5e+38) or not (y <= 2.8e-62): tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.5e+38) || !(y <= 2.8e-62)) 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 ((y <= -5.5e+38) || ~((y <= 2.8e-62))) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e+38], N[Not[LessEqual[y, 2.8e-62]], $MachinePrecision]], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+38} \lor \neg \left(y \leq 2.8 \cdot 10^{-62}\right):\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.5000000000000003e38 or 2.80000000000000002e-62 < y Initial program 99.1%
associate-+l-99.1%
sub-neg99.1%
sub-neg99.1%
distribute-neg-in99.1%
unsub-neg99.1%
neg-mul-199.1%
associate-*r/99.1%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 90.8%
Taylor expanded in x around 0 69.8%
associate-*r/69.9%
associate-*l/69.9%
*-commutative69.9%
Simplified69.9%
clear-num69.8%
un-div-inv69.9%
div-inv70.0%
metadata-eval70.0%
Applied egg-rr70.0%
if -5.5000000000000003e38 < y < 2.80000000000000002e-62Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/91.9%
distribute-neg-frac91.9%
neg-mul-191.9%
times-frac90.3%
distribute-lft-out--90.3%
*-commutative90.3%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 33.8%
Taylor expanded in x around inf 29.1%
Final simplification49.3%
(FPCore (x y z t) :precision binary64 (if (<= y -5.4e+38) (/ -0.3333333333333333 (/ z y)) (if (<= y 2.8e-62) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+38) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 2.8e-62) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.4d+38)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 2.8d-62) then
tmp = x
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+38) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 2.8e-62) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.4e+38: tmp = -0.3333333333333333 / (z / y) elif y <= 2.8e-62: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e+38) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 2.8e-62) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.4e+38) tmp = -0.3333333333333333 / (z / y); elseif (y <= 2.8e-62) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e+38], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-62], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+38}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-62}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.39999999999999992e38Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.9%
Taylor expanded in x around 0 73.1%
clear-num73.1%
un-div-inv73.2%
Applied egg-rr73.2%
if -5.39999999999999992e38 < y < 2.80000000000000002e-62Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/91.9%
distribute-neg-frac91.9%
neg-mul-191.9%
times-frac90.3%
distribute-lft-out--90.3%
*-commutative90.3%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 33.8%
Taylor expanded in x around inf 29.1%
if 2.80000000000000002e-62 < y Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
sub-neg98.5%
distribute-neg-in98.5%
unsub-neg98.5%
neg-mul-198.5%
associate-*r/98.5%
associate-*l/98.3%
distribute-neg-frac98.3%
neg-mul-198.3%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 85.3%
Taylor expanded in x around 0 67.3%
associate-*r/67.3%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Final simplification49.2%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ y z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * (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 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * (y / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * (y / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * (y / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y}{z}
\end{array}
Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.9%
distribute-lft-out--94.9%
*-commutative94.9%
associate-/r*94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in y around inf 61.9%
Final simplification61.9%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (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 * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (y * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (y * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.9%
distribute-lft-out--94.9%
*-commutative94.9%
associate-/r*94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in y around inf 61.9%
Final simplification61.9%
(FPCore (x y z t) :precision binary64 (+ x (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + (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 + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + (y / (z * -3.0));
}
def code(x, y, z, t): return x + (y / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{z \cdot -3}
\end{array}
Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.9%
distribute-lft-out--94.9%
*-commutative94.9%
associate-/r*94.9%
metadata-eval94.9%
Simplified94.9%
*-commutative94.9%
clear-num94.8%
un-div-inv94.9%
div-inv95.0%
metadata-eval95.0%
Applied egg-rr95.0%
Taylor expanded in y around inf 61.9%
associate-*r/61.9%
*-commutative61.9%
associate-*r/61.9%
/-rgt-identity61.9%
associate-*r/61.9%
associate-*l/61.9%
associate-/l*61.9%
metadata-eval61.9%
associate-/r*62.0%
Simplified62.0%
Final simplification62.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 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.9%
distribute-lft-out--94.9%
*-commutative94.9%
associate-/r*94.9%
metadata-eval94.9%
Simplified94.9%
Taylor expanded in y around inf 61.9%
Taylor expanded in x around inf 26.3%
Final simplification26.3%
(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 2023258
(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))))