
(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 19 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-117) (+ (- x (/ y (* z 3.0))) (/ t (* z (* 3.0 y)))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e-117) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-4d-117)) then
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (3.0d0 * y)))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -4e-117) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -4e-117: tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -4e-117) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(3.0 * y)))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -4e-117) tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e-117], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{-117}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(3 \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -4.00000000000000012e-117Initial program 99.7%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
if -4.00000000000000012e-117 < (*.f64 z 3) Initial program 92.4%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
*-commutative92.3%
associate-*l*92.4%
associate-+l-92.4%
*-commutative92.4%
associate-/r*96.6%
sub-div98.0%
Applied egg-rr98.0%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -5.9e+66)
(/ y (* z -3.0))
(if (<= y -3.8e+32)
x
(if (<= y -75000000.0)
(/ (* y -0.3333333333333333) z)
(if (<= y 2.85e-87)
t_1
(if (<= y 4.6e-63)
x
(if (<= y 9000000000000.0)
t_1
(if (<= y 1.65e+161) x (* y (/ -0.3333333333333333 z)))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -5.9e+66) {
tmp = y / (z * -3.0);
} else if (y <= -3.8e+32) {
tmp = x;
} else if (y <= -75000000.0) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 2.85e-87) {
tmp = t_1;
} else if (y <= 4.6e-63) {
tmp = x;
} else if (y <= 9000000000000.0) {
tmp = t_1;
} else if (y <= 1.65e+161) {
tmp = x;
} else {
tmp = 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 * (t / (z * y))
if (y <= (-5.9d+66)) then
tmp = y / (z * (-3.0d0))
else if (y <= (-3.8d+32)) then
tmp = x
else if (y <= (-75000000.0d0)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 2.85d-87) then
tmp = t_1
else if (y <= 4.6d-63) then
tmp = x
else if (y <= 9000000000000.0d0) then
tmp = t_1
else if (y <= 1.65d+161) then
tmp = x
else
tmp = 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 * (t / (z * y));
double tmp;
if (y <= -5.9e+66) {
tmp = y / (z * -3.0);
} else if (y <= -3.8e+32) {
tmp = x;
} else if (y <= -75000000.0) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 2.85e-87) {
tmp = t_1;
} else if (y <= 4.6e-63) {
tmp = x;
} else if (y <= 9000000000000.0) {
tmp = t_1;
} else if (y <= 1.65e+161) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -5.9e+66: tmp = y / (z * -3.0) elif y <= -3.8e+32: tmp = x elif y <= -75000000.0: tmp = (y * -0.3333333333333333) / z elif y <= 2.85e-87: tmp = t_1 elif y <= 4.6e-63: tmp = x elif y <= 9000000000000.0: tmp = t_1 elif y <= 1.65e+161: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -5.9e+66) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= -3.8e+32) tmp = x; elseif (y <= -75000000.0) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 2.85e-87) tmp = t_1; elseif (y <= 4.6e-63) tmp = x; elseif (y <= 9000000000000.0) tmp = t_1; elseif (y <= 1.65e+161) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -5.9e+66) tmp = y / (z * -3.0); elseif (y <= -3.8e+32) tmp = x; elseif (y <= -75000000.0) tmp = (y * -0.3333333333333333) / z; elseif (y <= 2.85e-87) tmp = t_1; elseif (y <= 4.6e-63) tmp = x; elseif (y <= 9000000000000.0) tmp = t_1; elseif (y <= 1.65e+161) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.9e+66], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e+32], x, If[LessEqual[y, -75000000.0], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.85e-87], t$95$1, If[LessEqual[y, 4.6e-63], x, If[LessEqual[y, 9000000000000.0], t$95$1, If[LessEqual[y, 1.65e+161], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -5.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+32}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -75000000:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-63}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+161}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.89999999999999988e66Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in z around 0 84.3%
Taylor expanded in t around 0 80.6%
associate-*r/80.6%
metadata-eval80.6%
associate-/r/80.7%
associate-/r*80.6%
associate-/l/80.6%
associate-/l*80.6%
*-commutative80.6%
associate-*r/80.7%
*-rgt-identity80.7%
associate-/r*80.7%
Simplified80.7%
if -5.89999999999999988e66 < y < -3.8000000000000003e32 or 2.85e-87 < y < 4.6e-63 or 9e12 < y < 1.64999999999999999e161Initial program 97.2%
Simplified99.9%
Taylor expanded in x around inf 67.9%
if -3.8000000000000003e32 < y < -7.5e7Initial program 100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
*-commutative100.0%
associate-*l*100.0%
associate-+l-100.0%
*-commutative100.0%
associate-/r*100.0%
sub-div100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 67.8%
associate-*r/68.3%
Simplified68.3%
if -7.5e7 < y < 2.85e-87 or 4.6e-63 < y < 9e12Initial program 93.2%
associate-*l*93.3%
*-commutative93.3%
Simplified93.3%
*-commutative93.3%
associate-*l*93.2%
associate-+l-93.3%
*-commutative93.3%
associate-/r*91.7%
sub-div92.5%
Applied egg-rr92.5%
Taylor expanded in y around 0 63.4%
*-commutative63.4%
Simplified63.4%
if 1.64999999999999999e161 < y Initial program 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
*-commutative97.1%
associate-*l*97.1%
associate-+l-97.1%
*-commutative97.1%
associate-/r*97.1%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 91.5%
metadata-eval91.5%
times-frac91.7%
neg-mul-191.7%
*-commutative91.7%
distribute-frac-neg91.7%
*-rgt-identity91.7%
associate-*r/91.5%
distribute-rgt-neg-in91.5%
distribute-neg-frac91.5%
metadata-eval91.5%
*-commutative91.5%
associate-/r*91.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in y around inf 91.5%
associate-*r/91.7%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
Final simplification71.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -41000000.0) (not (<= y 11000000000000.0))) (- x (/ y (* z 3.0))) (+ x (* (/ t y) (/ 0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -41000000.0) || !(y <= 11000000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-41000000.0d0)) .or. (.not. (y <= 11000000000000.0d0))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -41000000.0) || !(y <= 11000000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t / y) * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -41000000.0) or not (y <= 11000000000000.0): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t / y) * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -41000000.0) || !(y <= 11000000000000.0)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -41000000.0) || ~((y <= 11000000000000.0))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t / y) * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -41000000.0], N[Not[LessEqual[y, 11000000000000.0]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -41000000 \lor \neg \left(y \leq 11000000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.1e7 or 1.1e13 < y Initial program 98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.0%
metadata-eval95.0%
times-frac95.2%
*-un-lft-identity95.2%
*-commutative95.2%
Applied egg-rr95.2%
if -4.1e7 < y < 1.1e13Initial program 93.0%
Simplified93.0%
Taylor expanded in t around inf 87.7%
associate-/r*85.6%
associate-*r/85.6%
associate-*l/85.6%
*-commutative85.6%
Simplified85.6%
Final simplification89.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -51000000.0) (not (<= y 3600000000000.0))) (- x (/ y (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -51000000.0) || !(y <= 3600000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-51000000.0d0)) .or. (.not. (y <= 3600000000000.0d0))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -51000000.0) || !(y <= 3600000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -51000000.0) or not (y <= 3600000000000.0): tmp = x - (y / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -51000000.0) || !(y <= 3600000000000.0)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -51000000.0) || ~((y <= 3600000000000.0))) tmp = x - (y / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -51000000.0], N[Not[LessEqual[y, 3600000000000.0]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -51000000 \lor \neg \left(y \leq 3600000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -5.1e7 or 3.6e12 < y Initial program 98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.0%
metadata-eval95.0%
times-frac95.2%
*-un-lft-identity95.2%
*-commutative95.2%
Applied egg-rr95.2%
if -5.1e7 < y < 3.6e12Initial program 93.0%
Simplified93.0%
Taylor expanded in y around 0 87.7%
+-commutative87.7%
Simplified87.7%
Final simplification91.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -64000000.0) (not (<= y 750000000000.0))) (- x (/ y (* z 3.0))) (- x (/ (* t -0.3333333333333333) (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -64000000.0) || !(y <= 750000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x - ((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 <= (-64000000.0d0)) .or. (.not. (y <= 750000000000.0d0))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x - ((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 <= -64000000.0) || !(y <= 750000000000.0)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x - ((t * -0.3333333333333333) / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -64000000.0) or not (y <= 750000000000.0): tmp = x - (y / (z * 3.0)) else: tmp = x - ((t * -0.3333333333333333) / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -64000000.0) || !(y <= 750000000000.0)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x - Float64(Float64(t * -0.3333333333333333) / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -64000000.0) || ~((y <= 750000000000.0))) tmp = x - (y / (z * 3.0)); else tmp = x - ((t * -0.3333333333333333) / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -64000000.0], N[Not[LessEqual[y, 750000000000.0]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(t * -0.3333333333333333), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -64000000 \lor \neg \left(y \leq 750000000000\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t \cdot -0.3333333333333333}{z \cdot y}\\
\end{array}
\end{array}
if y < -6.4e7 or 7.5e11 < y Initial program 98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 95.0%
metadata-eval95.0%
times-frac95.2%
*-un-lft-identity95.2%
*-commutative95.2%
Applied egg-rr95.2%
if -6.4e7 < y < 7.5e11Initial program 93.0%
associate-*l*93.0%
*-commutative93.0%
Simplified93.0%
*-commutative93.0%
associate-*l*93.0%
associate-+l-93.0%
*-commutative93.0%
associate-/r*92.3%
sub-div93.0%
Applied egg-rr93.0%
Taylor expanded in y around 0 87.7%
associate-*r/87.7%
Simplified87.7%
Final simplification91.1%
(FPCore (x y z t)
:precision binary64
(if (<= x -7.6e+130)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= x 6.6e+89)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.6e+130) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (x <= 6.6e+89) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x - (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 (x <= (-7.6d+130)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (x <= 6.6d+89) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else
tmp = x - (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 (x <= -7.6e+130) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (x <= 6.6e+89) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7.6e+130: tmp = x + (y * (-0.3333333333333333 / z)) elif x <= 6.6e+89: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7.6e+130) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (x <= 6.6e+89) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -7.6e+130) tmp = x + (y * (-0.3333333333333333 / z)); elseif (x <= 6.6e+89) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.6e+130], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e+89], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.6 \cdot 10^{+130}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{+89}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if x < -7.6000000000000004e130Initial program 94.8%
Simplified97.4%
Taylor expanded in t around 0 75.3%
*-commutative75.3%
associate-*l/75.3%
associate-*r/75.4%
Simplified75.4%
if -7.6000000000000004e130 < x < 6.59999999999999948e89Initial program 94.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
*-commutative94.6%
associate-*l*94.6%
associate-+l-94.6%
*-commutative94.6%
associate-/r*95.1%
sub-div96.3%
Applied egg-rr96.3%
Taylor expanded in x around 0 84.9%
if 6.59999999999999948e89 < x Initial program 98.1%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in t around 0 78.7%
Final simplification82.3%
(FPCore (x y z t)
:precision binary64
(if (<= x -1.8e+131)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= x 3.9e+89)
(* (- y (/ t y)) (/ -0.3333333333333333 z))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.8e+131) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (x <= 3.9e+89) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else {
tmp = x - (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 (x <= (-1.8d+131)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (x <= 3.9d+89) then
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
else
tmp = x - (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 (x <= -1.8e+131) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (x <= 3.9e+89) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.8e+131: tmp = x + (y * (-0.3333333333333333 / z)) elif x <= 3.9e+89: tmp = (y - (t / y)) * (-0.3333333333333333 / z) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.8e+131) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (x <= 3.9e+89) tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.8e+131) tmp = x + (y * (-0.3333333333333333 / z)); elseif (x <= 3.9e+89) tmp = (y - (t / y)) * (-0.3333333333333333 / z); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.8e+131], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+89], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+131}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+89}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if x < -1.80000000000000016e131Initial program 94.8%
Simplified97.4%
Taylor expanded in t around 0 75.3%
*-commutative75.3%
associate-*l/75.3%
associate-*r/75.4%
Simplified75.4%
if -1.80000000000000016e131 < x < 3.90000000000000011e89Initial program 94.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
*-commutative94.6%
associate-*l*94.6%
associate-+l-94.6%
*-commutative94.6%
associate-/r*95.1%
sub-div96.3%
Applied egg-rr96.3%
Taylor expanded in x around 0 84.9%
metadata-eval84.9%
times-frac85.0%
neg-mul-185.0%
*-commutative85.0%
distribute-frac-neg85.0%
*-rgt-identity85.0%
associate-*r/85.0%
distribute-rgt-neg-in85.0%
distribute-neg-frac85.0%
metadata-eval85.0%
*-commutative85.0%
associate-/r*85.0%
metadata-eval85.0%
Simplified85.0%
if 3.90000000000000011e89 < x Initial program 98.1%
associate-*l*98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in t around 0 78.7%
Final simplification82.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.3e-108) (not (<= y 3.9e-89))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.3e-108) || !(y <= 3.9e-89)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.3d-108)) .or. (.not. (y <= 3.9d-89))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.3e-108) || !(y <= 3.9e-89)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.3e-108) or not (y <= 3.9e-89): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.3e-108) || !(y <= 3.9e-89)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.3e-108) || ~((y <= 3.9e-89))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.3e-108], N[Not[LessEqual[y, 3.9e-89]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-108} \lor \neg \left(y \leq 3.9 \cdot 10^{-89}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.29999999999999992e-108 or 3.89999999999999978e-89 < y Initial program 97.0%
Simplified99.8%
Taylor expanded in t around 0 82.3%
*-commutative82.3%
associate-*l/82.4%
associate-*r/82.4%
Simplified82.4%
if -1.29999999999999992e-108 < y < 3.89999999999999978e-89Initial program 91.7%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*88.1%
sub-div88.1%
Applied egg-rr88.1%
Taylor expanded in y around 0 72.6%
*-commutative72.6%
Simplified72.6%
Final simplification79.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e-110) (not (<= y 2.2e-89))) (- x (/ y (* z 3.0))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e-110) || !(y <= 2.2e-89)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 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 <= (-8d-110)) .or. (.not. (y <= 2.2d-89))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = 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 <= -8e-110) || !(y <= 2.2e-89)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e-110) or not (y <= 2.2e-89): tmp = x - (y / (z * 3.0)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e-110) || !(y <= 2.2e-89)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = 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 <= -8e-110) || ~((y <= 2.2e-89))) tmp = x - (y / (z * 3.0)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e-110], N[Not[LessEqual[y, 2.2e-89]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-110} \lor \neg \left(y \leq 2.2 \cdot 10^{-89}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -8.0000000000000004e-110 or 2.20000000000000012e-89 < y Initial program 97.0%
associate-*l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in t around 0 82.3%
metadata-eval82.3%
times-frac82.4%
*-un-lft-identity82.4%
*-commutative82.4%
Applied egg-rr82.4%
if -8.0000000000000004e-110 < y < 2.20000000000000012e-89Initial program 91.7%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*88.1%
sub-div88.1%
Applied egg-rr88.1%
Taylor expanded in y around 0 72.6%
*-commutative72.6%
Simplified72.6%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.4e-108)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 9.8e-87)
(* 0.3333333333333333 (/ t (* z y)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-108) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 9.8e-87) {
tmp = 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 <= (-1.4d-108)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 9.8d-87) then
tmp = 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 <= -1.4e-108) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 9.8e-87) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e-108: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 9.8e-87: tmp = 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 <= -1.4e-108) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 9.8e-87) tmp = Float64(0.3333333333333333 * Float64(t / 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 <= -1.4e-108) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 9.8e-87) tmp = 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, -1.4e-108], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e-87], N[(0.3333333333333333 * N[(t / 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 -1.4 \cdot 10^{-108}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-87}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.4e-108Initial program 97.6%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around 0 81.3%
if -1.4e-108 < y < 9.7999999999999994e-87Initial program 91.7%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*88.1%
sub-div88.1%
Applied egg-rr88.1%
Taylor expanded in y around 0 72.6%
*-commutative72.6%
Simplified72.6%
if 9.7999999999999994e-87 < y Initial program 96.4%
Simplified99.9%
Taylor expanded in t around 0 83.4%
*-commutative83.4%
associate-*l/83.5%
associate-*r/83.5%
Simplified83.5%
Final simplification79.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.8e-110)
(- x (/ (/ y 3.0) z))
(if (<= y 6.8e-87)
(* 0.3333333333333333 (/ t (* z y)))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e-110) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 6.8e-87) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.8d-110)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 6.8d-87) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e-110) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 6.8e-87) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e-110: tmp = x - ((y / 3.0) / z) elif y <= 6.8e-87: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e-110) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 6.8e-87) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.8e-110) tmp = x - ((y / 3.0) / z); elseif (y <= 6.8e-87) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e-110], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-87], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-110}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-87}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -4.80000000000000013e-110Initial program 97.6%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around 0 81.3%
metadata-eval81.3%
times-frac81.3%
*-un-lft-identity81.3%
*-commutative81.3%
Applied egg-rr81.3%
*-commutative81.3%
associate-/r*81.3%
Simplified81.3%
if -4.80000000000000013e-110 < y < 6.7999999999999997e-87Initial program 91.7%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*88.1%
sub-div88.1%
Applied egg-rr88.1%
Taylor expanded in y around 0 72.6%
*-commutative72.6%
Simplified72.6%
if 6.7999999999999997e-87 < y Initial program 96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in t around 0 83.4%
metadata-eval83.4%
times-frac83.6%
*-un-lft-identity83.6%
*-commutative83.6%
Applied egg-rr83.6%
Final simplification79.3%
(FPCore (x y z t) :precision binary64 (if (<= y -1.4e-108) (- x (/ (/ y 3.0) z)) (if (<= y 9.5e-88) (/ t (* (* z 3.0) y)) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-108) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 9.5e-88) {
tmp = t / ((z * 3.0) * y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.4d-108)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 9.5d-88) then
tmp = t / ((z * 3.0d0) * y)
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-108) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 9.5e-88) {
tmp = t / ((z * 3.0) * y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e-108: tmp = x - ((y / 3.0) / z) elif y <= 9.5e-88: tmp = t / ((z * 3.0) * y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e-108) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 9.5e-88) tmp = Float64(t / Float64(Float64(z * 3.0) * y)); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.4e-108) tmp = x - ((y / 3.0) / z); elseif (y <= 9.5e-88) tmp = t / ((z * 3.0) * y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e-108], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e-88], N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-108}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.4e-108Initial program 97.6%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around 0 81.3%
metadata-eval81.3%
times-frac81.3%
*-un-lft-identity81.3%
*-commutative81.3%
Applied egg-rr81.3%
*-commutative81.3%
associate-/r*81.3%
Simplified81.3%
if -1.4e-108 < y < 9.5e-88Initial program 91.7%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*88.1%
sub-div88.1%
Applied egg-rr88.1%
Taylor expanded in y around 0 72.6%
*-commutative72.6%
associate-/r*69.1%
Simplified69.1%
metadata-eval69.1%
div-inv69.2%
associate-/r*69.1%
associate-/l/72.7%
*-commutative72.7%
Applied egg-rr72.7%
if 9.5e-88 < y Initial program 96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in t around 0 83.4%
metadata-eval83.4%
times-frac83.6%
*-un-lft-identity83.6%
*-commutative83.6%
Applied egg-rr83.6%
Final simplification79.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.4e-108) (- x (/ (/ y 3.0) z)) (if (<= y 2.7e-89) (/ (/ t (* z 3.0)) y) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-108) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 2.7e-89) {
tmp = (t / (z * 3.0)) / y;
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.4d-108)) then
tmp = x - ((y / 3.0d0) / z)
else if (y <= 2.7d-89) then
tmp = (t / (z * 3.0d0)) / y
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.4e-108) {
tmp = x - ((y / 3.0) / z);
} else if (y <= 2.7e-89) {
tmp = (t / (z * 3.0)) / y;
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.4e-108: tmp = x - ((y / 3.0) / z) elif y <= 2.7e-89: tmp = (t / (z * 3.0)) / y else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.4e-108) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (y <= 2.7e-89) tmp = Float64(Float64(t / Float64(z * 3.0)) / y); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.4e-108) tmp = x - ((y / 3.0) / z); elseif (y <= 2.7e-89) tmp = (t / (z * 3.0)) / y; else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.4e-108], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-89], N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-108}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-89}:\\
\;\;\;\;\frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.4e-108Initial program 97.6%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in t around 0 81.3%
metadata-eval81.3%
times-frac81.3%
*-un-lft-identity81.3%
*-commutative81.3%
Applied egg-rr81.3%
*-commutative81.3%
associate-/r*81.3%
Simplified81.3%
if -1.4e-108 < y < 2.69999999999999988e-89Initial program 91.7%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
*-commutative91.8%
associate-*l*91.7%
associate-+l-91.7%
*-commutative91.7%
associate-/r*88.1%
sub-div88.1%
Applied egg-rr88.1%
Taylor expanded in y around 0 72.6%
*-commutative72.6%
associate-/r*69.1%
Simplified69.1%
metadata-eval69.1%
div-inv69.2%
associate-/r*69.1%
associate-/l/72.7%
associate-/r*78.3%
Applied egg-rr78.3%
if 2.69999999999999988e-89 < y Initial program 96.4%
associate-*l*96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in t around 0 83.4%
metadata-eval83.4%
times-frac83.6%
*-un-lft-identity83.6%
*-commutative83.6%
Applied egg-rr83.6%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.5e+69) (not (<= y 1.65e+161))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e+69) || !(y <= 1.65e+161)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9.5d+69)) .or. (.not. (y <= 1.65d+161))) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e+69) || !(y <= 1.65e+161)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.5e+69) or not (y <= 1.65e+161): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.5e+69) || !(y <= 1.65e+161)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.5e+69) || ~((y <= 1.65e+161))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.5e+69], N[Not[LessEqual[y, 1.65e+161]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+69} \lor \neg \left(y \leq 1.65 \cdot 10^{+161}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.4999999999999995e69 or 1.64999999999999999e161 < y Initial program 97.6%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
*-commutative97.6%
associate-*l*97.6%
associate-+l-97.6%
*-commutative97.6%
associate-/r*98.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 85.2%
if -9.4999999999999995e69 < y < 1.64999999999999999e161Initial program 94.2%
Simplified94.3%
Taylor expanded in x around inf 36.1%
Final simplification52.4%
(FPCore (x y z t) :precision binary64 (if (<= y -3.8e+68) (* -0.3333333333333333 (/ y z)) (if (<= y 1.65e+161) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.8e+68) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.65e+161) {
tmp = x;
} else {
tmp = 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.8d+68)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 1.65d+161) then
tmp = x
else
tmp = 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.8e+68) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.65e+161) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.8e+68: tmp = -0.3333333333333333 * (y / z) elif y <= 1.65e+161: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.8e+68) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 1.65e+161) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.8e+68) tmp = -0.3333333333333333 * (y / z); elseif (y <= 1.65e+161) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.8e+68], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+161], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+68}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+161}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.8000000000000001e68Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
*-commutative97.9%
associate-*l*97.9%
associate-+l-97.9%
*-commutative97.9%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 80.6%
if -3.8000000000000001e68 < y < 1.64999999999999999e161Initial program 94.2%
Simplified94.3%
Taylor expanded in x around inf 36.1%
if 1.64999999999999999e161 < y Initial program 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
*-commutative97.1%
associate-*l*97.1%
associate-+l-97.1%
*-commutative97.1%
associate-/r*97.1%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 91.5%
metadata-eval91.5%
times-frac91.7%
neg-mul-191.7%
*-commutative91.7%
distribute-frac-neg91.7%
*-rgt-identity91.7%
associate-*r/91.5%
distribute-rgt-neg-in91.5%
distribute-neg-frac91.5%
metadata-eval91.5%
*-commutative91.5%
associate-/r*91.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in y around inf 91.5%
associate-*r/91.7%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
Final simplification52.4%
(FPCore (x y z t) :precision binary64 (if (<= y -1.08e+67) (/ y (* z -3.0)) (if (<= y 1.65e+161) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.08e+67) {
tmp = y / (z * -3.0);
} else if (y <= 1.65e+161) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.08d+67)) then
tmp = y / (z * (-3.0d0))
else if (y <= 1.65d+161) then
tmp = x
else
tmp = y * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.08e+67) {
tmp = y / (z * -3.0);
} else if (y <= 1.65e+161) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.08e+67: tmp = y / (z * -3.0) elif y <= 1.65e+161: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.08e+67) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 1.65e+161) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.08e+67) tmp = y / (z * -3.0); elseif (y <= 1.65e+161) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.08e+67], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+161], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+67}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+161}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.08e67Initial program 97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in z around 0 84.3%
Taylor expanded in t around 0 80.6%
associate-*r/80.6%
metadata-eval80.6%
associate-/r/80.7%
associate-/r*80.6%
associate-/l/80.6%
associate-/l*80.6%
*-commutative80.6%
associate-*r/80.7%
*-rgt-identity80.7%
associate-/r*80.7%
Simplified80.7%
if -1.08e67 < y < 1.64999999999999999e161Initial program 94.2%
Simplified94.3%
Taylor expanded in x around inf 36.1%
if 1.64999999999999999e161 < y Initial program 97.1%
associate-*l*97.1%
*-commutative97.1%
Simplified97.1%
*-commutative97.1%
associate-*l*97.1%
associate-+l-97.1%
*-commutative97.1%
associate-/r*97.1%
sub-div99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 91.5%
metadata-eval91.5%
times-frac91.7%
neg-mul-191.7%
*-commutative91.7%
distribute-frac-neg91.7%
*-rgt-identity91.7%
associate-*r/91.5%
distribute-rgt-neg-in91.5%
distribute-neg-frac91.5%
metadata-eval91.5%
*-commutative91.5%
associate-/r*91.7%
metadata-eval91.7%
Simplified91.7%
Taylor expanded in y around inf 91.5%
associate-*r/91.7%
associate-*l/91.7%
*-commutative91.7%
Simplified91.7%
Final simplification52.4%
(FPCore (x y z t) :precision binary64 (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - 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 * (((t / y) - y) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / z));
}
def code(x, y, z, t): return x + (0.3333333333333333 * (((t / y) - y) / z))
function code(x, y, z, t) return Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))) end
function tmp = code(x, y, z, t) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}
\end{array}
Initial program 95.3%
Simplified96.1%
Taylor expanded in z around 0 96.0%
Final simplification96.0%
(FPCore (x y z t) :precision binary64 (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((0.3333333333333333d0 / z) * ((t / y) - y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 / z) * ((t / y) - y));
}
def code(x, y, z, t): return x + ((0.3333333333333333 / z) * ((t / y) - y))
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)
\end{array}
Initial program 95.3%
Simplified96.1%
Final simplification96.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.3%
Simplified96.1%
Taylor expanded in x around inf 28.6%
Final simplification28.6%
(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 2024027
(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))))