
(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 (<= (* z 3.0) 5e-51) (+ x (* (/ 1.0 (* z -3.0)) (- y (/ t y)))) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 5e-51) {
tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y)));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 5d-51) then
tmp = x + ((1.0d0 / (z * (-3.0d0))) * (y - (t / y)))
else
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 5e-51) {
tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y)));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 5e-51: tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y))) else: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 5e-51) tmp = Float64(x + Float64(Float64(1.0 / Float64(z * -3.0)) * Float64(y - Float64(t / y)))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 5e-51) tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y))); else tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 5e-51], N[(x + N[(N[(1.0 / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 5 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{1}{z \cdot -3} \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 5.00000000000000004e-51Initial program 89.3%
sub-neg89.3%
associate-+l+89.3%
remove-double-neg89.3%
distribute-frac-neg89.3%
sub-neg89.3%
distribute-frac-neg89.3%
neg-mul-189.3%
*-commutative89.3%
associate-/l*89.2%
*-commutative89.2%
neg-mul-189.2%
times-frac97.2%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.7%
metadata-eval97.7%
Simplified97.7%
clear-num97.7%
inv-pow97.7%
Applied egg-rr97.7%
unpow-197.7%
Simplified97.7%
Taylor expanded in z around 0 97.8%
*-commutative97.8%
Simplified97.8%
if 5.00000000000000004e-51 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 4e-43) (+ x (* (/ 1.0 (* z -3.0)) (- y (/ t y)))) (+ (+ x (/ t (* z (* 3.0 y)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 4e-43) {
tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y)));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (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) <= 4d-43) then
tmp = x + ((1.0d0 / (z * (-3.0d0))) * (y - (t / y)))
else
tmp = (x + (t / (z * (3.0d0 * y)))) + (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) <= 4e-43) {
tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y)));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 4e-43: tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y))) else: tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 4e-43) tmp = Float64(x + Float64(Float64(1.0 / Float64(z * -3.0)) * Float64(y - Float64(t / y)))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 4e-43) tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y))); else tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 4e-43], N[(x + N[(N[(1.0 / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 4 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{1}{z \cdot -3} \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 4.00000000000000031e-43Initial program 89.4%
sub-neg89.4%
associate-+l+89.4%
remove-double-neg89.4%
distribute-frac-neg89.4%
sub-neg89.4%
distribute-frac-neg89.4%
neg-mul-189.4%
*-commutative89.4%
associate-/l*89.4%
*-commutative89.4%
neg-mul-189.4%
times-frac97.2%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.7%
metadata-eval97.7%
Simplified97.7%
clear-num97.7%
inv-pow97.7%
Applied egg-rr97.7%
unpow-197.7%
Simplified97.7%
Taylor expanded in z around 0 97.8%
*-commutative97.8%
Simplified97.8%
if 4.00000000000000031e-43 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification98.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.75e+34) (not (<= y 2.1e+43))) (+ 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 <= -1.75e+34) || !(y <= 2.1e+43)) {
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 <= (-1.75d+34)) .or. (.not. (y <= 2.1d+43))) 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 <= -1.75e+34) || !(y <= 2.1e+43)) {
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 <= -1.75e+34) or not (y <= 2.1e+43): 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 <= -1.75e+34) || !(y <= 2.1e+43)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x - Float64(Float64(Float64(t / y) * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.75e+34) || ~((y <= 2.1e+43))) 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, -1.75e+34], N[Not[LessEqual[y, 2.1e+43]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(t / y), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+34} \lor \neg \left(y \leq 2.1 \cdot 10^{+43}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{t}{y} \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.74999999999999999e34 or 2.10000000000000002e43 < y Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.9%
*-commutative98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.4%
*-rgt-identity97.4%
Simplified97.4%
if -1.74999999999999999e34 < y < 2.10000000000000002e43Initial program 86.6%
sub-neg86.6%
associate-+l+86.6%
remove-double-neg86.6%
distribute-frac-neg86.6%
sub-neg86.6%
distribute-frac-neg86.6%
neg-mul-186.6%
*-commutative86.6%
associate-/l*86.6%
*-commutative86.6%
neg-mul-186.6%
times-frac92.4%
distribute-lft-out--92.5%
*-commutative92.5%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 87.4%
neg-mul-187.4%
distribute-neg-frac287.4%
Simplified87.4%
associate-*l/87.5%
frac-2neg87.5%
add-sqr-sqrt45.2%
sqrt-unprod39.4%
sqr-neg39.4%
sqrt-unprod12.7%
add-sqr-sqrt26.6%
distribute-rgt-neg-out26.6%
distribute-frac-neg226.6%
add-sqr-sqrt13.9%
sqrt-unprod36.9%
sqr-neg36.9%
sqrt-unprod42.3%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
Final simplification92.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.6e+33) (not (<= y 1.2e+43))) (+ x (/ y (* z -3.0))) (- x (/ (/ (* t -0.3333333333333333) y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.6e+33) || !(y <= 1.2e+43)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x - (((t * -0.3333333333333333) / y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9.6d+33)) .or. (.not. (y <= 1.2d+43))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x - (((t * (-0.3333333333333333d0)) / y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.6e+33) || !(y <= 1.2e+43)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x - (((t * -0.3333333333333333) / y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.6e+33) or not (y <= 1.2e+43): tmp = x + (y / (z * -3.0)) else: tmp = x - (((t * -0.3333333333333333) / y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.6e+33) || !(y <= 1.2e+43)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x - Float64(Float64(Float64(t * -0.3333333333333333) / y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.6e+33) || ~((y <= 1.2e+43))) tmp = x + (y / (z * -3.0)); else tmp = x - (((t * -0.3333333333333333) / y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.6e+33], N[Not[LessEqual[y, 1.2e+43]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(t * -0.3333333333333333), $MachinePrecision] / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+33} \lor \neg \left(y \leq 1.2 \cdot 10^{+43}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\frac{t \cdot -0.3333333333333333}{y}}{z}\\
\end{array}
\end{array}
if y < -9.5999999999999999e33 or 1.20000000000000012e43 < y Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.9%
*-commutative98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.4%
*-rgt-identity97.4%
Simplified97.4%
if -9.5999999999999999e33 < y < 1.20000000000000012e43Initial program 86.6%
sub-neg86.6%
associate-+l+86.6%
remove-double-neg86.6%
distribute-frac-neg86.6%
sub-neg86.6%
distribute-frac-neg86.6%
neg-mul-186.6%
*-commutative86.6%
associate-/l*86.6%
*-commutative86.6%
neg-mul-186.6%
times-frac92.4%
distribute-lft-out--92.5%
*-commutative92.5%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 87.4%
neg-mul-187.4%
distribute-neg-frac287.4%
Simplified87.4%
*-commutative87.4%
add-sqr-sqrt45.2%
sqrt-unprod39.3%
sqr-neg39.3%
sqrt-unprod12.7%
add-sqr-sqrt26.6%
frac-2neg26.6%
distribute-frac-neg26.6%
cancel-sign-sub-inv26.6%
*-commutative26.6%
associate-*l/26.6%
*-un-lft-identity26.6%
times-frac26.6%
metadata-eval26.6%
add-sqr-sqrt13.9%
sqrt-unprod36.9%
sqr-neg36.9%
sqrt-unprod42.2%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
associate-*r/87.5%
associate-*r/87.5%
Applied egg-rr87.5%
Final simplification92.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.15e+34) (not (<= y 2.1e+42))) (+ x (/ y (* z -3.0))) (- x (* -0.3333333333333333 (/ (/ t y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.15e+34) || !(y <= 2.1e+42)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x - (-0.3333333333333333 * ((t / y) / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.15d+34)) .or. (.not. (y <= 2.1d+42))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x - ((-0.3333333333333333d0) * ((t / y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.15e+34) || !(y <= 2.1e+42)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x - (-0.3333333333333333 * ((t / y) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.15e+34) or not (y <= 2.1e+42): tmp = x + (y / (z * -3.0)) else: tmp = x - (-0.3333333333333333 * ((t / y) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.15e+34) || !(y <= 2.1e+42)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x - Float64(-0.3333333333333333 * Float64(Float64(t / y) / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.15e+34) || ~((y <= 2.1e+42))) tmp = x + (y / (z * -3.0)); else tmp = x - (-0.3333333333333333 * ((t / y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.15e+34], N[Not[LessEqual[y, 2.1e+42]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+34} \lor \neg \left(y \leq 2.1 \cdot 10^{+42}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x - -0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\end{array}
\end{array}
if y < -1.1499999999999999e34 or 2.09999999999999995e42 < y Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.9%
*-commutative98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.4%
*-rgt-identity97.4%
Simplified97.4%
if -1.1499999999999999e34 < y < 2.09999999999999995e42Initial program 86.6%
sub-neg86.6%
associate-+l+86.6%
remove-double-neg86.6%
distribute-frac-neg86.6%
sub-neg86.6%
distribute-frac-neg86.6%
neg-mul-186.6%
*-commutative86.6%
associate-/l*86.6%
*-commutative86.6%
neg-mul-186.6%
times-frac92.4%
distribute-lft-out--92.5%
*-commutative92.5%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 87.4%
neg-mul-187.4%
distribute-neg-frac287.4%
Simplified87.4%
*-commutative87.4%
add-sqr-sqrt45.2%
sqrt-unprod39.3%
sqr-neg39.3%
sqrt-unprod12.7%
add-sqr-sqrt26.6%
frac-2neg26.6%
distribute-frac-neg26.6%
cancel-sign-sub-inv26.6%
*-commutative26.6%
associate-*l/26.6%
*-un-lft-identity26.6%
times-frac26.6%
metadata-eval26.6%
add-sqr-sqrt13.9%
sqrt-unprod36.9%
sqr-neg36.9%
sqrt-unprod42.2%
add-sqr-sqrt87.5%
Applied egg-rr87.5%
Final simplification91.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.46e+34) (not (<= y 4.6e+42))) (+ x (/ y (* z -3.0))) (+ x (/ (/ t 3.0) (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.46e+34) || !(y <= 4.6e+42)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / 3.0) / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.46d+34)) .or. (.not. (y <= 4.6d+42))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + ((t / 3.0d0) / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.46e+34) || !(y <= 4.6e+42)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + ((t / 3.0) / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.46e+34) or not (y <= 4.6e+42): tmp = x + (y / (z * -3.0)) else: tmp = x + ((t / 3.0) / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.46e+34) || !(y <= 4.6e+42)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(t / 3.0) / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.46e+34) || ~((y <= 4.6e+42))) tmp = x + (y / (z * -3.0)); else tmp = x + ((t / 3.0) / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.46e+34], N[Not[LessEqual[y, 4.6e+42]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / 3.0), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.46 \cdot 10^{+34} \lor \neg \left(y \leq 4.6 \cdot 10^{+42}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{3}}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.46e34 or 4.6e42 < y Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.9%
*-commutative98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.4%
*-rgt-identity97.4%
Simplified97.4%
if -1.46e34 < y < 4.6e42Initial program 86.6%
sub-neg86.6%
associate-+l+86.6%
remove-double-neg86.6%
distribute-frac-neg86.6%
sub-neg86.6%
distribute-frac-neg86.6%
neg-mul-186.6%
*-commutative86.6%
associate-/l*86.6%
*-commutative86.6%
neg-mul-186.6%
times-frac92.4%
distribute-lft-out--92.5%
*-commutative92.5%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 82.3%
metadata-eval82.3%
times-frac82.3%
*-commutative82.3%
times-frac82.1%
associate-*l/82.3%
*-lft-identity82.3%
Simplified82.3%
Final simplification89.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.46e+34) (not (<= y 1.7e+42))) (+ x (/ y (* z -3.0))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.46e+34) || !(y <= 1.7e+42)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.46d+34)) .or. (.not. (y <= 1.7d+42))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.46e+34) || !(y <= 1.7e+42)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.46e+34) or not (y <= 1.7e+42): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.46e+34) || !(y <= 1.7e+42)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.46e+34) || ~((y <= 1.7e+42))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.46e+34], N[Not[LessEqual[y, 1.7e+42]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.46 \cdot 10^{+34} \lor \neg \left(y \leq 1.7 \cdot 10^{+42}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.46e34 or 1.69999999999999988e42 < y Initial program 99.0%
sub-neg99.0%
associate-+l+99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.9%
*-commutative98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.4%
*-rgt-identity97.4%
Simplified97.4%
if -1.46e34 < y < 1.69999999999999988e42Initial program 86.6%
sub-neg86.6%
associate-+l+86.6%
remove-double-neg86.6%
distribute-frac-neg86.6%
sub-neg86.6%
distribute-frac-neg86.6%
neg-mul-186.6%
*-commutative86.6%
associate-/l*86.6%
*-commutative86.6%
neg-mul-186.6%
times-frac92.4%
distribute-lft-out--92.5%
*-commutative92.5%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
Taylor expanded in y around 0 82.3%
Final simplification89.1%
(FPCore (x y z t)
:precision binary64
(if (<= x -2.6e-26)
(+ x (/ y (* z -3.0)))
(if (<= x 3.2e+67)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.6e-26) {
tmp = x + (y / (z * -3.0));
} else if (x <= 3.2e+67) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.6d-26)) then
tmp = x + (y / (z * (-3.0d0)))
else if (x <= 3.2d+67) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.6e-26) {
tmp = x + (y / (z * -3.0));
} else if (x <= 3.2e+67) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.6e-26: tmp = x + (y / (z * -3.0)) elif x <= 3.2e+67: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.6e-26) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (x <= 3.2e+67) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.6e-26) tmp = x + (y / (z * -3.0)); elseif (x <= 3.2e+67) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.6e-26], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+67], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-26}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+67}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if x < -2.6000000000000001e-26Initial program 92.7%
sub-neg92.7%
associate-+l+92.7%
remove-double-neg92.7%
distribute-frac-neg92.7%
sub-neg92.7%
distribute-frac-neg92.7%
neg-mul-192.7%
*-commutative92.7%
associate-/l*92.7%
*-commutative92.7%
neg-mul-192.7%
times-frac96.1%
distribute-lft-out--96.1%
*-commutative96.1%
associate-/r*96.1%
metadata-eval96.1%
Simplified96.1%
Taylor expanded in y around inf 74.8%
*-commutative74.8%
metadata-eval74.8%
times-frac74.8%
*-rgt-identity74.8%
Simplified74.8%
if -2.6000000000000001e-26 < x < 3.19999999999999983e67Initial program 90.5%
sub-neg90.5%
associate-+l+90.5%
remove-double-neg90.5%
distribute-frac-neg90.5%
sub-neg90.5%
distribute-frac-neg90.5%
neg-mul-190.5%
*-commutative90.5%
associate-/l*90.5%
*-commutative90.5%
neg-mul-190.5%
times-frac94.0%
distribute-lft-out--94.0%
*-commutative94.0%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
clear-num93.9%
inv-pow93.9%
Applied egg-rr93.9%
unpow-193.9%
Simplified93.9%
Taylor expanded in x around 0 93.3%
+-commutative93.3%
Simplified93.3%
Taylor expanded in z around 0 88.0%
if 3.19999999999999983e67 < x Initial program 95.8%
sub-neg95.8%
associate-+l+95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
sub-neg95.8%
distribute-frac-neg95.8%
neg-mul-195.8%
*-commutative95.8%
associate-/l*95.8%
*-commutative95.8%
neg-mul-195.8%
times-frac97.9%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 78.0%
Final simplification82.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4e-18) (not (<= y 5.8e+26))) (+ x (/ y (* z -3.0))) (/ (/ t z) (* 3.0 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-18) || !(y <= 5.8e+26)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (t / z) / (3.0 * y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4d-18)) .or. (.not. (y <= 5.8d+26))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = (t / z) / (3.0d0 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-18) || !(y <= 5.8e+26)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (t / z) / (3.0 * y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e-18) or not (y <= 5.8e+26): tmp = x + (y / (z * -3.0)) else: tmp = (t / z) / (3.0 * y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e-18) || !(y <= 5.8e+26)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(t / z) / Float64(3.0 * y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4e-18) || ~((y <= 5.8e+26))) tmp = x + (y / (z * -3.0)); else tmp = (t / z) / (3.0 * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e-18], N[Not[LessEqual[y, 5.8e+26]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-18} \lor \neg \left(y \leq 5.8 \cdot 10^{+26}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{z}}{3 \cdot y}\\
\end{array}
\end{array}
if y < -4.0000000000000003e-18 or 5.8e26 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
neg-mul-199.0%
times-frac99.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 93.1%
*-commutative93.1%
metadata-eval93.1%
times-frac93.2%
*-rgt-identity93.2%
Simplified93.2%
if -4.0000000000000003e-18 < y < 5.8e26Initial program 85.2%
sub-neg85.2%
associate-+l+85.2%
distribute-frac-neg85.2%
neg-mul-185.2%
*-commutative85.2%
times-frac85.2%
fma-define85.2%
metadata-eval85.2%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y around 0 94.0%
Taylor expanded in t around inf 70.1%
div-inv70.1%
*-commutative70.1%
associate-*l*70.1%
Applied egg-rr70.1%
un-div-inv70.1%
clear-num70.1%
div-inv70.1%
div-inv70.1%
metadata-eval70.1%
Applied egg-rr70.1%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.05e-17) (not (<= y 8.2e+29))) (+ 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.05e-17) || !(y <= 8.2e+29)) {
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.05d-17)) .or. (.not. (y <= 8.2d+29))) 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.05e-17) || !(y <= 8.2e+29)) {
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.05e-17) or not (y <= 8.2e+29): 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.05e-17) || !(y <= 8.2e+29)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.05e-17) || ~((y <= 8.2e+29))) 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.05e-17], N[Not[LessEqual[y, 8.2e+29]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{-17} \lor \neg \left(y \leq 8.2 \cdot 10^{+29}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2.05e-17 or 8.2000000000000007e29 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
neg-mul-199.0%
times-frac99.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 93.1%
*-commutative93.1%
metadata-eval93.1%
times-frac93.2%
*-rgt-identity93.2%
Simplified93.2%
if -2.05e-17 < y < 8.2000000000000007e29Initial program 85.2%
sub-neg85.2%
associate-+l+85.2%
distribute-frac-neg85.2%
neg-mul-185.2%
*-commutative85.2%
times-frac85.2%
fma-define85.2%
metadata-eval85.2%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y around 0 94.0%
Taylor expanded in t around inf 70.1%
div-inv70.1%
*-commutative70.1%
associate-*l*70.1%
Applied egg-rr70.1%
Taylor expanded in y around 0 70.1%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.6e-17) (not (<= y 1.02e+33))) (+ x (* y (/ -0.3333333333333333 z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e-17) || !(y <= 1.02e+33)) {
tmp = x + (y * (-0.3333333333333333 / z));
} 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 <= (-4.6d-17)) .or. (.not. (y <= 1.02d+33))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
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 <= -4.6e-17) || !(y <= 1.02e+33)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.6e-17) or not (y <= 1.02e+33): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.6e-17) || !(y <= 1.02e+33)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.6e-17) || ~((y <= 1.02e+33))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.6e-17], N[Not[LessEqual[y, 1.02e+33]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-17} \lor \neg \left(y \leq 1.02 \cdot 10^{+33}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -4.60000000000000018e-17 or 1.02000000000000001e33 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
neg-mul-199.0%
times-frac99.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 93.1%
if -4.60000000000000018e-17 < y < 1.02000000000000001e33Initial program 85.2%
sub-neg85.2%
associate-+l+85.2%
distribute-frac-neg85.2%
neg-mul-185.2%
*-commutative85.2%
times-frac85.2%
fma-define85.2%
metadata-eval85.2%
associate-*l*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in y around 0 94.0%
Taylor expanded in t around inf 70.1%
div-inv70.1%
*-commutative70.1%
associate-*l*70.1%
Applied egg-rr70.1%
Taylor expanded in y around 0 70.1%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (<= x -500000000000.0) x (if (<= x 1.3e+67) (* 0.3333333333333333 (/ (/ t z) y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -500000000000.0) {
tmp = x;
} else if (x <= 1.3e+67) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-500000000000.0d0)) then
tmp = x
else if (x <= 1.3d+67) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -500000000000.0) {
tmp = x;
} else if (x <= 1.3e+67) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -500000000000.0: tmp = x elif x <= 1.3e+67: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -500000000000.0) tmp = x; elseif (x <= 1.3e+67) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -500000000000.0) tmp = x; elseif (x <= 1.3e+67) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -500000000000.0], x, If[LessEqual[x, 1.3e+67], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -500000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+67}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5e11 or 1.3e67 < x Initial program 93.4%
sub-neg93.4%
associate-+l+93.4%
distribute-frac-neg93.4%
neg-mul-193.4%
*-commutative93.4%
times-frac93.4%
fma-define93.4%
metadata-eval93.4%
associate-*l*93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in x around inf 52.7%
if -5e11 < x < 1.3e67Initial program 91.2%
sub-neg91.2%
associate-+l+91.2%
distribute-frac-neg91.2%
neg-mul-191.2%
*-commutative91.2%
times-frac91.1%
fma-define91.1%
metadata-eval91.1%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y around 0 57.0%
Taylor expanded in t around inf 51.4%
associate-/l*51.4%
Applied egg-rr51.4%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 1.0 (* z -3.0)) (- y (/ t y)))))
double code(double x, double y, double z, double t) {
return x + ((1.0 / (z * -3.0)) * (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 + ((1.0d0 / (z * (-3.0d0))) * (y - (t / y)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((1.0 / (z * -3.0)) * (y - (t / y)));
}
def code(x, y, z, t): return x + ((1.0 / (z * -3.0)) * (y - (t / y)))
function code(x, y, z, t) return Float64(x + Float64(Float64(1.0 / Float64(z * -3.0)) * Float64(y - Float64(t / y)))) end
function tmp = code(x, y, z, t) tmp = x + ((1.0 / (z * -3.0)) * (y - (t / y))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(1.0 / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{1}{z \cdot -3} \cdot \left(y - \frac{t}{y}\right)
\end{array}
Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.1%
*-commutative92.1%
neg-mul-192.1%
times-frac95.3%
distribute-lft-out--95.7%
*-commutative95.7%
associate-/r*95.6%
metadata-eval95.6%
Simplified95.6%
clear-num95.7%
inv-pow95.7%
Applied egg-rr95.7%
unpow-195.7%
Simplified95.7%
Taylor expanded in z around 0 95.7%
*-commutative95.7%
Simplified95.7%
(FPCore (x y z t) :precision binary64 (+ x (* (/ -0.3333333333333333 z) (+ y (/ -1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t))));
}
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 + ((-1.0d0) / (y / t))))
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t))));
}
def code(x, y, z, t): return x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t))))
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y + Float64(-1.0 / Float64(y / t))))) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 / z) * (y + (-1.0 / (y / t)))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y + N[(-1.0 / N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333}{z} \cdot \left(y + \frac{-1}{\frac{y}{t}}\right)
\end{array}
Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.1%
*-commutative92.1%
neg-mul-192.1%
times-frac95.3%
distribute-lft-out--95.7%
*-commutative95.7%
associate-/r*95.6%
metadata-eval95.6%
Simplified95.6%
clear-num95.6%
inv-pow95.6%
Applied egg-rr95.6%
unpow-195.6%
Simplified95.6%
Final simplification95.6%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.1%
*-commutative92.1%
neg-mul-192.1%
times-frac95.3%
distribute-lft-out--95.7%
*-commutative95.7%
associate-/r*95.6%
metadata-eval95.6%
Simplified95.6%
Final simplification95.6%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.1%
*-commutative92.1%
neg-mul-192.1%
times-frac95.3%
distribute-lft-out--95.7%
*-commutative95.7%
associate-/r*95.6%
metadata-eval95.6%
Simplified95.6%
Taylor expanded in z around 0 95.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 92.2%
sub-neg92.2%
associate-+l+92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
times-frac92.1%
fma-define92.1%
metadata-eval92.1%
associate-*l*92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in x around inf 28.1%
(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 2024172
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))