
(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 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (- x (/ 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}
Initial program 96.5%
associate-/r*97.1%
Simplified97.1%
Final simplification97.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
(if (<= y -3.2e+50)
(+ x (/ y (* z -3.0)))
(if (<= y -2.15e-19)
t_1
(if (<= y -2e-60)
(+ x (/ -0.3333333333333333 (/ z y)))
(if (<= y -1.56e-254)
t_1
(if (<= y 6.6e-20)
(+ x (/ t (* 3.0 (* y z))))
(+ x (* y (/ -0.3333333333333333 z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + ((t / y) * (0.3333333333333333 / z));
double tmp;
if (y <= -3.2e+50) {
tmp = x + (y / (z * -3.0));
} else if (y <= -2.15e-19) {
tmp = t_1;
} else if (y <= -2e-60) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= -1.56e-254) {
tmp = t_1;
} else if (y <= 6.6e-20) {
tmp = x + (t / (3.0 * (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) :: t_1
real(8) :: tmp
t_1 = x + ((t / y) * (0.3333333333333333d0 / z))
if (y <= (-3.2d+50)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= (-2.15d-19)) then
tmp = t_1
else if (y <= (-2d-60)) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else if (y <= (-1.56d-254)) then
tmp = t_1
else if (y <= 6.6d-20) then
tmp = x + (t / (3.0d0 * (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 t_1 = x + ((t / y) * (0.3333333333333333 / z));
double tmp;
if (y <= -3.2e+50) {
tmp = x + (y / (z * -3.0));
} else if (y <= -2.15e-19) {
tmp = t_1;
} else if (y <= -2e-60) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= -1.56e-254) {
tmp = t_1;
} else if (y <= 6.6e-20) {
tmp = x + (t / (3.0 * (y * z)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + ((t / y) * (0.3333333333333333 / z)) tmp = 0 if y <= -3.2e+50: tmp = x + (y / (z * -3.0)) elif y <= -2.15e-19: tmp = t_1 elif y <= -2e-60: tmp = x + (-0.3333333333333333 / (z / y)) elif y <= -1.56e-254: tmp = t_1 elif y <= 6.6e-20: tmp = x + (t / (3.0 * (y * z))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))) tmp = 0.0 if (y <= -3.2e+50) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= -2.15e-19) tmp = t_1; elseif (y <= -2e-60) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); elseif (y <= -1.56e-254) tmp = t_1; elseif (y <= 6.6e-20) tmp = Float64(x + Float64(t / Float64(3.0 * Float64(y * z)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + ((t / y) * (0.3333333333333333 / z)); tmp = 0.0; if (y <= -3.2e+50) tmp = x + (y / (z * -3.0)); elseif (y <= -2.15e-19) tmp = t_1; elseif (y <= -2e-60) tmp = x + (-0.3333333333333333 / (z / y)); elseif (y <= -1.56e-254) tmp = t_1; elseif (y <= 6.6e-20) tmp = x + (t / (3.0 * (y * z))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+50], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.15e-19], t$95$1, If[LessEqual[y, -2e-60], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.56e-254], t$95$1, If[LessEqual[y, 6.6e-20], N[(x + N[(t / N[(3.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+50}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -1.56 \cdot 10^{-254}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{t}{3 \cdot \left(y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.19999999999999983e50Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
clear-num96.1%
un-div-inv96.2%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
if -3.19999999999999983e50 < y < -2.15e-19 or -1.9999999999999999e-60 < y < -1.56e-254Initial program 93.1%
associate-+l-93.1%
sub-neg93.1%
sub-neg93.1%
distribute-neg-in93.1%
unsub-neg93.1%
neg-mul-193.1%
associate-*r/93.1%
associate-*l/93.1%
distribute-neg-frac93.1%
neg-mul-193.1%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 93.1%
neg-mul-193.1%
distribute-neg-frac93.1%
Simplified93.1%
Taylor expanded in z around 0 86.4%
associate-/r*91.5%
metadata-eval91.5%
times-frac93.0%
neg-mul-193.0%
associate-*l/93.1%
associate-*r/89.3%
neg-mul-189.3%
associate-/r*89.3%
metadata-eval89.3%
Simplified89.3%
div-inv89.3%
associate-*l*93.0%
div-inv93.1%
Applied egg-rr93.1%
if -2.15e-19 < y < -1.9999999999999999e-60Initial program 99.3%
associate-+l-99.3%
sub-neg99.3%
sub-neg99.3%
distribute-neg-in99.3%
unsub-neg99.3%
neg-mul-199.3%
associate-*r/99.3%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac86.6%
distribute-lft-out--86.6%
*-commutative86.6%
associate-/r*86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in y around inf 97.0%
associate-*l/97.0%
associate-/l*97.4%
Applied egg-rr97.4%
if -1.56e-254 < y < 6.6e-20Initial program 94.4%
associate-+l-94.4%
sub-neg94.4%
sub-neg94.4%
distribute-neg-in94.4%
unsub-neg94.4%
neg-mul-194.4%
associate-*r/94.4%
associate-*l/94.4%
distribute-neg-frac94.4%
neg-mul-194.4%
times-frac87.1%
distribute-lft-out--87.1%
*-commutative87.1%
associate-/r*87.1%
metadata-eval87.1%
Simplified87.1%
Taylor expanded in y around 0 85.8%
neg-mul-185.8%
distribute-neg-frac85.8%
Simplified85.8%
clear-num85.7%
frac-2neg85.7%
frac-times93.0%
*-un-lft-identity93.0%
remove-double-neg93.0%
div-inv93.1%
metadata-eval93.1%
Applied egg-rr93.1%
*-commutative93.1%
metadata-eval93.1%
distribute-lft-neg-in93.1%
distribute-rgt-neg-in93.1%
associate-*l*93.0%
distribute-rgt-neg-out93.0%
distribute-lft-neg-in93.0%
remove-double-neg93.0%
*-commutative93.0%
Simplified93.0%
if 6.6e-20 < y Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
Final simplification93.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
(if (<= y -1.05e+47)
(+ x (/ y (* z -3.0)))
(if (<= y -1.35e-19)
t_1
(if (<= y -2e-60)
(+ x (/ -0.3333333333333333 (/ z y)))
(if (<= y -4.9e-254)
t_1
(if (<= y 4.5e-20)
(+ x (/ t (* y (* z 3.0))))
(+ x (* y (/ -0.3333333333333333 z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + ((t / y) * (0.3333333333333333 / z));
double tmp;
if (y <= -1.05e+47) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.35e-19) {
tmp = t_1;
} else if (y <= -2e-60) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= -4.9e-254) {
tmp = t_1;
} else if (y <= 4.5e-20) {
tmp = x + (t / (y * (z * 3.0)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t / y) * (0.3333333333333333d0 / z))
if (y <= (-1.05d+47)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= (-1.35d-19)) then
tmp = t_1
else if (y <= (-2d-60)) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else if (y <= (-4.9d-254)) then
tmp = t_1
else if (y <= 4.5d-20) then
tmp = x + (t / (y * (z * 3.0d0)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + ((t / y) * (0.3333333333333333 / z));
double tmp;
if (y <= -1.05e+47) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.35e-19) {
tmp = t_1;
} else if (y <= -2e-60) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= -4.9e-254) {
tmp = t_1;
} else if (y <= 4.5e-20) {
tmp = x + (t / (y * (z * 3.0)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + ((t / y) * (0.3333333333333333 / z)) tmp = 0 if y <= -1.05e+47: tmp = x + (y / (z * -3.0)) elif y <= -1.35e-19: tmp = t_1 elif y <= -2e-60: tmp = x + (-0.3333333333333333 / (z / y)) elif y <= -4.9e-254: tmp = t_1 elif y <= 4.5e-20: tmp = x + (t / (y * (z * 3.0))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))) tmp = 0.0 if (y <= -1.05e+47) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= -1.35e-19) tmp = t_1; elseif (y <= -2e-60) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); elseif (y <= -4.9e-254) tmp = t_1; elseif (y <= 4.5e-20) tmp = Float64(x + Float64(t / Float64(y * Float64(z * 3.0)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + ((t / y) * (0.3333333333333333 / z)); tmp = 0.0; if (y <= -1.05e+47) tmp = x + (y / (z * -3.0)); elseif (y <= -1.35e-19) tmp = t_1; elseif (y <= -2e-60) tmp = x + (-0.3333333333333333 / (z / y)); elseif (y <= -4.9e-254) tmp = t_1; elseif (y <= 4.5e-20) tmp = x + (t / (y * (z * 3.0))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+47], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-19], t$95$1, If[LessEqual[y, -2e-60], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.9e-254], t$95$1, If[LessEqual[y, 4.5e-20], N[(x + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+47}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -4.9 \cdot 10^{-254}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.05e47Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
clear-num96.1%
un-div-inv96.2%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
if -1.05e47 < y < -1.35e-19 or -1.9999999999999999e-60 < y < -4.8999999999999998e-254Initial program 93.1%
associate-+l-93.1%
sub-neg93.1%
sub-neg93.1%
distribute-neg-in93.1%
unsub-neg93.1%
neg-mul-193.1%
associate-*r/93.1%
associate-*l/93.1%
distribute-neg-frac93.1%
neg-mul-193.1%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 93.1%
neg-mul-193.1%
distribute-neg-frac93.1%
Simplified93.1%
Taylor expanded in z around 0 86.4%
associate-/r*91.5%
metadata-eval91.5%
times-frac93.0%
neg-mul-193.0%
associate-*l/93.1%
associate-*r/89.3%
neg-mul-189.3%
associate-/r*89.3%
metadata-eval89.3%
Simplified89.3%
div-inv89.3%
associate-*l*93.0%
div-inv93.1%
Applied egg-rr93.1%
if -1.35e-19 < y < -1.9999999999999999e-60Initial program 99.3%
associate-+l-99.3%
sub-neg99.3%
sub-neg99.3%
distribute-neg-in99.3%
unsub-neg99.3%
neg-mul-199.3%
associate-*r/99.3%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac86.6%
distribute-lft-out--86.6%
*-commutative86.6%
associate-/r*86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in y around inf 97.0%
associate-*l/97.0%
associate-/l*97.4%
Applied egg-rr97.4%
if -4.8999999999999998e-254 < y < 4.5000000000000001e-20Initial program 94.4%
Taylor expanded in x around inf 93.1%
if 4.5000000000000001e-20 < y Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
Final simplification93.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
(if (<= y -3.2e+50)
(+ x (/ y (* z -3.0)))
(if (<= y -1.35e-19)
t_1
(if (<= y -2e-60)
(+ x (/ -0.3333333333333333 (/ z y)))
(if (<= y 6.6e-20) t_1 (+ x (* y (/ -0.3333333333333333 z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + ((t / y) * (0.3333333333333333 / z));
double tmp;
if (y <= -3.2e+50) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.35e-19) {
tmp = t_1;
} else if (y <= -2e-60) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= 6.6e-20) {
tmp = t_1;
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((t / y) * (0.3333333333333333d0 / z))
if (y <= (-3.2d+50)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= (-1.35d-19)) then
tmp = t_1
else if (y <= (-2d-60)) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else if (y <= 6.6d-20) then
tmp = t_1
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + ((t / y) * (0.3333333333333333 / z));
double tmp;
if (y <= -3.2e+50) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.35e-19) {
tmp = t_1;
} else if (y <= -2e-60) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= 6.6e-20) {
tmp = t_1;
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + ((t / y) * (0.3333333333333333 / z)) tmp = 0 if y <= -3.2e+50: tmp = x + (y / (z * -3.0)) elif y <= -1.35e-19: tmp = t_1 elif y <= -2e-60: tmp = x + (-0.3333333333333333 / (z / y)) elif y <= 6.6e-20: tmp = t_1 else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))) tmp = 0.0 if (y <= -3.2e+50) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= -1.35e-19) tmp = t_1; elseif (y <= -2e-60) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); elseif (y <= 6.6e-20) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + ((t / y) * (0.3333333333333333 / z)); tmp = 0.0; if (y <= -3.2e+50) tmp = x + (y / (z * -3.0)); elseif (y <= -1.35e-19) tmp = t_1; elseif (y <= -2e-60) tmp = x + (-0.3333333333333333 / (z / y)); elseif (y <= 6.6e-20) tmp = t_1; else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.2e+50], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-19], t$95$1, If[LessEqual[y, -2e-60], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e-20], t$95$1, N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+50}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.19999999999999983e50Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
clear-num96.1%
un-div-inv96.2%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
if -3.19999999999999983e50 < y < -1.35e-19 or -1.9999999999999999e-60 < y < 6.6e-20Initial program 93.9%
associate-+l-93.9%
sub-neg93.9%
sub-neg93.9%
distribute-neg-in93.9%
unsub-neg93.9%
neg-mul-193.9%
associate-*r/93.9%
associate-*l/93.9%
distribute-neg-frac93.9%
neg-mul-193.9%
times-frac92.3%
distribute-lft-out--92.3%
*-commutative92.3%
associate-/r*92.3%
metadata-eval92.3%
Simplified92.3%
Taylor expanded in y around 0 88.8%
neg-mul-188.8%
distribute-neg-frac88.8%
Simplified88.8%
Taylor expanded in z around 0 90.2%
associate-/r*88.2%
metadata-eval88.2%
times-frac88.7%
neg-mul-188.7%
associate-*l/88.8%
associate-*r/94.0%
neg-mul-194.0%
associate-/r*94.0%
metadata-eval94.0%
Simplified94.0%
div-inv94.0%
associate-*l*88.7%
div-inv88.8%
Applied egg-rr88.8%
if -1.35e-19 < y < -1.9999999999999999e-60Initial program 99.3%
associate-+l-99.3%
sub-neg99.3%
sub-neg99.3%
distribute-neg-in99.3%
unsub-neg99.3%
neg-mul-199.3%
associate-*r/99.3%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac86.6%
distribute-lft-out--86.6%
*-commutative86.6%
associate-/r*86.3%
metadata-eval86.3%
Simplified86.3%
Taylor expanded in y around inf 97.0%
associate-*l/97.0%
associate-/l*97.4%
Applied egg-rr97.4%
if 6.6e-20 < y Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
Final simplification91.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -7e+45)
(+ x (/ y (* z -3.0)))
(if (<= y -1.4e-19)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(if (<= y -3.7e-57)
(+ x (/ -0.3333333333333333 (/ z y)))
(if (<= y 2.9e-20)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(+ x (* y (/ -0.3333333333333333 z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e+45) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.4e-19) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= -3.7e-57) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= 2.9e-20) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7d+45)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= (-1.4d-19)) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else if (y <= (-3.7d-57)) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else if (y <= 2.9d-20) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e+45) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.4e-19) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= -3.7e-57) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= 2.9e-20) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e+45: tmp = x + (y / (z * -3.0)) elif y <= -1.4e-19: tmp = x + ((t / y) * (0.3333333333333333 / z)) elif y <= -3.7e-57: tmp = x + (-0.3333333333333333 / (z / y)) elif y <= 2.9e-20: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e+45) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= -1.4e-19) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); elseif (y <= -3.7e-57) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); elseif (y <= 2.9e-20) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7e+45) tmp = x + (y / (z * -3.0)); elseif (y <= -1.4e-19) tmp = x + ((t / y) * (0.3333333333333333 / z)); elseif (y <= -3.7e-57) tmp = x + (-0.3333333333333333 / (z / y)); elseif (y <= 2.9e-20) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e+45], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.4e-19], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e-57], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-20], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+45}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-57}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-20}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.00000000000000046e45Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
clear-num96.1%
un-div-inv96.2%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
if -7.00000000000000046e45 < y < -1.40000000000000001e-19Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
sub-neg99.4%
distribute-neg-in99.4%
unsub-neg99.4%
neg-mul-199.4%
associate-*r/99.4%
associate-*l/99.5%
distribute-neg-frac99.5%
neg-mul-199.5%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 82.8%
neg-mul-182.8%
distribute-neg-frac82.8%
Simplified82.8%
Taylor expanded in z around 0 77.8%
associate-/r*77.8%
metadata-eval77.8%
times-frac82.8%
neg-mul-182.8%
associate-*l/82.8%
associate-*r/71.9%
neg-mul-171.9%
associate-/r*71.9%
metadata-eval71.9%
Simplified71.9%
div-inv71.9%
associate-*l*82.7%
div-inv82.8%
Applied egg-rr82.8%
if -1.40000000000000001e-19 < y < -3.7e-57Initial 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.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 99.5%
associate-*l/99.5%
associate-/l*100.0%
Applied egg-rr100.0%
if -3.7e-57 < y < 2.9e-20Initial program 93.1%
associate-+l-93.1%
sub-neg93.1%
sub-neg93.1%
distribute-neg-in93.1%
unsub-neg93.1%
neg-mul-193.1%
associate-*r/93.1%
associate-*l/93.1%
distribute-neg-frac93.1%
neg-mul-193.1%
times-frac90.5%
distribute-lft-out--90.5%
*-commutative90.5%
associate-/r*90.5%
metadata-eval90.5%
Simplified90.5%
Taylor expanded in y around 0 88.9%
neg-mul-188.9%
distribute-neg-frac88.9%
Simplified88.9%
Taylor expanded in z around 0 92.1%
associate-/r*88.9%
metadata-eval88.9%
times-frac88.8%
neg-mul-188.8%
associate-*l/88.9%
associate-*r/97.3%
neg-mul-197.3%
associate-/r*97.3%
metadata-eval97.3%
Simplified97.3%
if 2.9e-20 < y Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
Final simplification94.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.65e+46)
(+ x (/ y (* z -3.0)))
(if (<= y -1.45e-19)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(if (<= y -3.7e-57)
(+ x (/ -0.3333333333333333 (/ z y)))
(if (<= y 1.5e-19)
(+ x (/ (/ t (* z 3.0)) y))
(+ x (* y (/ -0.3333333333333333 z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+46) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.45e-19) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= -3.7e-57) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= 1.5e-19) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.65d+46)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= (-1.45d-19)) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else if (y <= (-3.7d-57)) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else if (y <= 1.5d-19) then
tmp = x + ((t / (z * 3.0d0)) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+46) {
tmp = x + (y / (z * -3.0));
} else if (y <= -1.45e-19) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else if (y <= -3.7e-57) {
tmp = x + (-0.3333333333333333 / (z / y));
} else if (y <= 1.5e-19) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65e+46: tmp = x + (y / (z * -3.0)) elif y <= -1.45e-19: tmp = x + ((t / y) * (0.3333333333333333 / z)) elif y <= -3.7e-57: tmp = x + (-0.3333333333333333 / (z / y)) elif y <= 1.5e-19: tmp = x + ((t / (z * 3.0)) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65e+46) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= -1.45e-19) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); elseif (y <= -3.7e-57) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); elseif (y <= 1.5e-19) tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.65e+46) tmp = x + (y / (z * -3.0)); elseif (y <= -1.45e-19) tmp = x + ((t / y) * (0.3333333333333333 / z)); elseif (y <= -3.7e-57) tmp = x + (-0.3333333333333333 / (z / y)); elseif (y <= 1.5e-19) tmp = x + ((t / (z * 3.0)) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65e+46], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-19], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e-57], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-19], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+46}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-57}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-19}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.6499999999999999e46Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
clear-num96.1%
un-div-inv96.2%
div-inv96.3%
metadata-eval96.3%
Applied egg-rr96.3%
if -1.6499999999999999e46 < y < -1.45e-19Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
sub-neg99.4%
distribute-neg-in99.4%
unsub-neg99.4%
neg-mul-199.4%
associate-*r/99.4%
associate-*l/99.5%
distribute-neg-frac99.5%
neg-mul-199.5%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 82.8%
neg-mul-182.8%
distribute-neg-frac82.8%
Simplified82.8%
Taylor expanded in z around 0 77.8%
associate-/r*77.8%
metadata-eval77.8%
times-frac82.8%
neg-mul-182.8%
associate-*l/82.8%
associate-*r/71.9%
neg-mul-171.9%
associate-/r*71.9%
metadata-eval71.9%
Simplified71.9%
div-inv71.9%
associate-*l*82.7%
div-inv82.8%
Applied egg-rr82.8%
if -1.45e-19 < y < -3.7e-57Initial 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.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 99.5%
associate-*l/99.5%
associate-/l*100.0%
Applied egg-rr100.0%
if -3.7e-57 < y < 1.49999999999999996e-19Initial program 93.1%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in x around inf 97.4%
if 1.49999999999999996e-19 < y Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
Final simplification94.4%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0)))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (z * (y * 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))) + (t / (z * (y * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0)))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}
\end{array}
Initial program 96.5%
Taylor expanded in z around 0 96.4%
associate-*r*96.5%
*-commutative96.5%
*-commutative96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (x y z t) :precision binary64 (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
def code(x, y, z, t): return x + ((-0.3333333333333333 / z) * (y - (t / y)))
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)
\end{array}
Initial program 96.5%
associate-+l-96.5%
sub-neg96.5%
sub-neg96.5%
distribute-neg-in96.5%
unsub-neg96.5%
neg-mul-196.5%
associate-*r/96.5%
associate-*l/96.4%
distribute-neg-frac96.4%
neg-mul-196.4%
times-frac95.6%
distribute-lft-out--95.6%
*-commutative95.6%
associate-/r*95.7%
metadata-eval95.7%
Simplified95.7%
Final simplification95.7%
(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 96.5%
associate-+l-96.5%
sub-neg96.5%
sub-neg96.5%
distribute-neg-in96.5%
unsub-neg96.5%
neg-mul-196.5%
associate-*r/96.5%
associate-*l/96.4%
distribute-neg-frac96.4%
neg-mul-196.4%
times-frac95.6%
distribute-lft-out--95.6%
*-commutative95.6%
associate-/r*95.7%
metadata-eval95.7%
Simplified95.7%
Taylor expanded in y around inf 65.3%
Final simplification65.3%
(FPCore (x y z t) :precision binary64 (+ x (/ -0.3333333333333333 (/ z y))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 / (z / y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((-0.3333333333333333d0) / (z / y))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 / (z / y));
}
def code(x, y, z, t): return x + (-0.3333333333333333 / (z / y))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 / Float64(z / y))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 / (z / y)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333}{\frac{z}{y}}
\end{array}
Initial program 96.5%
associate-+l-96.5%
sub-neg96.5%
sub-neg96.5%
distribute-neg-in96.5%
unsub-neg96.5%
neg-mul-196.5%
associate-*r/96.5%
associate-*l/96.4%
distribute-neg-frac96.4%
neg-mul-196.4%
times-frac95.6%
distribute-lft-out--95.6%
*-commutative95.6%
associate-/r*95.7%
metadata-eval95.7%
Simplified95.7%
Taylor expanded in y around inf 65.3%
associate-*l/65.4%
associate-/l*65.3%
Applied egg-rr65.3%
Final simplification65.3%
(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(Float64(y * -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[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot -0.3333333333333333}{z}
\end{array}
Initial program 96.5%
associate-+l-96.5%
sub-neg96.5%
sub-neg96.5%
distribute-neg-in96.5%
unsub-neg96.5%
neg-mul-196.5%
associate-*r/96.5%
associate-*l/96.4%
distribute-neg-frac96.4%
neg-mul-196.4%
times-frac95.6%
distribute-lft-out--95.6%
*-commutative95.6%
associate-/r*95.7%
metadata-eval95.7%
Simplified95.7%
Taylor expanded in y around inf 65.3%
Taylor expanded in z around 0 65.3%
associate-*r/65.4%
*-commutative65.4%
Simplified65.4%
Final simplification65.4%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.5%
associate-+l-96.5%
sub-neg96.5%
sub-neg96.5%
distribute-neg-in96.5%
unsub-neg96.5%
neg-mul-196.5%
associate-*r/96.5%
associate-*l/96.4%
distribute-neg-frac96.4%
neg-mul-196.4%
times-frac95.6%
distribute-lft-out--95.6%
*-commutative95.6%
associate-/r*95.7%
metadata-eval95.7%
Simplified95.7%
Taylor expanded in y around inf 65.3%
Taylor expanded in x around inf 28.3%
Final simplification28.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 2023174
(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))))