
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= y 4e+30) (+ x (fma -0.3333333333333333 (/ y z) (/ (/ (/ t z) y) 3.0))) (+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 4e+30) {
tmp = x + fma(-0.3333333333333333, (y / z), (((t / z) / y) / 3.0));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 4e+30) tmp = Float64(x + fma(-0.3333333333333333, Float64(y / z), Float64(Float64(Float64(t / z) / y) / 3.0))); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 4e+30], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision] + N[(N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4 \cdot 10^{+30}:\\
\;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{\frac{\frac{t}{z}}{y}}{3}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if y < 4.0000000000000001e30Initial program 93.3%
associate-+l-93.3%
sub-neg93.3%
sub-neg93.3%
distribute-neg-in93.3%
distribute-neg-frac93.3%
neg-mul-193.3%
*-commutative93.3%
times-frac93.3%
remove-double-neg93.3%
fma-def93.3%
metadata-eval93.3%
associate-*l*93.4%
associate-/r*98.3%
associate-/l/98.4%
Simplified98.4%
if 4.0000000000000001e30 < 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.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
associate-*l/99.7%
*-un-lft-identity99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -5e+119) (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) (+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -5e+119) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-5d+119)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
else
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -5e+119) {
tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -5e+119: tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -5e+119) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -5e+119) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -5e+119], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{+119}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -4.9999999999999999e119Initial program 99.7%
if -4.9999999999999999e119 < (*.f64 z 3) Initial program 93.5%
associate-+l-93.5%
sub-neg93.5%
sub-neg93.5%
distribute-neg-in93.5%
unsub-neg93.5%
neg-mul-193.5%
associate-*r/93.5%
associate-*l/93.4%
distribute-neg-frac93.4%
neg-mul-193.4%
times-frac97.0%
distribute-lft-out--97.5%
*-commutative97.5%
associate-/r*97.4%
metadata-eval97.4%
Simplified97.4%
clear-num97.4%
inv-pow97.4%
Applied egg-rr97.4%
unpow-197.4%
Simplified97.4%
associate-*l/97.5%
*-un-lft-identity97.5%
div-inv97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Final simplification97.9%
(FPCore (x y z t) :precision binary64 (if (<= y 2e-76) (+ (+ x (/ -1.0 (* 3.0 (/ z y)))) (/ (/ t (* z 3.0)) y)) (+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2e-76) {
tmp = (x + (-1.0 / (3.0 * (z / y)))) + ((t / (z * 3.0)) / y);
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 2d-76) then
tmp = (x + ((-1.0d0) / (3.0d0 * (z / y)))) + ((t / (z * 3.0d0)) / y)
else
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2e-76) {
tmp = (x + (-1.0 / (3.0 * (z / y)))) + ((t / (z * 3.0)) / y);
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 2e-76: tmp = (x + (-1.0 / (3.0 * (z / y)))) + ((t / (z * 3.0)) / y) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 2e-76) tmp = Float64(Float64(x + Float64(-1.0 / Float64(3.0 * Float64(z / y)))) + Float64(Float64(t / Float64(z * 3.0)) / y)); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 2e-76) tmp = (x + (-1.0 / (3.0 * (z / y)))) + ((t / (z * 3.0)) / y); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 2e-76], N[(N[(x + N[(-1.0 / N[(3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2 \cdot 10^{-76}:\\
\;\;\;\;\left(x + \frac{-1}{3 \cdot \frac{z}{y}}\right) + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if y < 1.99999999999999985e-76Initial program 93.2%
associate-/r*98.1%
Simplified98.1%
clear-num98.1%
inv-pow98.1%
Applied egg-rr98.1%
unpow-198.1%
Simplified98.1%
Taylor expanded in z around 0 98.2%
if 1.99999999999999985e-76 < y Initial program 97.4%
associate-+l-97.4%
sub-neg97.4%
sub-neg97.4%
distribute-neg-in97.4%
unsub-neg97.4%
neg-mul-197.4%
associate-*r/97.4%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
associate-*l/99.7%
*-un-lft-identity99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (<= y 1e-83) (+ (/ (/ t (* z 3.0)) y) (- x (/ y (* z 3.0)))) (+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1e-83) {
tmp = ((t / (z * 3.0)) / y) + (x - (y / (z * 3.0)));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= 1d-83) then
tmp = ((t / (z * 3.0d0)) / y) + (x - (y / (z * 3.0d0)))
else
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1e-83) {
tmp = ((t / (z * 3.0)) / y) + (x - (y / (z * 3.0)));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 1e-83: tmp = ((t / (z * 3.0)) / y) + (x - (y / (z * 3.0))) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 1e-83) tmp = Float64(Float64(Float64(t / Float64(z * 3.0)) / y) + Float64(x - Float64(y / Float64(z * 3.0)))); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 1e-83) tmp = ((t / (z * 3.0)) / y) + (x - (y / (z * 3.0))); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 1e-83], N[(N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{-83}:\\
\;\;\;\;\frac{\frac{t}{z \cdot 3}}{y} + \left(x - \frac{y}{z \cdot 3}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if y < 1e-83Initial program 93.2%
associate-/r*98.1%
Simplified98.1%
if 1e-83 < y Initial program 97.4%
associate-+l-97.4%
sub-neg97.4%
sub-neg97.4%
distribute-neg-in97.4%
unsub-neg97.4%
neg-mul-197.4%
associate-*r/97.4%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
clear-num99.5%
inv-pow99.5%
Applied egg-rr99.5%
unpow-199.5%
Simplified99.5%
associate-*l/99.7%
*-un-lft-identity99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.9e-30) (not (<= y 4.5e-164))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (/ (* (/ t z) 0.3333333333333333) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-30) || !(y <= 4.5e-164)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + (((t / z) * 0.3333333333333333) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.9d-30)) .or. (.not. (y <= 4.5d-164))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + (((t / z) * 0.3333333333333333d0) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-30) || !(y <= 4.5e-164)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + (((t / z) * 0.3333333333333333) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.9e-30) or not (y <= 4.5e-164): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + (((t / z) * 0.3333333333333333) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.9e-30) || !(y <= 4.5e-164)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.9e-30) || ~((y <= 4.5e-164))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + (((t / z) * 0.3333333333333333) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.9e-30], N[Not[LessEqual[y, 4.5e-164]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-30} \lor \neg \left(y \leq 4.5 \cdot 10^{-164}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -1.9000000000000002e-30 or 4.4999999999999997e-164 < y Initial program 96.4%
associate-+l-96.4%
sub-neg96.4%
sub-neg96.4%
distribute-neg-in96.4%
unsub-neg96.4%
neg-mul-196.4%
associate-*r/96.4%
associate-*l/96.3%
distribute-neg-frac96.3%
neg-mul-196.3%
times-frac98.5%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.0%
metadata-eval99.0%
Simplified99.0%
if -1.9000000000000002e-30 < y < 4.4999999999999997e-164Initial program 90.6%
associate-+l-90.6%
sub-neg90.6%
sub-neg90.6%
distribute-neg-in90.6%
unsub-neg90.6%
neg-mul-190.6%
associate-*r/90.6%
associate-*l/90.6%
distribute-neg-frac90.6%
neg-mul-190.6%
times-frac87.4%
distribute-lft-out--87.4%
*-commutative87.4%
associate-/r*87.4%
metadata-eval87.4%
Simplified87.4%
Taylor expanded in y around 0 88.3%
*-commutative88.3%
associate-*l/88.3%
times-frac85.2%
Simplified85.2%
associate-*l/97.1%
Applied egg-rr97.1%
Taylor expanded in t around 0 97.1%
Final simplification98.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4e-28) (not (<= y 4.2e-164))) (+ x (/ (- y (/ t y)) (* z -3.0))) (+ x (/ (* (/ t z) 0.3333333333333333) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-28) || !(y <= 4.2e-164)) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = x + (((t / z) * 0.3333333333333333) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4d-28)) .or. (.not. (y <= 4.2d-164))) then
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
else
tmp = x + (((t / z) * 0.3333333333333333d0) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-28) || !(y <= 4.2e-164)) {
tmp = x + ((y - (t / y)) / (z * -3.0));
} else {
tmp = x + (((t / z) * 0.3333333333333333) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e-28) or not (y <= 4.2e-164): tmp = x + ((y - (t / y)) / (z * -3.0)) else: tmp = x + (((t / z) * 0.3333333333333333) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e-28) || !(y <= 4.2e-164)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4e-28) || ~((y <= 4.2e-164))) tmp = x + ((y - (t / y)) / (z * -3.0)); else tmp = x + (((t / z) * 0.3333333333333333) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e-28], N[Not[LessEqual[y, 4.2e-164]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-28} \lor \neg \left(y \leq 4.2 \cdot 10^{-164}\right):\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -3.99999999999999988e-28 or 4.1999999999999998e-164 < y Initial program 96.4%
associate-+l-96.4%
sub-neg96.4%
sub-neg96.4%
distribute-neg-in96.4%
unsub-neg96.4%
neg-mul-196.4%
associate-*r/96.4%
associate-*l/96.3%
distribute-neg-frac96.3%
neg-mul-196.3%
times-frac98.5%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.0%
metadata-eval99.0%
Simplified99.0%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
associate-*l/99.1%
*-un-lft-identity99.1%
div-inv99.2%
metadata-eval99.2%
Applied egg-rr99.2%
if -3.99999999999999988e-28 < y < 4.1999999999999998e-164Initial program 90.6%
associate-+l-90.6%
sub-neg90.6%
sub-neg90.6%
distribute-neg-in90.6%
unsub-neg90.6%
neg-mul-190.6%
associate-*r/90.6%
associate-*l/90.6%
distribute-neg-frac90.6%
neg-mul-190.6%
times-frac87.4%
distribute-lft-out--87.4%
*-commutative87.4%
associate-/r*87.4%
metadata-eval87.4%
Simplified87.4%
Taylor expanded in y around 0 88.3%
*-commutative88.3%
associate-*l/88.3%
times-frac85.2%
Simplified85.2%
associate-*l/97.1%
Applied egg-rr97.1%
Taylor expanded in t around 0 97.1%
Final simplification98.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (* y -0.3333333333333333) z)))
(if (<= y -5.4e+48)
t_1
(if (<= y -1.7e-15)
x
(if (<= y 3.5e-25)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 38000000.0) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (y * -0.3333333333333333) / z;
double tmp;
if (y <= -5.4e+48) {
tmp = t_1;
} else if (y <= -1.7e-15) {
tmp = x;
} else if (y <= 3.5e-25) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 38000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (-0.3333333333333333d0)) / z
if (y <= (-5.4d+48)) then
tmp = t_1
else if (y <= (-1.7d-15)) then
tmp = x
else if (y <= 3.5d-25) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 38000000.0d0) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (y * -0.3333333333333333) / z;
double tmp;
if (y <= -5.4e+48) {
tmp = t_1;
} else if (y <= -1.7e-15) {
tmp = x;
} else if (y <= 3.5e-25) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 38000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y * -0.3333333333333333) / z tmp = 0 if y <= -5.4e+48: tmp = t_1 elif y <= -1.7e-15: tmp = x elif y <= 3.5e-25: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 38000000.0: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y * -0.3333333333333333) / z) tmp = 0.0 if (y <= -5.4e+48) tmp = t_1; elseif (y <= -1.7e-15) tmp = x; elseif (y <= 3.5e-25) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 38000000.0) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y * -0.3333333333333333) / z; tmp = 0.0; if (y <= -5.4e+48) tmp = t_1; elseif (y <= -1.7e-15) tmp = x; elseif (y <= 3.5e-25) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 38000000.0) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -5.4e+48], t$95$1, If[LessEqual[y, -1.7e-15], x, If[LessEqual[y, 3.5e-25], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 38000000.0], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{+48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-25}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 38000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.40000000000000007e48 or 3.8e7 < y Initial program 98.1%
associate-/r*93.4%
Simplified93.4%
clear-num93.2%
inv-pow93.2%
Applied egg-rr93.2%
unpow-193.2%
Simplified93.2%
Taylor expanded in y around inf 77.9%
associate-*r/78.0%
Applied egg-rr78.0%
if -5.40000000000000007e48 < y < -1.7e-15 or 3.5000000000000002e-25 < y < 3.8e7Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
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.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 68.7%
if -1.7e-15 < y < 3.5000000000000002e-25Initial program 89.6%
associate-/r*99.0%
Simplified99.0%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
Taylor expanded in z around 0 99.0%
Taylor expanded in y around 0 60.5%
Final simplification69.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.9e+112) (not (<= z 7.5))) (+ x (/ y (* z -3.0))) (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.9e+112) || !(z <= 7.5)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-1.9d+112)) .or. (.not. (z <= 7.5d0))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.9e+112) || !(z <= 7.5)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.9e+112) or not (z <= 7.5): tmp = x + (y / (z * -3.0)) else: tmp = -0.3333333333333333 * ((y - (t / y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.9e+112) || !(z <= 7.5)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.9e+112) || ~((z <= 7.5))) tmp = x + (y / (z * -3.0)); else tmp = -0.3333333333333333 * ((y - (t / y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.9e+112], N[Not[LessEqual[z, 7.5]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+112} \lor \neg \left(z \leq 7.5\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if z < -1.90000000000000004e112 or 7.5 < z Initial program 98.8%
associate-+l-98.8%
sub-neg98.8%
sub-neg98.8%
distribute-neg-in98.8%
unsub-neg98.8%
neg-mul-198.8%
associate-*r/98.8%
associate-*l/98.7%
distribute-neg-frac98.7%
neg-mul-198.7%
times-frac88.8%
distribute-lft-out--88.8%
*-commutative88.8%
associate-/r*88.8%
metadata-eval88.8%
Simplified88.8%
clear-num88.7%
inv-pow88.7%
Applied egg-rr88.7%
unpow-188.7%
Simplified88.7%
associate-*l/88.8%
*-un-lft-identity88.8%
div-inv88.9%
metadata-eval88.9%
Applied egg-rr88.9%
Taylor expanded in y around inf 79.4%
if -1.90000000000000004e112 < z < 7.5Initial program 91.5%
associate-/r*94.6%
Simplified94.6%
clear-num94.6%
inv-pow94.6%
Applied egg-rr94.6%
unpow-194.6%
Simplified94.6%
Taylor expanded in x around 0 82.6%
Simplified88.9%
Final simplification85.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.2e+47) (not (<= y 3e-22))) (+ x (/ y (* z -3.0))) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e+47) || !(y <= 3e-22)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.2d+47)) .or. (.not. (y <= 3d-22))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e+47) || !(y <= 3e-22)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.2e+47) or not (y <= 3e-22): tmp = x + (y / (z * -3.0)) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.2e+47) || !(y <= 3e-22)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.2e+47) || ~((y <= 3e-22))) tmp = x + (y / (z * -3.0)); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.2e+47], N[Not[LessEqual[y, 3e-22]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+47} \lor \neg \left(y \leq 3 \cdot 10^{-22}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.20000000000000007e47 or 2.9999999999999999e-22 < 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-frac98.8%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
associate-*l/99.7%
*-un-lft-identity99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.7%
if -5.20000000000000007e47 < y < 2.9999999999999999e-22Initial program 90.8%
associate-+l-90.8%
sub-neg90.8%
sub-neg90.8%
distribute-neg-in90.8%
unsub-neg90.8%
neg-mul-190.8%
associate-*r/90.8%
associate-*l/90.8%
distribute-neg-frac90.8%
neg-mul-190.8%
times-frac90.9%
distribute-lft-out--90.9%
*-commutative90.9%
associate-/r*90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in y around 0 85.3%
*-commutative85.3%
associate-*l/85.2%
times-frac84.6%
Simplified84.6%
Final simplification90.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7.6e+46) (not (<= y 1.55e-21))) (+ x (/ y (* z -3.0))) (+ x (/ (* (/ t z) 0.3333333333333333) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.6e+46) || !(y <= 1.55e-21)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (((t / z) * 0.3333333333333333) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-7.6d+46)) .or. (.not. (y <= 1.55d-21))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (((t / z) * 0.3333333333333333d0) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.6e+46) || !(y <= 1.55e-21)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (((t / z) * 0.3333333333333333) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7.6e+46) or not (y <= 1.55e-21): tmp = x + (y / (z * -3.0)) else: tmp = x + (((t / z) * 0.3333333333333333) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7.6e+46) || !(y <= 1.55e-21)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7.6e+46) || ~((y <= 1.55e-21))) tmp = x + (y / (z * -3.0)); else tmp = x + (((t / z) * 0.3333333333333333) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7.6e+46], N[Not[LessEqual[y, 1.55e-21]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+46} \lor \neg \left(y \leq 1.55 \cdot 10^{-21}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -7.5999999999999998e46 or 1.5499999999999999e-21 < 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-frac98.8%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
unpow-199.6%
Simplified99.6%
associate-*l/99.7%
*-un-lft-identity99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.7%
if -7.5999999999999998e46 < y < 1.5499999999999999e-21Initial program 90.8%
associate-+l-90.8%
sub-neg90.8%
sub-neg90.8%
distribute-neg-in90.8%
unsub-neg90.8%
neg-mul-190.8%
associate-*r/90.8%
associate-*l/90.8%
distribute-neg-frac90.8%
neg-mul-190.8%
times-frac90.9%
distribute-lft-out--90.9%
*-commutative90.9%
associate-/r*90.8%
metadata-eval90.8%
Simplified90.8%
Taylor expanded in y around 0 85.3%
*-commutative85.3%
associate-*l/85.2%
times-frac84.6%
Simplified84.6%
associate-*l/92.8%
Applied egg-rr92.8%
Taylor expanded in t around 0 92.8%
Final simplification94.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1e-16) (not (<= y 1.06e-113))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-16) || !(y <= 1.06e-113)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1d-16)) .or. (.not. (y <= 1.06d-113))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-16) || !(y <= 1.06e-113)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1e-16) or not (y <= 1.06e-113): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1e-16) || !(y <= 1.06e-113)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1e-16) || ~((y <= 1.06e-113))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1e-16], N[Not[LessEqual[y, 1.06e-113]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-16} \lor \neg \left(y \leq 1.06 \cdot 10^{-113}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -9.9999999999999998e-17 or 1.05999999999999995e-113 < y Initial program 97.3%
associate-+l-97.3%
sub-neg97.3%
sub-neg97.3%
distribute-neg-in97.3%
unsub-neg97.3%
neg-mul-197.3%
associate-*r/97.3%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac98.4%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in y around inf 90.1%
if -9.9999999999999998e-17 < y < 1.05999999999999995e-113Initial program 90.0%
associate-/r*98.9%
Simplified98.9%
clear-num98.9%
inv-pow98.9%
Applied egg-rr98.9%
unpow-198.9%
Simplified98.9%
Taylor expanded in z around 0 98.9%
Taylor expanded in y around 0 63.8%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9e-17) (not (<= y 1.1e-113))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e-17) || !(y <= 1.1e-113)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9d-17)) .or. (.not. (y <= 1.1d-113))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e-17) || !(y <= 1.1e-113)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9e-17) or not (y <= 1.1e-113): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9e-17) || !(y <= 1.1e-113)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9e-17) || ~((y <= 1.1e-113))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9e-17], N[Not[LessEqual[y, 1.1e-113]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-17} \lor \neg \left(y \leq 1.1 \cdot 10^{-113}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -8.99999999999999957e-17 or 1.10000000000000002e-113 < y Initial program 97.3%
associate-+l-97.3%
sub-neg97.3%
sub-neg97.3%
distribute-neg-in97.3%
unsub-neg97.3%
neg-mul-197.3%
associate-*r/97.3%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac98.4%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*99.0%
metadata-eval99.0%
Simplified99.0%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
associate-*l/99.1%
*-un-lft-identity99.1%
div-inv99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 90.3%
if -8.99999999999999957e-17 < y < 1.10000000000000002e-113Initial program 90.0%
associate-/r*98.9%
Simplified98.9%
clear-num98.9%
inv-pow98.9%
Applied egg-rr98.9%
unpow-198.9%
Simplified98.9%
Taylor expanded in z around 0 98.9%
Taylor expanded in y around 0 63.8%
Final simplification80.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.3e-16) (not (<= y 1.2e-113))) (+ x (/ y (* z -3.0))) (/ (* (/ t z) 0.3333333333333333) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e-16) || !(y <= 1.2e-113)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = ((t / z) * 0.3333333333333333) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.3d-16)) .or. (.not. (y <= 1.2d-113))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = ((t / z) * 0.3333333333333333d0) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e-16) || !(y <= 1.2e-113)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = ((t / z) * 0.3333333333333333) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.3e-16) or not (y <= 1.2e-113): tmp = x + (y / (z * -3.0)) else: tmp = ((t / z) * 0.3333333333333333) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.3e-16) || !(y <= 1.2e-113)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(Float64(t / z) * 0.3333333333333333) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.3e-16) || ~((y <= 1.2e-113))) tmp = x + (y / (z * -3.0)); else tmp = ((t / z) * 0.3333333333333333) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.3e-16], N[Not[LessEqual[y, 1.2e-113]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-16} \lor \neg \left(y \leq 1.2 \cdot 10^{-113}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2.2999999999999999e-16 or 1.20000000000000006e-113 < y Initial program 97.3%
associate-+l-97.3%
sub-neg97.3%
sub-neg97.3%
distribute-neg-in97.3%
unsub-neg97.3%
neg-mul-197.3%
associate-*r/97.3%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac98.4%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*99.0%
metadata-eval99.0%
Simplified99.0%
clear-num99.0%
inv-pow99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
associate-*l/99.1%
*-un-lft-identity99.1%
div-inv99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 90.3%
if -2.2999999999999999e-16 < y < 1.20000000000000006e-113Initial program 90.0%
associate-/r*98.9%
Simplified98.9%
clear-num98.9%
inv-pow98.9%
Applied egg-rr98.9%
unpow-198.9%
Simplified98.9%
div-inv98.9%
Applied egg-rr98.9%
Taylor expanded in y around 0 63.8%
associate-*r/63.8%
times-frac70.2%
associate-*l/70.1%
Simplified70.1%
Final simplification82.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.3e+48) (not (<= y 350000000.0))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.3e+48) || !(y <= 350000000.0)) {
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 <= (-1.3d+48)) .or. (.not. (y <= 350000000.0d0))) 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 <= -1.3e+48) || !(y <= 350000000.0)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.3e+48) or not (y <= 350000000.0): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.3e+48) || !(y <= 350000000.0)) 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 <= -1.3e+48) || ~((y <= 350000000.0))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.3e+48], N[Not[LessEqual[y, 350000000.0]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+48} \lor \neg \left(y \leq 350000000\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.29999999999999998e48 or 3.5e8 < y Initial program 98.1%
associate-/r*93.4%
Simplified93.4%
clear-num93.2%
inv-pow93.2%
Applied egg-rr93.2%
unpow-193.2%
Simplified93.2%
Taylor expanded in y around inf 77.9%
if -1.29999999999999998e48 < y < 3.5e8Initial program 91.3%
associate-+l-91.3%
sub-neg91.3%
sub-neg91.3%
distribute-neg-in91.3%
unsub-neg91.3%
neg-mul-191.3%
associate-*r/91.3%
associate-*l/91.3%
distribute-neg-frac91.3%
neg-mul-191.3%
times-frac91.3%
distribute-lft-out--91.3%
*-commutative91.3%
associate-/r*91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in x around inf 34.6%
Final simplification55.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.7e+47) (not (<= y 31000000.0))) (/ (* y -0.3333333333333333) z) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e+47) || !(y <= 31000000.0)) {
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 <= (-2.7d+47)) .or. (.not. (y <= 31000000.0d0))) 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 <= -2.7e+47) || !(y <= 31000000.0)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.7e+47) or not (y <= 31000000.0): tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.7e+47) || !(y <= 31000000.0)) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.7e+47) || ~((y <= 31000000.0))) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.7e+47], N[Not[LessEqual[y, 31000000.0]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+47} \lor \neg \left(y \leq 31000000\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.69999999999999996e47 or 3.1e7 < y Initial program 98.1%
associate-/r*93.4%
Simplified93.4%
clear-num93.2%
inv-pow93.2%
Applied egg-rr93.2%
unpow-193.2%
Simplified93.2%
Taylor expanded in y around inf 77.9%
associate-*r/78.0%
Applied egg-rr78.0%
if -2.69999999999999996e47 < y < 3.1e7Initial program 91.3%
associate-+l-91.3%
sub-neg91.3%
sub-neg91.3%
distribute-neg-in91.3%
unsub-neg91.3%
neg-mul-191.3%
associate-*r/91.3%
associate-*l/91.3%
distribute-neg-frac91.3%
neg-mul-191.3%
times-frac91.3%
distribute-lft-out--91.3%
*-commutative91.3%
associate-/r*91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in x around inf 34.6%
Final simplification55.1%
(FPCore (x y z t) :precision binary64 (if (<= y -2.6e+47) (* y (/ -0.3333333333333333 z)) (if (<= y 2900000000.0) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e+47) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 2900000000.0) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.6d+47)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 2900000000.0d0) then
tmp = x
else
tmp = (-0.3333333333333333d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e+47) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 2900000000.0) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.6e+47: tmp = y * (-0.3333333333333333 / z) elif y <= 2900000000.0: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.6e+47) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 2900000000.0) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.6e+47) tmp = y * (-0.3333333333333333 / z); elseif (y <= 2900000000.0) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.6e+47], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2900000000.0], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+47}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2900000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -2.60000000000000003e47Initial program 97.9%
associate-/r*96.1%
Simplified96.1%
clear-num96.0%
inv-pow96.0%
Applied egg-rr96.0%
unpow-196.0%
Simplified96.0%
Taylor expanded in y around inf 80.1%
associate-*r/80.1%
*-commutative80.1%
associate-*r/80.1%
Simplified80.1%
if -2.60000000000000003e47 < y < 2.9e9Initial program 91.3%
associate-+l-91.3%
sub-neg91.3%
sub-neg91.3%
distribute-neg-in91.3%
unsub-neg91.3%
neg-mul-191.3%
associate-*r/91.3%
associate-*l/91.3%
distribute-neg-frac91.3%
neg-mul-191.3%
times-frac91.3%
distribute-lft-out--91.3%
*-commutative91.3%
associate-/r*91.3%
metadata-eval91.3%
Simplified91.3%
Taylor expanded in x around inf 34.6%
if 2.9e9 < y Initial program 98.3%
associate-/r*91.0%
Simplified91.0%
clear-num90.8%
inv-pow90.8%
Applied egg-rr90.8%
unpow-190.8%
Simplified90.8%
Taylor expanded in y around inf 76.0%
Final simplification55.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.5%
associate-+l-94.5%
sub-neg94.5%
sub-neg94.5%
distribute-neg-in94.5%
unsub-neg94.5%
neg-mul-194.5%
associate-*r/94.5%
associate-*l/94.4%
distribute-neg-frac94.4%
neg-mul-194.4%
times-frac94.9%
distribute-lft-out--95.2%
*-commutative95.2%
associate-/r*95.2%
metadata-eval95.2%
Simplified95.2%
Taylor expanded in x around inf 27.9%
Final simplification27.9%
(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 2023193
(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))))