
(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 16 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
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= (+ t_1 (/ t (* y (* z 3.0)))) 1e+307)
(+ t_1 (/ t (* 3.0 (* y z))))
(+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((t_1 + (t / (y * (z * 3.0)))) <= 1e+307) {
tmp = t_1 + (t / (3.0 * (y * z)));
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y / (z * 3.0d0))
if ((t_1 + (t / (y * (z * 3.0d0)))) <= 1d+307) then
tmp = t_1 + (t / (3.0d0 * (y * z)))
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 t_1 = x - (y / (z * 3.0));
double tmp;
if ((t_1 + (t / (y * (z * 3.0)))) <= 1e+307) {
tmp = t_1 + (t / (3.0 * (y * z)));
} else {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if (t_1 + (t / (y * (z * 3.0)))) <= 1e+307: tmp = t_1 + (t / (3.0 * (y * z))) else: tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (Float64(t_1 + Float64(t / Float64(y * Float64(z * 3.0)))) <= 1e+307) tmp = Float64(t_1 + Float64(t / Float64(3.0 * Float64(y * z)))); 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) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if ((t_1 + (t / (y * (z * 3.0)))) <= 1e+307) tmp = t_1 + (t / (3.0 * (y * z))); else tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+307], N[(t$95$1 + N[(t / N[(3.0 * N[(y * z), $MachinePrecision]), $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}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;t_1 + \frac{t}{y \cdot \left(z \cdot 3\right)} \leq 10^{+307}:\\
\;\;\;\;t_1 + \frac{t}{3 \cdot \left(y \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 9.99999999999999986e306Initial program 99.3%
Taylor expanded in z around 0 99.4%
if 9.99999999999999986e306 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) Initial program 82.1%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -5e+49)
(+
(+ x (* -0.3333333333333333 (/ y z)))
(/ (* 0.3333333333333333 (/ t z)) y))
(+ x (/ (* -0.3333333333333333 (- y (/ t y))) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e+49) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / 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 <= (-5d+49)) then
tmp = (x + ((-0.3333333333333333d0) * (y / z))) + ((0.3333333333333333d0 * (t / z)) / 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 <= -5e+49) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5e+49: tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5e+49) tmp = Float64(Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5e+49) tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e+49], N[(N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+49}:\\
\;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\end{array}
\end{array}
if z < -5.0000000000000004e49Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
metadata-eval99.7%
associate-/l/90.7%
associate-/l/90.8%
Simplified90.8%
associate-/l/90.7%
*-un-lft-identity90.7%
times-frac90.7%
associate-/l/90.8%
times-frac99.8%
associate-*l*99.7%
*-commutative99.7%
times-frac99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*l/99.6%
*-lft-identity99.6%
Simplified99.6%
if -5.0000000000000004e49 < z Initial program 95.4%
Simplified97.3%
associate-*l/97.4%
Applied egg-rr97.4%
Final simplification98.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 0.3333333333333333 (* z (/ y t)))))
(if (<= y -3.15e-15)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y -2.8e-38)
t_1
(if (<= y -2.3e-68)
x
(if (<= y 4.8e-141) t_1 (+ x (/ (* y -0.3333333333333333) z))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 / (z * (y / t));
double tmp;
if (y <= -3.15e-15) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= -2.8e-38) {
tmp = t_1;
} else if (y <= -2.3e-68) {
tmp = x;
} else if (y <= 4.8e-141) {
tmp = t_1;
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 0.3333333333333333d0 / (z * (y / t))
if (y <= (-3.15d-15)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= (-2.8d-38)) then
tmp = t_1
else if (y <= (-2.3d-68)) then
tmp = x
else if (y <= 4.8d-141) then
tmp = t_1
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 / (z * (y / t));
double tmp;
if (y <= -3.15e-15) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= -2.8e-38) {
tmp = t_1;
} else if (y <= -2.3e-68) {
tmp = x;
} else if (y <= 4.8e-141) {
tmp = t_1;
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 / (z * (y / t)) tmp = 0 if y <= -3.15e-15: tmp = x - ((y / z) * 0.3333333333333333) elif y <= -2.8e-38: tmp = t_1 elif y <= -2.3e-68: tmp = x elif y <= 4.8e-141: tmp = t_1 else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 / Float64(z * Float64(y / t))) tmp = 0.0 if (y <= -3.15e-15) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= -2.8e-38) tmp = t_1; elseif (y <= -2.3e-68) tmp = x; elseif (y <= 4.8e-141) tmp = t_1; else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 / (z * (y / t)); tmp = 0.0; if (y <= -3.15e-15) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= -2.8e-38) tmp = t_1; elseif (y <= -2.3e-68) tmp = x; elseif (y <= 4.8e-141) tmp = t_1; else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.15e-15], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-38], t$95$1, If[LessEqual[y, -2.3e-68], x, If[LessEqual[y, 4.8e-141], t$95$1, N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\mathbf{if}\;y \leq -3.15 \cdot 10^{-15}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-68}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-141}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.14999999999999991e-15Initial program 98.2%
Taylor expanded in t around 0 90.1%
if -3.14999999999999991e-15 < y < -2.8e-38 or -2.29999999999999997e-68 < y < 4.8000000000000002e-141Initial program 91.2%
Taylor expanded in z around 0 91.3%
Taylor expanded in x around 0 68.3%
associate-*r/68.3%
*-commutative68.3%
times-frac70.6%
associate-*r/70.6%
*-commutative70.6%
associate-*r/70.6%
div-sub70.6%
distribute-lft-out--70.6%
associate-/l*70.5%
Simplified70.5%
Taylor expanded in t around inf 68.3%
associate-/l*74.6%
associate-/r/70.6%
Simplified70.6%
if -2.8e-38 < y < -2.29999999999999997e-68Initial program 99.8%
Simplified99.8%
Taylor expanded in x around inf 89.1%
if 4.8000000000000002e-141 < y Initial program 99.8%
Simplified96.8%
associate-*l/96.9%
Applied egg-rr96.9%
Taylor expanded in y around inf 73.5%
*-commutative73.5%
Simplified73.5%
Final simplification77.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2e-14)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y -5.4e-38)
(/ 0.3333333333333333 (/ z (/ t y)))
(if (<= y -2.5e-71)
x
(if (<= y 4.8e-141)
(/ 0.3333333333333333 (* z (/ y t)))
(+ x (/ (* y -0.3333333333333333) z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-14) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= -5.4e-38) {
tmp = 0.3333333333333333 / (z / (t / y));
} else if (y <= -2.5e-71) {
tmp = x;
} else if (y <= 4.8e-141) {
tmp = 0.3333333333333333 / (z * (y / t));
} 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 <= (-2d-14)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= (-5.4d-38)) then
tmp = 0.3333333333333333d0 / (z / (t / y))
else if (y <= (-2.5d-71)) then
tmp = x
else if (y <= 4.8d-141) then
tmp = 0.3333333333333333d0 / (z * (y / t))
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 <= -2e-14) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= -5.4e-38) {
tmp = 0.3333333333333333 / (z / (t / y));
} else if (y <= -2.5e-71) {
tmp = x;
} else if (y <= 4.8e-141) {
tmp = 0.3333333333333333 / (z * (y / t));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e-14: tmp = x - ((y / z) * 0.3333333333333333) elif y <= -5.4e-38: tmp = 0.3333333333333333 / (z / (t / y)) elif y <= -2.5e-71: tmp = x elif y <= 4.8e-141: tmp = 0.3333333333333333 / (z * (y / t)) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e-14) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= -5.4e-38) tmp = Float64(0.3333333333333333 / Float64(z / Float64(t / y))); elseif (y <= -2.5e-71) tmp = x; elseif (y <= 4.8e-141) tmp = Float64(0.3333333333333333 / Float64(z * Float64(y / t))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2e-14) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= -5.4e-38) tmp = 0.3333333333333333 / (z / (t / y)); elseif (y <= -2.5e-71) tmp = x; elseif (y <= 4.8e-141) tmp = 0.3333333333333333 / (z * (y / t)); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e-14], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.4e-38], N[(0.3333333333333333 / N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-71], x, If[LessEqual[y, 4.8e-141], N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-14}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-38}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y}}}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-71}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-141}:\\
\;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2e-14Initial program 98.2%
Taylor expanded in t around 0 90.1%
if -2e-14 < y < -5.40000000000000011e-38Initial program 100.0%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 76.3%
associate-*r/76.3%
*-commutative76.3%
times-frac76.1%
associate-*r/76.3%
*-commutative76.3%
associate-*r/76.3%
div-sub76.3%
distribute-lft-out--76.3%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in t around inf 76.5%
if -5.40000000000000011e-38 < y < -2.49999999999999999e-71Initial program 99.8%
Simplified99.8%
Taylor expanded in x around inf 89.1%
if -2.49999999999999999e-71 < y < 4.8000000000000002e-141Initial program 90.3%
Taylor expanded in z around 0 90.4%
Taylor expanded in x around 0 67.5%
associate-*r/67.5%
*-commutative67.5%
times-frac70.0%
associate-*r/70.0%
*-commutative70.0%
associate-*r/70.0%
div-sub70.0%
distribute-lft-out--70.0%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in t around inf 67.5%
associate-/l*74.4%
associate-/r/70.0%
Simplified70.0%
if 4.8000000000000002e-141 < y Initial program 99.8%
Simplified96.8%
associate-*l/96.9%
Applied egg-rr96.9%
Taylor expanded in y around inf 73.5%
*-commutative73.5%
Simplified73.5%
Final simplification77.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.5e-192) (not (<= y 2.7e-84))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (/ (* 0.3333333333333333 (/ t z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e-192) || !(y <= 2.7e-84)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / 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 <= (-5.5d-192)) .or. (.not. (y <= 2.7d-84))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / 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 <= -5.5e-192) || !(y <= 2.7e-84)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.5e-192) or not (y <= 2.7e-84): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + ((0.3333333333333333 * (t / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.5e-192) || !(y <= 2.7e-84)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / 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 <= -5.5e-192) || ~((y <= 2.7e-84))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + ((0.3333333333333333 * (t / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e-192], N[Not[LessEqual[y, 2.7e-84]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $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 -5.5 \cdot 10^{-192} \lor \neg \left(y \leq 2.7 \cdot 10^{-84}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -5.49999999999999995e-192 or 2.6999999999999999e-84 < y Initial program 98.3%
Simplified98.8%
if -5.49999999999999995e-192 < y < 2.6999999999999999e-84Initial program 90.9%
Simplified86.2%
Taylor expanded in y around 0 90.8%
associate-/r*86.3%
associate-*r/86.2%
*-commutative86.2%
associate-*r/86.2%
Simplified86.2%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 99.6%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.5e-192) (not (<= y 8.2e-84))) (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)) (+ x (/ (* 0.3333333333333333 (/ t z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.5e-192) || !(y <= 8.2e-84)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / 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 <= (-5.5d-192)) .or. (.not. (y <= 8.2d-84))) then
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / 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 <= -5.5e-192) || !(y <= 8.2e-84)) {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
} else {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.5e-192) or not (y <= 8.2e-84): tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) else: tmp = x + ((0.3333333333333333 * (t / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.5e-192) || !(y <= 8.2e-84)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / 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 <= -5.5e-192) || ~((y <= 8.2e-84))) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); else tmp = x + ((0.3333333333333333 * (t / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.5e-192], N[Not[LessEqual[y, 8.2e-84]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $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 -5.5 \cdot 10^{-192} \lor \neg \left(y \leq 8.2 \cdot 10^{-84}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -5.49999999999999995e-192 or 8.2000000000000001e-84 < y Initial program 98.3%
Simplified98.8%
associate-*l/98.9%
Applied egg-rr98.9%
if -5.49999999999999995e-192 < y < 8.2000000000000001e-84Initial program 90.9%
Simplified86.2%
Taylor expanded in y around 0 90.8%
associate-/r*86.3%
associate-*r/86.2%
*-commutative86.2%
associate-*r/86.2%
Simplified86.2%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 99.6%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -5.5e-192)
(+ x (* -0.3333333333333333 (/ t_1 z)))
(if (<= y 4.5e-85)
(+ x (/ (* 0.3333333333333333 (/ t z)) y))
(+ x (/ (* -0.3333333333333333 t_1) z))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -5.5e-192) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 4.5e-85) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 * t_1) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-5.5d-192)) then
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
else if (y <= 4.5d-85) then
tmp = x + ((0.3333333333333333d0 * (t / z)) / y)
else
tmp = x + (((-0.3333333333333333d0) * t_1) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -5.5e-192) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 4.5e-85) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 * t_1) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -5.5e-192: tmp = x + (-0.3333333333333333 * (t_1 / z)) elif y <= 4.5e-85: tmp = x + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((-0.3333333333333333 * t_1) / z) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -5.5e-192) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); elseif (y <= 4.5e-85) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * t_1) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -5.5e-192) tmp = x + (-0.3333333333333333 * (t_1 / z)); elseif (y <= 4.5e-85) tmp = x + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((-0.3333333333333333 * t_1) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e-192], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-85], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{-192}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t_1}{z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-85}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot t_1}{z}\\
\end{array}
\end{array}
if y < -5.49999999999999995e-192Initial program 97.2%
Simplified99.0%
Taylor expanded in x around 0 99.0%
if -5.49999999999999995e-192 < y < 4.50000000000000004e-85Initial program 90.9%
Simplified86.2%
Taylor expanded in y around 0 90.8%
associate-/r*86.3%
associate-*r/86.2%
*-commutative86.2%
associate-*r/86.2%
Simplified86.2%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in t around 0 99.6%
if 4.50000000000000004e-85 < y Initial program 99.8%
Simplified98.6%
associate-*l/98.8%
Applied egg-rr98.8%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -6.2e+90)
(not (or (<= y -1.45e+41) (and (not (<= y -1300.0)) (<= y 1.9e+49)))))
(* y (/ -0.3333333333333333 z))
x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+90) || !((y <= -1.45e+41) || (!(y <= -1300.0) && (y <= 1.9e+49)))) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6.2d+90)) .or. (.not. (y <= (-1.45d+41)) .or. (.not. (y <= (-1300.0d0))) .and. (y <= 1.9d+49))) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+90) || !((y <= -1.45e+41) || (!(y <= -1300.0) && (y <= 1.9e+49)))) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e+90) or not ((y <= -1.45e+41) or (not (y <= -1300.0) and (y <= 1.9e+49))): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e+90) || !((y <= -1.45e+41) || (!(y <= -1300.0) && (y <= 1.9e+49)))) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e+90) || ~(((y <= -1.45e+41) || (~((y <= -1300.0)) && (y <= 1.9e+49))))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e+90], N[Not[Or[LessEqual[y, -1.45e+41], And[N[Not[LessEqual[y, -1300.0]], $MachinePrecision], LessEqual[y, 1.9e+49]]]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+90} \lor \neg \left(y \leq -1.45 \cdot 10^{+41} \lor \neg \left(y \leq -1300\right) \land y \leq 1.9 \cdot 10^{+49}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.19999999999999977e90 or -1.44999999999999994e41 < y < -1300 or 1.8999999999999999e49 < y Initial program 98.8%
clear-num98.8%
inv-pow98.8%
*-commutative98.8%
*-un-lft-identity98.8%
times-frac98.7%
metadata-eval98.7%
Applied egg-rr98.7%
unpow-198.7%
Simplified98.7%
Taylor expanded in y around inf 72.9%
associate-*r/73.0%
associate-/l*73.0%
Simplified73.0%
associate-/r/73.0%
Applied egg-rr73.0%
if -6.19999999999999977e90 < y < -1.44999999999999994e41 or -1300 < y < 1.8999999999999999e49Initial program 95.1%
Simplified93.3%
Taylor expanded in x around inf 39.9%
Final simplification52.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ -0.3333333333333333 z))))
(if (<= y -3.7e+90)
t_1
(if (<= y -6.2e+40)
x
(if (<= y -1050.0)
(* -0.3333333333333333 (/ y z))
(if (<= y 3.4e+56) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -3.7e+90) {
tmp = t_1;
} else if (y <= -6.2e+40) {
tmp = x;
} else if (y <= -1050.0) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 3.4e+56) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((-0.3333333333333333d0) / z)
if (y <= (-3.7d+90)) then
tmp = t_1
else if (y <= (-6.2d+40)) then
tmp = x
else if (y <= (-1050.0d0)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 3.4d+56) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (-0.3333333333333333 / z);
double tmp;
if (y <= -3.7e+90) {
tmp = t_1;
} else if (y <= -6.2e+40) {
tmp = x;
} else if (y <= -1050.0) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 3.4e+56) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (-0.3333333333333333 / z) tmp = 0 if y <= -3.7e+90: tmp = t_1 elif y <= -6.2e+40: tmp = x elif y <= -1050.0: tmp = -0.3333333333333333 * (y / z) elif y <= 3.4e+56: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(-0.3333333333333333 / z)) tmp = 0.0 if (y <= -3.7e+90) tmp = t_1; elseif (y <= -6.2e+40) tmp = x; elseif (y <= -1050.0) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 3.4e+56) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (-0.3333333333333333 / z); tmp = 0.0; if (y <= -3.7e+90) tmp = t_1; elseif (y <= -6.2e+40) tmp = x; elseif (y <= -1050.0) tmp = -0.3333333333333333 * (y / z); elseif (y <= 3.4e+56) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e+90], t$95$1, If[LessEqual[y, -6.2e+40], x, If[LessEqual[y, -1050.0], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+56], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{+90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1050:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+56}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.7e90 or 3.40000000000000001e56 < y Initial program 98.7%
clear-num98.6%
inv-pow98.6%
*-commutative98.6%
*-un-lft-identity98.6%
times-frac98.6%
metadata-eval98.6%
Applied egg-rr98.6%
unpow-198.6%
Simplified98.6%
Taylor expanded in y around inf 73.7%
associate-*r/73.7%
associate-/l*73.7%
Simplified73.7%
associate-/r/73.8%
Applied egg-rr73.8%
if -3.7e90 < y < -6.1999999999999995e40 or -1050 < y < 3.40000000000000001e56Initial program 95.1%
Simplified93.3%
Taylor expanded in x around inf 39.9%
if -6.1999999999999995e40 < y < -1050Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
Simplified66.5%
Final simplification52.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.65e+89)
(* y (/ -0.3333333333333333 z))
(if (<= y -8.5e+40)
x
(if (<= y -1.46)
(* -0.3333333333333333 (/ y z))
(if (<= y 6.4e+60) x (/ -0.3333333333333333 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.65e+89) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -8.5e+40) {
tmp = x;
} else if (y <= -1.46) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 6.4e+60) {
tmp = x;
} else {
tmp = -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 <= (-1.65d+89)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-8.5d+40)) then
tmp = x
else if (y <= (-1.46d0)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 6.4d+60) then
tmp = x
else
tmp = (-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 <= -1.65e+89) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -8.5e+40) {
tmp = x;
} else if (y <= -1.46) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 6.4e+60) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.65e+89: tmp = y * (-0.3333333333333333 / z) elif y <= -8.5e+40: tmp = x elif y <= -1.46: tmp = -0.3333333333333333 * (y / z) elif y <= 6.4e+60: tmp = x else: tmp = -0.3333333333333333 / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.65e+89) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -8.5e+40) tmp = x; elseif (y <= -1.46) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 6.4e+60) tmp = x; else tmp = Float64(-0.3333333333333333 / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.65e+89) tmp = y * (-0.3333333333333333 / z); elseif (y <= -8.5e+40) tmp = x; elseif (y <= -1.46) tmp = -0.3333333333333333 * (y / z); elseif (y <= 6.4e+60) tmp = x; else tmp = -0.3333333333333333 / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.65e+89], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.5e+40], x, If[LessEqual[y, -1.46], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+60], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+89}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{+40}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.46:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.64999999999999987e89Initial program 97.4%
clear-num97.4%
inv-pow97.4%
*-commutative97.4%
*-un-lft-identity97.4%
times-frac97.3%
metadata-eval97.3%
Applied egg-rr97.3%
unpow-197.3%
Simplified97.3%
Taylor expanded in y around inf 73.9%
associate-*r/73.8%
associate-/l*73.8%
Simplified73.8%
associate-/r/73.9%
Applied egg-rr73.9%
if -1.64999999999999987e89 < y < -8.49999999999999996e40 or -1.46 < y < 6.39999999999999982e60Initial program 95.1%
Simplified93.3%
Taylor expanded in x around inf 39.9%
if -8.49999999999999996e40 < y < -1.46Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
Simplified66.5%
if 6.39999999999999982e60 < y Initial program 99.8%
clear-num99.8%
inv-pow99.8%
*-commutative99.8%
*-un-lft-identity99.8%
times-frac99.8%
metadata-eval99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in y around inf 73.5%
associate-*r/73.6%
associate-/l*73.7%
Simplified73.7%
Final simplification52.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.08e+95)
(* y (/ -0.3333333333333333 z))
(if (<= y -3e+41)
x
(if (<= y -1250.0)
(/ (* y -0.3333333333333333) z)
(if (<= y 4.8e+49) x (/ -0.3333333333333333 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.08e+95) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -3e+41) {
tmp = x;
} else if (y <= -1250.0) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 4.8e+49) {
tmp = x;
} else {
tmp = -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 <= (-1.08d+95)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-3d+41)) then
tmp = x
else if (y <= (-1250.0d0)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 4.8d+49) then
tmp = x
else
tmp = (-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 <= -1.08e+95) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -3e+41) {
tmp = x;
} else if (y <= -1250.0) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 4.8e+49) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.08e+95: tmp = y * (-0.3333333333333333 / z) elif y <= -3e+41: tmp = x elif y <= -1250.0: tmp = (y * -0.3333333333333333) / z elif y <= 4.8e+49: tmp = x else: tmp = -0.3333333333333333 / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.08e+95) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -3e+41) tmp = x; elseif (y <= -1250.0) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 4.8e+49) tmp = x; else tmp = Float64(-0.3333333333333333 / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.08e+95) tmp = y * (-0.3333333333333333 / z); elseif (y <= -3e+41) tmp = x; elseif (y <= -1250.0) tmp = (y * -0.3333333333333333) / z; elseif (y <= 4.8e+49) tmp = x; else tmp = -0.3333333333333333 / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.08e+95], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3e+41], x, If[LessEqual[y, -1250.0], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 4.8e+49], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+95}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -3 \cdot 10^{+41}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1250:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.0800000000000001e95Initial program 97.4%
clear-num97.4%
inv-pow97.4%
*-commutative97.4%
*-un-lft-identity97.4%
times-frac97.3%
metadata-eval97.3%
Applied egg-rr97.3%
unpow-197.3%
Simplified97.3%
Taylor expanded in y around inf 73.9%
associate-*r/73.8%
associate-/l*73.8%
Simplified73.8%
associate-/r/73.9%
Applied egg-rr73.9%
if -1.0800000000000001e95 < y < -2.9999999999999998e41 or -1250 < y < 4.8e49Initial program 95.1%
Simplified93.3%
Taylor expanded in x around inf 39.9%
if -2.9999999999999998e41 < y < -1250Initial program 99.7%
Taylor expanded in z around 0 99.8%
Taylor expanded in y around inf 66.5%
*-commutative66.5%
Simplified66.5%
associate-*l/66.7%
Applied egg-rr66.7%
if 4.8e49 < y Initial program 99.8%
clear-num99.8%
inv-pow99.8%
*-commutative99.8%
*-un-lft-identity99.8%
times-frac99.8%
metadata-eval99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Taylor expanded in y around inf 73.5%
associate-*r/73.6%
associate-/l*73.7%
Simplified73.7%
Final simplification52.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1200.0)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 7e+71)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1200.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 7e+71) {
tmp = x + ((t / y) * (0.3333333333333333 / 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 (y <= (-1200.0d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 7d+71) then
tmp = x + ((t / y) * (0.3333333333333333d0 / 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 (y <= -1200.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 7e+71) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1200.0: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 7e+71: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1200.0) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 7e+71) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1200.0) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 7e+71) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1200.0], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+71], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1200:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+71}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1200Initial program 98.2%
Taylor expanded in t around 0 89.9%
if -1200 < y < 6.9999999999999998e71Initial program 94.9%
Simplified92.9%
Taylor expanded in y around 0 91.0%
associate-/r*89.2%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.1%
Simplified89.1%
if 6.9999999999999998e71 < y Initial program 99.8%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 97.4%
*-commutative97.4%
Simplified97.4%
Final simplification90.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1400.0)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 5e+71)
(+ x (* 0.3333333333333333 (/ (/ t y) z)))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1400.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 5e+71) {
tmp = x + (0.3333333333333333 * ((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 (y <= (-1400.0d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 5d+71) then
tmp = x + (0.3333333333333333d0 * ((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 (y <= -1400.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 5e+71) {
tmp = x + (0.3333333333333333 * ((t / y) / z));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1400.0: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 5e+71: tmp = x + (0.3333333333333333 * ((t / y) / z)) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1400.0) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 5e+71) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / y) / z))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1400.0) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 5e+71) tmp = x + (0.3333333333333333 * ((t / y) / z)); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1400.0], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+71], N[(x + N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1400:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+71}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1400Initial program 98.2%
Taylor expanded in t around 0 89.9%
if -1400 < y < 4.99999999999999972e71Initial program 94.9%
Simplified92.9%
Taylor expanded in y around 0 91.0%
associate-/r*89.2%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.1%
Simplified89.1%
frac-times91.1%
Applied egg-rr91.1%
*-commutative91.1%
associate-*r/91.0%
*-commutative91.0%
associate-/r*89.2%
Applied egg-rr89.2%
if 4.99999999999999972e71 < y Initial program 99.8%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 97.4%
*-commutative97.4%
Simplified97.4%
Final simplification90.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -1400.0)
(- x (* (/ y z) 0.3333333333333333))
(if (<= y 8e+71)
(+ x (/ (* 0.3333333333333333 (/ t z)) y))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1400.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 8e+71) {
tmp = x + ((0.3333333333333333 * (t / 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 <= (-1400.0d0)) then
tmp = x - ((y / z) * 0.3333333333333333d0)
else if (y <= 8d+71) then
tmp = x + ((0.3333333333333333d0 * (t / 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 <= -1400.0) {
tmp = x - ((y / z) * 0.3333333333333333);
} else if (y <= 8e+71) {
tmp = x + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1400.0: tmp = x - ((y / z) * 0.3333333333333333) elif y <= 8e+71: tmp = x + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1400.0) tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); elseif (y <= 8e+71) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1400.0) tmp = x - ((y / z) * 0.3333333333333333); elseif (y <= 8e+71) tmp = x + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1400.0], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+71], N[(x + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1400:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+71}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1400Initial program 98.2%
Taylor expanded in t around 0 89.9%
if -1400 < y < 8.0000000000000003e71Initial program 94.9%
Simplified92.9%
Taylor expanded in y around 0 91.0%
associate-/r*89.2%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.1%
Simplified89.1%
associate-*l/94.0%
Applied egg-rr94.0%
Taylor expanded in t around 0 94.0%
if 8.0000000000000003e71 < y Initial program 99.8%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 97.4%
*-commutative97.4%
Simplified97.4%
Final simplification93.6%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (y * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (y * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (y * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 96.5%
Simplified95.7%
Taylor expanded in y around inf 61.6%
Final simplification61.6%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.5%
Simplified95.7%
Taylor expanded in x around inf 32.7%
Final simplification32.7%
(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 2023263
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))