
(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 22 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) -4e-66) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e-66) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + (-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 * 3.0d0) <= (-4d-66)) then
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
else
tmp = x + ((-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 * 3.0) <= -4e-66) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -4e-66: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) else: tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -4e-66) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); else tmp = Float64(x + 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 * 3.0) <= -4e-66) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); else tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e-66], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{-66}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -3.9999999999999999e-66Initial program 98.5%
if -3.9999999999999999e-66 < (*.f64 z #s(literal 3 binary64)) Initial program 90.9%
sub-neg90.9%
associate-+l+90.9%
remove-double-neg90.9%
distribute-frac-neg90.9%
sub-neg90.9%
distribute-frac-neg90.9%
neg-mul-190.9%
*-commutative90.9%
associate-/l*90.9%
*-commutative90.9%
neg-mul-190.9%
times-frac98.2%
distribute-lft-out--98.2%
*-commutative98.2%
associate-/r*98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in z around 0 98.2%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -4e-66) (+ (+ x (/ t (* z (* 3.0 y)))) (/ y (* z -3.0))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e-66) {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
} else {
tmp = x + (-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 * 3.0d0) <= (-4d-66)) then
tmp = (x + (t / (z * (3.0d0 * y)))) + (y / (z * (-3.0d0)))
else
tmp = x + ((-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 * 3.0) <= -4e-66) {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
} else {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -4e-66: tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)) else: tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -4e-66) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))) + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + 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 * 3.0) <= -4e-66) tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)); else tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e-66], N[(N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{-66}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -3.9999999999999999e-66Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
sub-neg98.5%
associate-*l*98.5%
*-commutative98.5%
distribute-frac-neg298.5%
distribute-rgt-neg-in98.5%
metadata-eval98.5%
Simplified98.5%
if -3.9999999999999999e-66 < (*.f64 z #s(literal 3 binary64)) Initial program 90.9%
sub-neg90.9%
associate-+l+90.9%
remove-double-neg90.9%
distribute-frac-neg90.9%
sub-neg90.9%
distribute-frac-neg90.9%
neg-mul-190.9%
*-commutative90.9%
associate-/l*90.9%
*-commutative90.9%
neg-mul-190.9%
times-frac98.2%
distribute-lft-out--98.2%
*-commutative98.2%
associate-/r*98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in z around 0 98.2%
Final simplification98.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1050000000.0) (not (<= y 900000000000.0))) (+ x (/ (/ y -3.0) z)) (+ x (/ (* 0.3333333333333333 (/ t z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1050000000.0) || !(y <= 900000000000.0)) {
tmp = x + ((y / -3.0) / z);
} 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 <= (-1050000000.0d0)) .or. (.not. (y <= 900000000000.0d0))) then
tmp = x + ((y / (-3.0d0)) / z)
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 <= -1050000000.0) || !(y <= 900000000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1050000000.0) or not (y <= 900000000000.0): tmp = x + ((y / -3.0) / z) else: tmp = x + ((0.3333333333333333 * (t / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1050000000.0) || !(y <= 900000000000.0)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); else tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1050000000.0) || ~((y <= 900000000000.0))) tmp = x + ((y / -3.0) / z); else tmp = x + ((0.3333333333333333 * (t / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1050000000.0], N[Not[LessEqual[y, 900000000000.0]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1050000000 \lor \neg \left(y \leq 900000000000\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.05e9 or 9e11 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
neg-mul-198.0%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 93.8%
metadata-eval93.8%
times-frac94.0%
*-commutative94.0%
*-rgt-identity94.0%
associate-/r*94.0%
Simplified94.0%
if -1.05e9 < y < 9e11Initial 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.3%
*-commutative89.3%
neg-mul-189.3%
times-frac93.8%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around 0 85.2%
associate-*r/85.2%
*-commutative85.2%
associate-/r*92.7%
associate-*r/92.8%
*-commutative92.8%
associate-*l/92.7%
Simplified92.7%
Taylor expanded in t around 0 92.8%
Final simplification93.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -850.0) (not (<= y 410000000.0))) (+ x (/ (/ y -3.0) z)) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -850.0) || !(y <= 410000000.0)) {
tmp = x + ((y / -3.0) / 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 <= (-850.0d0)) .or. (.not. (y <= 410000000.0d0))) then
tmp = x + ((y / (-3.0d0)) / 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 <= -850.0) || !(y <= 410000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -850.0) or not (y <= 410000000.0): tmp = x + ((y / -3.0) / z) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -850.0) || !(y <= 410000000.0)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); else tmp = Float64(x + 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 <= -850.0) || ~((y <= 410000000.0))) tmp = x + ((y / -3.0) / z); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -850.0], N[Not[LessEqual[y, 410000000.0]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -850 \lor \neg \left(y \leq 410000000\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -850 or 4.1e8 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
neg-mul-198.0%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 93.8%
metadata-eval93.8%
times-frac94.0%
*-commutative94.0%
*-rgt-identity94.0%
associate-/r*94.0%
Simplified94.0%
if -850 < y < 4.1e8Initial 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.3%
*-commutative89.3%
neg-mul-189.3%
times-frac93.8%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around 0 85.2%
associate-*r/85.2%
*-commutative85.2%
associate-/r*92.7%
associate-*r/92.8%
*-commutative92.8%
associate-*l/92.7%
Simplified92.7%
associate-/l/85.2%
*-commutative85.2%
times-frac92.7%
Applied egg-rr92.7%
Final simplification93.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -28.0) (not (<= y 42000000.0))) (+ x (/ (/ y -3.0) z)) (+ x (* 0.3333333333333333 (/ (/ t y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -28.0) || !(y <= 42000000.0)) {
tmp = x + ((y / -3.0) / z);
} 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 <= (-28.0d0)) .or. (.not. (y <= 42000000.0d0))) then
tmp = x + ((y / (-3.0d0)) / z)
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 <= -28.0) || !(y <= 42000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = x + (0.3333333333333333 * ((t / y) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -28.0) or not (y <= 42000000.0): tmp = x + ((y / -3.0) / z) else: tmp = x + (0.3333333333333333 * ((t / y) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -28.0) || !(y <= 42000000.0)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); 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 <= -28.0) || ~((y <= 42000000.0))) tmp = x + ((y / -3.0) / z); else tmp = x + (0.3333333333333333 * ((t / y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -28.0], N[Not[LessEqual[y, 42000000.0]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $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 -28 \lor \neg \left(y \leq 42000000\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\end{array}
\end{array}
if y < -28 or 4.2e7 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
neg-mul-198.0%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 93.8%
metadata-eval93.8%
times-frac94.0%
*-commutative94.0%
*-rgt-identity94.0%
associate-/r*94.0%
Simplified94.0%
if -28 < y < 4.2e7Initial 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.3%
*-commutative89.3%
neg-mul-189.3%
times-frac93.8%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in z around 0 93.8%
Taylor expanded in y around 0 85.2%
associate-/r*89.8%
Simplified89.8%
Final simplification91.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -240000000000.0) (not (<= y 14000000000000.0))) (+ x (/ (/ y -3.0) z)) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -240000000000.0) || !(y <= 14000000000000.0)) {
tmp = x + ((y / -3.0) / z);
} 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 <= (-240000000000.0d0)) .or. (.not. (y <= 14000000000000.0d0))) then
tmp = x + ((y / (-3.0d0)) / z)
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 <= -240000000000.0) || !(y <= 14000000000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -240000000000.0) or not (y <= 14000000000000.0): tmp = x + ((y / -3.0) / z) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -240000000000.0) || !(y <= 14000000000000.0)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); 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 <= -240000000000.0) || ~((y <= 14000000000000.0))) tmp = x + ((y / -3.0) / z); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -240000000000.0], N[Not[LessEqual[y, 14000000000000.0]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $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 -240000000000 \lor \neg \left(y \leq 14000000000000\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.4e11 or 1.4e13 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
sub-neg98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
neg-mul-198.0%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 93.8%
metadata-eval93.8%
times-frac94.0%
*-commutative94.0%
*-rgt-identity94.0%
associate-/r*94.0%
Simplified94.0%
if -2.4e11 < y < 1.4e13Initial 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.3%
*-commutative89.3%
neg-mul-189.3%
times-frac93.8%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around 0 85.2%
Final simplification89.1%
(FPCore (x y z t) :precision binary64 (if (or (<= x -6.5e+169) (not (<= x 8.2e+66))) (+ x (/ y (* z -3.0))) (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -6.5e+169) || !(x <= 8.2e+66)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-6.5d+169)) .or. (.not. (x <= 8.2d+66))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -6.5e+169) || !(x <= 8.2e+66)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -6.5e+169) or not (x <= 8.2e+66): tmp = x + (y / (z * -3.0)) else: tmp = (y - (t / y)) * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -6.5e+169) || !(x <= 8.2e+66)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -6.5e+169) || ~((x <= 8.2e+66))) tmp = x + (y / (z * -3.0)); else tmp = (y - (t / y)) * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -6.5e+169], N[Not[LessEqual[x, 8.2e+66]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+169} \lor \neg \left(x \leq 8.2 \cdot 10^{+66}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if x < -6.4999999999999995e169 or 8.19999999999999989e66 < x Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
sub-neg94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
neg-mul-194.5%
times-frac96.0%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*96.0%
metadata-eval96.0%
Simplified96.0%
Taylor expanded in y around inf 83.7%
*-commutative83.7%
clear-num83.8%
un-div-inv83.8%
div-inv83.8%
metadata-eval83.8%
Applied egg-rr83.8%
if -6.4999999999999995e169 < x < 8.19999999999999989e66Initial program 92.6%
+-commutative92.6%
associate-+r-92.6%
sub-neg92.6%
associate-*l*92.7%
*-commutative92.7%
distribute-frac-neg292.7%
distribute-rgt-neg-in92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in z around 0 84.8%
Taylor expanded in t around 0 80.8%
associate-*r/80.8%
associate-*l/80.8%
*-commutative80.8%
associate-*r/80.8%
metadata-eval80.8%
distribute-lft-neg-in80.8%
distribute-rgt-neg-in80.8%
*-commutative80.8%
times-frac84.9%
distribute-rgt-out84.9%
distribute-neg-frac84.9%
unsub-neg84.9%
Simplified84.9%
Final simplification84.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -7e+169) (not (<= x 1.5e+67))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7e+169) || !(x <= 1.5e+67)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (((t / y) - 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 ((x <= (-7d+169)) .or. (.not. (x <= 1.5d+67))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -7e+169) || !(x <= 1.5e+67)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -7e+169) or not (x <= 1.5e+67): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (((t / y) - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -7e+169) || !(x <= 1.5e+67)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -7e+169) || ~((x <= 1.5e+67))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (((t / y) - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -7e+169], N[Not[LessEqual[x, 1.5e+67]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7 \cdot 10^{+169} \lor \neg \left(x \leq 1.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\end{array}
\end{array}
if x < -7.00000000000000038e169 or 1.50000000000000005e67 < x Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
sub-neg94.5%
distribute-frac-neg94.5%
neg-mul-194.5%
*-commutative94.5%
associate-/l*94.5%
*-commutative94.5%
neg-mul-194.5%
times-frac96.0%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*96.0%
metadata-eval96.0%
Simplified96.0%
Taylor expanded in y around inf 83.7%
*-commutative83.7%
clear-num83.8%
un-div-inv83.8%
div-inv83.8%
metadata-eval83.8%
Applied egg-rr83.8%
if -7.00000000000000038e169 < x < 1.50000000000000005e67Initial program 92.6%
sub-neg92.6%
associate-+l+92.6%
remove-double-neg92.6%
distribute-frac-neg92.6%
sub-neg92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
neg-mul-192.6%
times-frac96.6%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.6%
metadata-eval96.6%
Simplified96.6%
Taylor expanded in z around 0 96.5%
Taylor expanded in x around 0 84.8%
associate-*r/84.8%
remove-double-neg84.8%
neg-mul-184.8%
times-frac84.8%
metadata-eval84.8%
distribute-frac-neg284.8%
distribute-neg-frac84.8%
neg-sub084.8%
associate-+l-84.8%
neg-sub084.8%
+-commutative84.8%
unsub-neg84.8%
Simplified84.8%
Final simplification84.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.25e-152) (not (<= y 2000000.0))) (+ x (/ (/ y -3.0) z)) (/ (/ (* t 0.3333333333333333) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.25e-152) || !(y <= 2000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = ((t * 0.3333333333333333) / 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 <= (-3.25d-152)) .or. (.not. (y <= 2000000.0d0))) then
tmp = x + ((y / (-3.0d0)) / z)
else
tmp = ((t * 0.3333333333333333d0) / z) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.25e-152) || !(y <= 2000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = ((t * 0.3333333333333333) / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.25e-152) or not (y <= 2000000.0): tmp = x + ((y / -3.0) / z) else: tmp = ((t * 0.3333333333333333) / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.25e-152) || !(y <= 2000000.0)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); else tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.25e-152) || ~((y <= 2000000.0))) tmp = x + ((y / -3.0) / z); else tmp = ((t * 0.3333333333333333) / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.25e-152], N[Not[LessEqual[y, 2000000.0]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.25 \cdot 10^{-152} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -3.2500000000000001e-152 or 2e6 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
sub-neg97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
neg-mul-197.6%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 86.5%
metadata-eval86.5%
times-frac86.7%
*-commutative86.7%
*-rgt-identity86.7%
associate-/r*86.7%
Simplified86.7%
if -3.2500000000000001e-152 < y < 2e6Initial program 87.8%
+-commutative87.8%
associate-+r-87.8%
sub-neg87.8%
associate-*l*87.8%
*-commutative87.8%
distribute-frac-neg287.8%
distribute-rgt-neg-in87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in z around 0 69.3%
Taylor expanded in t around 0 66.1%
associate-*r/66.1%
associate-*l/66.1%
*-commutative66.1%
associate-*r/66.1%
metadata-eval66.1%
distribute-lft-neg-in66.1%
distribute-rgt-neg-in66.1%
*-commutative66.1%
times-frac69.3%
distribute-rgt-out69.3%
distribute-neg-frac69.3%
unsub-neg69.3%
Simplified69.3%
Taylor expanded in y around 0 62.8%
associate-*r/84.5%
*-commutative84.5%
associate-/r*93.6%
associate-*r/93.6%
*-commutative93.6%
associate-*l/93.6%
Simplified69.9%
Final simplification79.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.05e-110) (not (<= y 8.8e-126))) (+ x (/ (/ y -3.0) z)) (/ (/ (* t 0.3333333333333333) y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.05e-110) || !(y <= 8.8e-126)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = ((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 <= (-1.05d-110)) .or. (.not. (y <= 8.8d-126))) then
tmp = x + ((y / (-3.0d0)) / z)
else
tmp = ((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 <= -1.05e-110) || !(y <= 8.8e-126)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = ((t * 0.3333333333333333) / y) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.05e-110) or not (y <= 8.8e-126): tmp = x + ((y / -3.0) / z) else: tmp = ((t * 0.3333333333333333) / y) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.05e-110) || !(y <= 8.8e-126)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); else tmp = 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 <= -1.05e-110) || ~((y <= 8.8e-126))) tmp = x + ((y / -3.0) / z); else tmp = ((t * 0.3333333333333333) / y) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.05e-110], N[Not[LessEqual[y, 8.8e-126]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{-110} \lor \neg \left(y \leq 8.8 \cdot 10^{-126}\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{y}}{z}\\
\end{array}
\end{array}
if y < -1.05000000000000001e-110 or 8.80000000000000058e-126 < y Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
sub-neg97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
associate-/l*97.3%
*-commutative97.3%
neg-mul-197.3%
times-frac99.1%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in z around 0 99.0%
Taylor expanded in y around inf 81.9%
metadata-eval81.9%
times-frac82.0%
*-commutative82.0%
*-rgt-identity82.0%
associate-/r*82.0%
Simplified82.0%
if -1.05000000000000001e-110 < y < 8.80000000000000058e-126Initial program 86.0%
+-commutative86.0%
associate-+r-86.0%
sub-neg86.0%
associate-*l*86.0%
*-commutative86.0%
distribute-frac-neg286.0%
distribute-rgt-neg-in86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around 0 70.3%
Taylor expanded in y around 0 70.3%
associate-*r/70.3%
Simplified70.3%
Final simplification77.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.4e-108) (not (<= y 8.2e-126))) (+ x (/ (/ y -3.0) z)) (/ (* (/ t y) 0.3333333333333333) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.4e-108) || !(y <= 8.2e-126)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = ((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 <= (-2.4d-108)) .or. (.not. (y <= 8.2d-126))) then
tmp = x + ((y / (-3.0d0)) / z)
else
tmp = ((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 <= -2.4e-108) || !(y <= 8.2e-126)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = ((t / y) * 0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.4e-108) or not (y <= 8.2e-126): tmp = x + ((y / -3.0) / z) else: tmp = ((t / y) * 0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.4e-108) || !(y <= 8.2e-126)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); else tmp = 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 <= -2.4e-108) || ~((y <= 8.2e-126))) tmp = x + ((y / -3.0) / z); else tmp = ((t / y) * 0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.4e-108], N[Not[LessEqual[y, 8.2e-126]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / y), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-108} \lor \neg \left(y \leq 8.2 \cdot 10^{-126}\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{y} \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.40000000000000017e-108 or 8.1999999999999995e-126 < y Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
sub-neg97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
associate-/l*97.3%
*-commutative97.3%
neg-mul-197.3%
times-frac99.1%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in z around 0 99.0%
Taylor expanded in y around inf 81.9%
metadata-eval81.9%
times-frac82.0%
*-commutative82.0%
*-rgt-identity82.0%
associate-/r*82.0%
Simplified82.0%
if -2.40000000000000017e-108 < y < 8.1999999999999995e-126Initial program 86.0%
+-commutative86.0%
associate-+r-86.0%
sub-neg86.0%
associate-*l*86.0%
*-commutative86.0%
distribute-frac-neg286.0%
distribute-rgt-neg-in86.0%
metadata-eval86.0%
Simplified86.0%
Taylor expanded in z around 0 70.3%
Taylor expanded in y around 0 70.3%
Final simplification77.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.4e-108) (not (<= y 2000000.0))) (+ x (/ (/ y -3.0) z)) (* t (/ 0.3333333333333333 (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.4e-108) || !(y <= 2000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.4d-108)) .or. (.not. (y <= 2000000.0d0))) then
tmp = x + ((y / (-3.0d0)) / z)
else
tmp = t * (0.3333333333333333d0 / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.4e-108) || !(y <= 2000000.0)) {
tmp = x + ((y / -3.0) / z);
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.4e-108) or not (y <= 2000000.0): tmp = x + ((y / -3.0) / z) else: tmp = t * (0.3333333333333333 / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.4e-108) || !(y <= 2000000.0)) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); else tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.4e-108) || ~((y <= 2000000.0))) tmp = x + ((y / -3.0) / z); else tmp = t * (0.3333333333333333 / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.4e-108], N[Not[LessEqual[y, 2000000.0]], $MachinePrecision]], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{-108} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.40000000000000017e-108 or 2e6 < y Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
sub-neg97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.5%
*-commutative97.5%
neg-mul-197.5%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around 0 99.6%
Taylor expanded in y around inf 88.2%
metadata-eval88.2%
times-frac88.3%
*-commutative88.3%
*-rgt-identity88.3%
associate-/r*88.4%
Simplified88.4%
if -2.40000000000000017e-108 < y < 2e6Initial program 88.3%
+-commutative88.3%
associate-+r-88.3%
sub-neg88.3%
associate-*l*88.3%
*-commutative88.3%
distribute-frac-neg288.3%
distribute-rgt-neg-in88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in z around 0 68.9%
Taylor expanded in y around 0 62.7%
associate-*r/62.7%
*-commutative62.7%
associate-*r/62.2%
Simplified62.2%
Final simplification75.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.85e-108) (not (<= y 11500000000.0))) (+ x (/ y (* z -3.0))) (* t (/ 0.3333333333333333 (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.85e-108) || !(y <= 11500000000.0)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.85d-108)) .or. (.not. (y <= 11500000000.0d0))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = t * (0.3333333333333333d0 / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.85e-108) || !(y <= 11500000000.0)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.85e-108) or not (y <= 11500000000.0): tmp = x + (y / (z * -3.0)) else: tmp = t * (0.3333333333333333 / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.85e-108) || !(y <= 11500000000.0)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.85e-108) || ~((y <= 11500000000.0))) tmp = x + (y / (z * -3.0)); else tmp = t * (0.3333333333333333 / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.85e-108], N[Not[LessEqual[y, 11500000000.0]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{-108} \lor \neg \left(y \leq 11500000000\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.85e-108 or 1.15e10 < y Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
sub-neg97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.5%
*-commutative97.5%
neg-mul-197.5%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 88.2%
*-commutative88.2%
clear-num88.1%
un-div-inv88.2%
div-inv88.3%
metadata-eval88.3%
Applied egg-rr88.3%
if -2.85e-108 < y < 1.15e10Initial program 88.3%
+-commutative88.3%
associate-+r-88.3%
sub-neg88.3%
associate-*l*88.3%
*-commutative88.3%
distribute-frac-neg288.3%
distribute-rgt-neg-in88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in z around 0 68.9%
Taylor expanded in y around 0 62.7%
associate-*r/62.7%
*-commutative62.7%
associate-*r/62.2%
Simplified62.2%
Final simplification75.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.4e-111) (not (<= y 2000000.0))) (+ x (* -0.3333333333333333 (/ y z))) (* t (/ 0.3333333333333333 (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-111) || !(y <= 2000000.0)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = t * (0.3333333333333333 / (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 <= (-3.4d-111)) .or. (.not. (y <= 2000000.0d0))) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else
tmp = t * (0.3333333333333333d0 / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-111) || !(y <= 2000000.0)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = t * (0.3333333333333333 / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.4e-111) or not (y <= 2000000.0): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = t * (0.3333333333333333 / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.4e-111) || !(y <= 2000000.0)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.4e-111) || ~((y <= 2000000.0))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = t * (0.3333333333333333 / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.4e-111], N[Not[LessEqual[y, 2000000.0]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{-111} \lor \neg \left(y \leq 2000000\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\end{array}
\end{array}
if y < -3.39999999999999997e-111 or 2e6 < y Initial program 97.6%
sub-neg97.6%
associate-+l+97.6%
remove-double-neg97.6%
distribute-frac-neg97.6%
sub-neg97.6%
distribute-frac-neg97.6%
neg-mul-197.6%
*-commutative97.6%
associate-/l*97.5%
*-commutative97.5%
neg-mul-197.5%
times-frac99.7%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 88.2%
if -3.39999999999999997e-111 < y < 2e6Initial program 88.3%
+-commutative88.3%
associate-+r-88.3%
sub-neg88.3%
associate-*l*88.3%
*-commutative88.3%
distribute-frac-neg288.3%
distribute-rgt-neg-in88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in z around 0 68.9%
Taylor expanded in y around 0 62.7%
associate-*r/62.7%
*-commutative62.7%
associate-*r/62.2%
Simplified62.2%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.3e-112)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 2000000.0)
(* t (/ 0.3333333333333333 (* z y)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-112) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 2000000.0) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.3d-112)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 2000000.0d0) then
tmp = t * (0.3333333333333333d0 / (z * y))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-112) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 2000000.0) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-112: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 2000000.0: tmp = t * (0.3333333333333333 / (z * y)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-112) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 2000000.0) tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.3e-112) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 2000000.0) tmp = t * (0.3333333333333333 / (z * y)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-112], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2000000.0], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-112}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2000000:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.3000000000000001e-112Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
sub-neg96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.3%
*-commutative96.3%
neg-mul-196.3%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 82.8%
if -3.3000000000000001e-112 < y < 2e6Initial program 88.3%
+-commutative88.3%
associate-+r-88.3%
sub-neg88.3%
associate-*l*88.3%
*-commutative88.3%
distribute-frac-neg288.3%
distribute-rgt-neg-in88.3%
metadata-eval88.3%
Simplified88.3%
Taylor expanded in z around 0 68.9%
Taylor expanded in y around 0 62.7%
associate-*r/62.7%
*-commutative62.7%
associate-*r/62.2%
Simplified62.2%
if 2e6 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.6%
*-commutative99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 97.0%
Final simplification75.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.7e+15)
(/ (/ y z) -3.0)
(if (<= y 2600000.0)
(* t (/ 0.3333333333333333 (* z y)))
(/ (/ y 3.0) (- z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e+15) {
tmp = (y / z) / -3.0;
} else if (y <= 2600000.0) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = (y / 3.0) / -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.7d+15)) then
tmp = (y / z) / (-3.0d0)
else if (y <= 2600000.0d0) then
tmp = t * (0.3333333333333333d0 / (z * y))
else
tmp = (y / 3.0d0) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e+15) {
tmp = (y / z) / -3.0;
} else if (y <= 2600000.0) {
tmp = t * (0.3333333333333333 / (z * y));
} else {
tmp = (y / 3.0) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e+15: tmp = (y / z) / -3.0 elif y <= 2600000.0: tmp = t * (0.3333333333333333 / (z * y)) else: tmp = (y / 3.0) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e+15) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= 2600000.0) tmp = Float64(t * Float64(0.3333333333333333 / Float64(z * y))); else tmp = Float64(Float64(y / 3.0) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.7e+15) tmp = (y / z) / -3.0; elseif (y <= 2600000.0) tmp = t * (0.3333333333333333 / (z * y)); else tmp = (y / 3.0) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e+15], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, 2600000.0], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / 3.0), $MachinePrecision] / (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq 2600000:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{3}}{-z}\\
\end{array}
\end{array}
if y < -2.7e15Initial program 96.7%
sub-neg96.7%
associate-+l+96.7%
remove-double-neg96.7%
distribute-frac-neg96.7%
sub-neg96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.7%
*-commutative96.7%
neg-mul-196.7%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 91.0%
Taylor expanded in x around 0 68.7%
associate-*r/68.7%
metadata-eval68.7%
div-inv68.8%
associate-/l/68.8%
associate-/r*68.8%
Applied egg-rr68.8%
if -2.7e15 < y < 2.6e6Initial program 89.3%
+-commutative89.3%
associate-+r-89.3%
sub-neg89.3%
associate-*l*89.3%
*-commutative89.3%
distribute-frac-neg289.3%
distribute-rgt-neg-in89.3%
metadata-eval89.3%
Simplified89.3%
Taylor expanded in z around 0 66.6%
Taylor expanded in y around 0 60.0%
associate-*r/60.0%
*-commutative60.0%
associate-*r/59.6%
Simplified59.6%
if 2.6e6 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.6%
*-commutative99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 97.1%
Taylor expanded in x around 0 70.2%
associate-*r/70.3%
metadata-eval70.3%
div-inv70.4%
frac-2neg70.4%
div-inv70.3%
metadata-eval70.3%
*-commutative70.3%
distribute-rgt-neg-in70.3%
add-sqr-sqrt0.0%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod1.8%
add-sqr-sqrt1.8%
Applied egg-rr1.8%
*-commutative1.8%
metadata-eval1.8%
div-inv1.8%
frac-2neg1.8%
add-sqr-sqrt0.0%
sqrt-unprod48.4%
sqr-neg48.4%
sqrt-unprod70.2%
add-sqr-sqrt70.4%
metadata-eval70.4%
Applied egg-rr70.4%
Final simplification64.0%
(FPCore (x y z t) :precision binary64 (if (<= x -2.5e+81) x (if (<= x 1.76e+62) (/ (/ y z) -3.0) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.5e+81) {
tmp = x;
} else if (x <= 1.76e+62) {
tmp = (y / z) / -3.0;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.5d+81)) then
tmp = x
else if (x <= 1.76d+62) then
tmp = (y / z) / (-3.0d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.5e+81) {
tmp = x;
} else if (x <= 1.76e+62) {
tmp = (y / z) / -3.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.5e+81: tmp = x elif x <= 1.76e+62: tmp = (y / z) / -3.0 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.5e+81) tmp = x; elseif (x <= 1.76e+62) tmp = Float64(Float64(y / z) / -3.0); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.5e+81) tmp = x; elseif (x <= 1.76e+62) tmp = (y / z) / -3.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.5e+81], x, If[LessEqual[x, 1.76e+62], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.76 \cdot 10^{+62}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.4999999999999999e81 or 1.76e62 < x Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
sub-neg93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
neg-mul-193.9%
times-frac96.0%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x around inf 57.7%
if -2.4999999999999999e81 < x < 1.76e62Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
sub-neg92.8%
distribute-frac-neg92.8%
neg-mul-192.8%
*-commutative92.8%
associate-/l*92.7%
*-commutative92.7%
neg-mul-192.7%
times-frac96.6%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in y around inf 52.5%
Taylor expanded in x around 0 44.1%
associate-*r/44.2%
metadata-eval44.2%
div-inv44.2%
associate-/l/44.2%
associate-/r*44.2%
Applied egg-rr44.2%
(FPCore (x y z t) :precision binary64 (if (<= x -2.2e+82) x (if (<= x 3.3e+62) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e+82) {
tmp = x;
} else if (x <= 3.3e+62) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-2.2d+82)) then
tmp = x
else if (x <= 3.3d+62) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.2e+82) {
tmp = x;
} else if (x <= 3.3e+62) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.2e+82: tmp = x elif x <= 3.3e+62: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.2e+82) tmp = x; elseif (x <= 3.3e+62) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.2e+82) tmp = x; elseif (x <= 3.3e+62) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.2e+82], x, If[LessEqual[x, 3.3e+62], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.2 \cdot 10^{+82}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+62}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.2000000000000001e82 or 3.3e62 < x Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
sub-neg93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
neg-mul-193.9%
times-frac96.0%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x around inf 57.7%
if -2.2000000000000001e82 < x < 3.3e62Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
sub-neg92.8%
distribute-frac-neg92.8%
neg-mul-192.8%
*-commutative92.8%
associate-/l*92.7%
*-commutative92.7%
neg-mul-192.7%
times-frac96.6%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in y around inf 52.5%
Taylor expanded in x around 0 44.1%
associate-*r/44.2%
metadata-eval44.2%
div-inv44.2%
associate-/l/44.2%
Applied egg-rr44.2%
(FPCore (x y z t) :precision binary64 (if (<= x -1.75e+81) x (if (<= x 5.5e+60) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e+81) {
tmp = x;
} else if (x <= 5.5e+60) {
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 (x <= (-1.75d+81)) then
tmp = x
else if (x <= 5.5d+60) 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 (x <= -1.75e+81) {
tmp = x;
} else if (x <= 5.5e+60) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.75e+81: tmp = x elif x <= 5.5e+60: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.75e+81) tmp = x; elseif (x <= 5.5e+60) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.75e+81) tmp = x; elseif (x <= 5.5e+60) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.75e+81], x, If[LessEqual[x, 5.5e+60], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+60}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.75e81 or 5.5000000000000001e60 < x Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
sub-neg93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
neg-mul-193.9%
times-frac96.0%
distribute-lft-out--96.0%
*-commutative96.0%
associate-/r*95.9%
metadata-eval95.9%
Simplified95.9%
Taylor expanded in x around inf 57.7%
if -1.75e81 < x < 5.5000000000000001e60Initial program 92.8%
sub-neg92.8%
associate-+l+92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
sub-neg92.8%
distribute-frac-neg92.8%
neg-mul-192.8%
*-commutative92.8%
associate-/l*92.7%
*-commutative92.7%
neg-mul-192.7%
times-frac96.6%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.7%
metadata-eval96.7%
Simplified96.7%
Taylor expanded in y around inf 52.5%
Taylor expanded in x around 0 44.1%
(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 93.2%
sub-neg93.2%
associate-+l+93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
sub-neg93.2%
distribute-frac-neg93.2%
neg-mul-193.2%
*-commutative93.2%
associate-/l*93.1%
*-commutative93.1%
neg-mul-193.1%
times-frac96.4%
distribute-lft-out--96.4%
*-commutative96.4%
associate-/r*96.4%
metadata-eval96.4%
Simplified96.4%
Final simplification96.4%
(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 93.2%
sub-neg93.2%
associate-+l+93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
sub-neg93.2%
distribute-frac-neg93.2%
neg-mul-193.2%
*-commutative93.2%
associate-/l*93.1%
*-commutative93.1%
neg-mul-193.1%
times-frac96.4%
distribute-lft-out--96.4%
*-commutative96.4%
associate-/r*96.4%
metadata-eval96.4%
Simplified96.4%
Taylor expanded in z around 0 96.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 93.2%
sub-neg93.2%
associate-+l+93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
sub-neg93.2%
distribute-frac-neg93.2%
neg-mul-193.2%
*-commutative93.2%
associate-/l*93.1%
*-commutative93.1%
neg-mul-193.1%
times-frac96.4%
distribute-lft-out--96.4%
*-commutative96.4%
associate-/r*96.4%
metadata-eval96.4%
Simplified96.4%
Taylor expanded in x around inf 28.0%
(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 2024146
(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))))