
(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 (<= (* z 3.0) -1e-58)
(+ t_1 (/ t (* z (* 3.0 y))))
(if (<= (* z 3.0) 4e+21)
(+ x (/ 1.0 (* z (/ -3.0 (- y (/ t y))))))
(+ t_1 (/ t (* (* z 3.0) y)))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -1e-58) {
tmp = t_1 + (t / (z * (3.0 * y)));
} else if ((z * 3.0) <= 4e+21) {
tmp = x + (1.0 / (z * (-3.0 / (y - (t / y)))));
} else {
tmp = t_1 + (t / ((z * 3.0) * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y / (z * 3.0d0))
if ((z * 3.0d0) <= (-1d-58)) then
tmp = t_1 + (t / (z * (3.0d0 * y)))
else if ((z * 3.0d0) <= 4d+21) then
tmp = x + (1.0d0 / (z * ((-3.0d0) / (y - (t / y)))))
else
tmp = t_1 + (t / ((z * 3.0d0) * y))
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 ((z * 3.0) <= -1e-58) {
tmp = t_1 + (t / (z * (3.0 * y)));
} else if ((z * 3.0) <= 4e+21) {
tmp = x + (1.0 / (z * (-3.0 / (y - (t / y)))));
} else {
tmp = t_1 + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if (z * 3.0) <= -1e-58: tmp = t_1 + (t / (z * (3.0 * y))) elif (z * 3.0) <= 4e+21: tmp = x + (1.0 / (z * (-3.0 / (y - (t / y))))) else: tmp = t_1 + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (Float64(z * 3.0) <= -1e-58) tmp = Float64(t_1 + Float64(t / Float64(z * Float64(3.0 * y)))); elseif (Float64(z * 3.0) <= 4e+21) tmp = Float64(x + Float64(1.0 / Float64(z * Float64(-3.0 / Float64(y - Float64(t / y)))))); else tmp = Float64(t_1 + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if ((z * 3.0) <= -1e-58) tmp = t_1 + (t / (z * (3.0 * y))); elseif ((z * 3.0) <= 4e+21) tmp = x + (1.0 / (z * (-3.0 / (y - (t / y))))); else tmp = t_1 + (t / ((z * 3.0) * y)); 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[(z * 3.0), $MachinePrecision], -1e-58], N[(t$95$1 + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 4e+21], N[(x + N[(1.0 / N[(z * N[(-3.0 / N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-58}:\\
\;\;\;\;t_1 + \frac{t}{z \cdot \left(3 \cdot y\right)}\\
\mathbf{elif}\;z \cdot 3 \leq 4 \cdot 10^{+21}:\\
\;\;\;\;x + \frac{1}{z \cdot \frac{-3}{y - \frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1e-58Initial program 98.5%
Taylor expanded in z around 0 98.6%
associate-*r*98.6%
*-commutative98.6%
*-commutative98.6%
Simplified98.6%
if -1e-58 < (*.f64 z 3) < 4e21Initial program 88.7%
Simplified99.7%
associate-*l/99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.9%
Simplified99.9%
if 4e21 < (*.f64 z 3) Initial program 99.8%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -1e-58) (not (<= (* z 3.0) 4e+21))) (+ (- x (/ y (* z 3.0))) (/ t (* z (* 3.0 y)))) (+ x (/ 1.0 (* z (/ -3.0 (- y (/ t y))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e-58) || !((z * 3.0) <= 4e+21)) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
} else {
tmp = x + (1.0 / (z * (-3.0 / (y - (t / y)))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-1d-58)) .or. (.not. ((z * 3.0d0) <= 4d+21))) then
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (3.0d0 * y)))
else
tmp = x + (1.0d0 / (z * ((-3.0d0) / (y - (t / y)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e-58) || !((z * 3.0) <= 4e+21)) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y)));
} else {
tmp = x + (1.0 / (z * (-3.0 / (y - (t / y)))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -1e-58) or not ((z * 3.0) <= 4e+21): tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))) else: tmp = x + (1.0 / (z * (-3.0 / (y - (t / y))))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -1e-58) || !(Float64(z * 3.0) <= 4e+21)) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(3.0 * y)))); else tmp = Float64(x + Float64(1.0 / Float64(z * Float64(-3.0 / Float64(y - Float64(t / y)))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -1e-58) || ~(((z * 3.0) <= 4e+21))) tmp = (x - (y / (z * 3.0))) + (t / (z * (3.0 * y))); else tmp = x + (1.0 / (z * (-3.0 / (y - (t / y))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -1e-58], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 4e+21]], $MachinePrecision]], 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[(1.0 / N[(z * N[(-3.0 / N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-58} \lor \neg \left(z \cdot 3 \leq 4 \cdot 10^{+21}\right):\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(3 \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{z \cdot \frac{-3}{y - \frac{t}{y}}}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1e-58 or 4e21 < (*.f64 z 3) Initial program 99.1%
Taylor expanded in z around 0 99.1%
associate-*r*99.1%
*-commutative99.1%
*-commutative99.1%
Simplified99.1%
if -1e-58 < (*.f64 z 3) < 4e21Initial program 88.7%
Simplified99.7%
associate-*l/99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 99.7%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.9%
Simplified99.9%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* 0.3333333333333333 (/ t (* z y)))))
(t_2 (- x (* (/ y z) 0.3333333333333333))))
(if (<= y -1.65e+65)
t_2
(if (<= y 3.1e-88)
t_1
(if (<= y 2.05e-16)
(* (- (/ t y) y) (/ 0.3333333333333333 z))
(if (<= y 9.2e+21) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (z * y)));
double t_2 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.65e+65) {
tmp = t_2;
} else if (y <= 3.1e-88) {
tmp = t_1;
} else if (y <= 2.05e-16) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else if (y <= 9.2e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = x + (0.3333333333333333d0 * (t / (z * y)))
t_2 = x - ((y / z) * 0.3333333333333333d0)
if (y <= (-1.65d+65)) then
tmp = t_2
else if (y <= 3.1d-88) then
tmp = t_1
else if (y <= 2.05d-16) then
tmp = ((t / y) - y) * (0.3333333333333333d0 / z)
else if (y <= 9.2d+21) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (0.3333333333333333 * (t / (z * y)));
double t_2 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.65e+65) {
tmp = t_2;
} else if (y <= 3.1e-88) {
tmp = t_1;
} else if (y <= 2.05e-16) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else if (y <= 9.2e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (0.3333333333333333 * (t / (z * y))) t_2 = x - ((y / z) * 0.3333333333333333) tmp = 0 if y <= -1.65e+65: tmp = t_2 elif y <= 3.1e-88: tmp = t_1 elif y <= 2.05e-16: tmp = ((t / y) - y) * (0.3333333333333333 / z) elif y <= 9.2e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))) t_2 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) tmp = 0.0 if (y <= -1.65e+65) tmp = t_2; elseif (y <= 3.1e-88) tmp = t_1; elseif (y <= 2.05e-16) tmp = Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)); elseif (y <= 9.2e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (0.3333333333333333 * (t / (z * y))); t_2 = x - ((y / z) * 0.3333333333333333); tmp = 0.0; if (y <= -1.65e+65) tmp = t_2; elseif (y <= 3.1e-88) tmp = t_1; elseif (y <= 2.05e-16) tmp = ((t / y) - y) * (0.3333333333333333 / z); elseif (y <= 9.2e+21) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+65], t$95$2, If[LessEqual[y, 3.1e-88], t$95$1, If[LessEqual[y, 2.05e-16], N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
t_2 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+65}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-88}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.65000000000000012e65 or 9.2e21 < y Initial program 99.7%
Taylor expanded in t around 0 96.1%
if -1.65000000000000012e65 < y < 3.0999999999999998e-88 or 2.05000000000000003e-16 < y < 9.2e21Initial program 90.8%
Simplified87.5%
Taylor expanded in y around 0 86.2%
if 3.0999999999999998e-88 < y < 2.05000000000000003e-16Initial program 92.9%
Taylor expanded in z around 0 92.9%
associate-*r*92.9%
*-commutative92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around 0 92.8%
associate-/r*99.9%
associate-*r/99.9%
associate-*r/99.4%
div-sub99.4%
distribute-lft-out--99.4%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.4%
Applied egg-rr99.4%
Final simplification90.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* (/ y z) 0.3333333333333333))))
(if (<= y -1.65e+65)
t_1
(if (<= y 3.3e-88)
(+ x (/ 0.3333333333333333 (/ y (/ t z))))
(if (<= y 2.25e-13)
(* (- (/ t y) y) (/ 0.3333333333333333 z))
(if (<= y 3.5e+22)
(+ x (* 0.3333333333333333 (/ t (* z y))))
t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.65e+65) {
tmp = t_1;
} else if (y <= 3.3e-88) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else if (y <= 2.25e-13) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else if (y <= 3.5e+22) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} 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 = x - ((y / z) * 0.3333333333333333d0)
if (y <= (-1.65d+65)) then
tmp = t_1
else if (y <= 3.3d-88) then
tmp = x + (0.3333333333333333d0 / (y / (t / z)))
else if (y <= 2.25d-13) then
tmp = ((t / y) - y) * (0.3333333333333333d0 / z)
else if (y <= 3.5d+22) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
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 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.65e+65) {
tmp = t_1;
} else if (y <= 3.3e-88) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else if (y <= 2.25e-13) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else if (y <= 3.5e+22) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - ((y / z) * 0.3333333333333333) tmp = 0 if y <= -1.65e+65: tmp = t_1 elif y <= 3.3e-88: tmp = x + (0.3333333333333333 / (y / (t / z))) elif y <= 2.25e-13: tmp = ((t / y) - y) * (0.3333333333333333 / z) elif y <= 3.5e+22: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) tmp = 0.0 if (y <= -1.65e+65) tmp = t_1; elseif (y <= 3.3e-88) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y / Float64(t / z)))); elseif (y <= 2.25e-13) tmp = Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)); elseif (y <= 3.5e+22) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - ((y / z) * 0.3333333333333333); tmp = 0.0; if (y <= -1.65e+65) tmp = t_1; elseif (y <= 3.3e-88) tmp = x + (0.3333333333333333 / (y / (t / z))); elseif (y <= 2.25e-13) tmp = ((t / y) - y) * (0.3333333333333333 / z); elseif (y <= 3.5e+22) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+65], t$95$1, If[LessEqual[y, 3.3e-88], N[(x + N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e-13], N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+22], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-13}:\\
\;\;\;\;\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+22}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.65000000000000012e65 or 3.5e22 < y Initial program 99.7%
Taylor expanded in t around 0 96.1%
if -1.65000000000000012e65 < y < 3.29999999999999994e-88Initial program 90.2%
Simplified87.4%
Taylor expanded in y around 0 85.3%
metadata-eval85.3%
clear-num85.3%
inv-pow85.3%
unpow-prod-down85.2%
inv-pow85.2%
associate-/r*85.3%
metadata-eval85.3%
associate-/l*93.6%
Applied egg-rr93.6%
if 3.29999999999999994e-88 < y < 2.25e-13Initial program 92.9%
Taylor expanded in z around 0 92.9%
associate-*r*92.9%
*-commutative92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around 0 92.8%
associate-/r*99.9%
associate-*r/99.9%
associate-*r/99.4%
div-sub99.4%
distribute-lft-out--99.4%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.4%
Applied egg-rr99.4%
if 2.25e-13 < y < 3.5e22Initial program 99.8%
Simplified88.8%
Taylor expanded in y around 0 100.0%
Final simplification95.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* (/ y z) 0.3333333333333333))))
(if (<= y -1.65e+65)
t_1
(if (<= y 3.3e-88)
(+ x (/ 0.3333333333333333 (/ y (/ t z))))
(if (<= y 8e-17)
(/ 0.3333333333333333 (/ z (- (/ t y) y)))
(if (<= y 1.02e+20)
(+ x (* 0.3333333333333333 (/ t (* z y))))
t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.65e+65) {
tmp = t_1;
} else if (y <= 3.3e-88) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else if (y <= 8e-17) {
tmp = 0.3333333333333333 / (z / ((t / y) - y));
} else if (y <= 1.02e+20) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} 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 = x - ((y / z) * 0.3333333333333333d0)
if (y <= (-1.65d+65)) then
tmp = t_1
else if (y <= 3.3d-88) then
tmp = x + (0.3333333333333333d0 / (y / (t / z)))
else if (y <= 8d-17) then
tmp = 0.3333333333333333d0 / (z / ((t / y) - y))
else if (y <= 1.02d+20) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
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 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -1.65e+65) {
tmp = t_1;
} else if (y <= 3.3e-88) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else if (y <= 8e-17) {
tmp = 0.3333333333333333 / (z / ((t / y) - y));
} else if (y <= 1.02e+20) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - ((y / z) * 0.3333333333333333) tmp = 0 if y <= -1.65e+65: tmp = t_1 elif y <= 3.3e-88: tmp = x + (0.3333333333333333 / (y / (t / z))) elif y <= 8e-17: tmp = 0.3333333333333333 / (z / ((t / y) - y)) elif y <= 1.02e+20: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) tmp = 0.0 if (y <= -1.65e+65) tmp = t_1; elseif (y <= 3.3e-88) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y / Float64(t / z)))); elseif (y <= 8e-17) tmp = Float64(0.3333333333333333 / Float64(z / Float64(Float64(t / y) - y))); elseif (y <= 1.02e+20) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - ((y / z) * 0.3333333333333333); tmp = 0.0; if (y <= -1.65e+65) tmp = t_1; elseif (y <= 3.3e-88) tmp = x + (0.3333333333333333 / (y / (t / z))); elseif (y <= 8e-17) tmp = 0.3333333333333333 / (z / ((t / y) - y)); elseif (y <= 1.02e+20) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+65], t$95$1, If[LessEqual[y, 3.3e-88], N[(x + N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-17], N[(0.3333333333333333 / N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+20], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-17}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+20}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.65000000000000012e65 or 1.02e20 < y Initial program 99.7%
Taylor expanded in t around 0 96.1%
if -1.65000000000000012e65 < y < 3.29999999999999994e-88Initial program 90.2%
Simplified87.4%
Taylor expanded in y around 0 85.3%
metadata-eval85.3%
clear-num85.3%
inv-pow85.3%
unpow-prod-down85.2%
inv-pow85.2%
associate-/r*85.3%
metadata-eval85.3%
associate-/l*93.6%
Applied egg-rr93.6%
if 3.29999999999999994e-88 < y < 8.00000000000000057e-17Initial program 92.9%
Taylor expanded in z around 0 92.9%
associate-*r*92.9%
*-commutative92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in x around 0 92.8%
associate-/r*99.9%
associate-*r/99.9%
associate-*r/99.4%
div-sub99.4%
distribute-lft-out--99.4%
associate-/l*99.8%
Simplified99.8%
if 8.00000000000000057e-17 < y < 1.02e20Initial program 99.8%
Simplified88.8%
Taylor expanded in y around 0 100.0%
Final simplification95.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.6e-153)
(+ (+ x (* -0.3333333333333333 (/ y z))) (/ (/ (/ t y) 3.0) z))
(if (<= y 2.8e-121)
(+ x (/ 0.3333333333333333 (/ y (/ t z))))
(+ x (/ (- y (/ t y)) (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.6e-153) {
tmp = (x + (-0.3333333333333333 * (y / z))) + (((t / y) / 3.0) / z);
} else if (y <= 2.8e-121) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.6d-153)) then
tmp = (x + ((-0.3333333333333333d0) * (y / z))) + (((t / y) / 3.0d0) / z)
else if (y <= 2.8d-121) then
tmp = x + (0.3333333333333333d0 / (y / (t / z)))
else
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.6e-153) {
tmp = (x + (-0.3333333333333333 * (y / z))) + (((t / y) / 3.0) / z);
} else if (y <= 2.8e-121) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.6e-153: tmp = (x + (-0.3333333333333333 * (y / z))) + (((t / y) / 3.0) / z) elif y <= 2.8e-121: tmp = x + (0.3333333333333333 / (y / (t / z))) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.6e-153) tmp = Float64(Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) + Float64(Float64(Float64(t / y) / 3.0) / z)); elseif (y <= 2.8e-121) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y / Float64(t / z)))); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.6e-153) tmp = (x + (-0.3333333333333333 * (y / z))) + (((t / y) / 3.0) / z); elseif (y <= 2.8e-121) tmp = x + (0.3333333333333333 / (y / (t / z))); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.6e-153], N[(N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t / y), $MachinePrecision] / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-121], N[(x + N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{-153}:\\
\;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{\frac{\frac{t}{y}}{3}}{z}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-121}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if y < -5.6000000000000001e-153Initial program 96.7%
sub-neg96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
times-frac96.7%
metadata-eval96.7%
associate-/l/99.7%
associate-/l/99.8%
Simplified99.8%
if -5.6000000000000001e-153 < y < 2.8000000000000001e-121Initial program 87.7%
Simplified79.9%
Taylor expanded in y around 0 87.6%
metadata-eval87.6%
clear-num87.6%
inv-pow87.6%
unpow-prod-down87.6%
inv-pow87.6%
associate-/r*87.7%
metadata-eval87.7%
associate-/l*98.9%
Applied egg-rr98.9%
if 2.8000000000000001e-121 < y Initial program 98.5%
Simplified98.3%
*-commutative98.3%
clear-num98.3%
un-div-inv98.4%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 0.3333333333333333 (* y (/ z t))))
(t_2 (- x (* (/ y z) 0.3333333333333333))))
(if (<= y -7.4e-77)
t_2
(if (<= y 3.5e-197)
t_1
(if (<= y 1.48e-155) x (if (<= y 9.2e-8) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 / (y * (z / t));
double t_2 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -7.4e-77) {
tmp = t_2;
} else if (y <= 3.5e-197) {
tmp = t_1;
} else if (y <= 1.48e-155) {
tmp = x;
} else if (y <= 9.2e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = 0.3333333333333333d0 / (y * (z / t))
t_2 = x - ((y / z) * 0.3333333333333333d0)
if (y <= (-7.4d-77)) then
tmp = t_2
else if (y <= 3.5d-197) then
tmp = t_1
else if (y <= 1.48d-155) then
tmp = x
else if (y <= 9.2d-8) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 / (y * (z / t));
double t_2 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -7.4e-77) {
tmp = t_2;
} else if (y <= 3.5e-197) {
tmp = t_1;
} else if (y <= 1.48e-155) {
tmp = x;
} else if (y <= 9.2e-8) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 / (y * (z / t)) t_2 = x - ((y / z) * 0.3333333333333333) tmp = 0 if y <= -7.4e-77: tmp = t_2 elif y <= 3.5e-197: tmp = t_1 elif y <= 1.48e-155: tmp = x elif y <= 9.2e-8: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 / Float64(y * Float64(z / t))) t_2 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) tmp = 0.0 if (y <= -7.4e-77) tmp = t_2; elseif (y <= 3.5e-197) tmp = t_1; elseif (y <= 1.48e-155) tmp = x; elseif (y <= 9.2e-8) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 / (y * (z / t)); t_2 = x - ((y / z) * 0.3333333333333333); tmp = 0.0; if (y <= -7.4e-77) tmp = t_2; elseif (y <= 3.5e-197) tmp = t_1; elseif (y <= 1.48e-155) tmp = x; elseif (y <= 9.2e-8) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.4e-77], t$95$2, If[LessEqual[y, 3.5e-197], t$95$1, If[LessEqual[y, 1.48e-155], x, If[LessEqual[y, 9.2e-8], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
t_2 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -7.4 \cdot 10^{-77}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-197}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.48 \cdot 10^{-155}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.39999999999999992e-77 or 9.2000000000000003e-8 < y Initial program 98.3%
Taylor expanded in t around 0 86.5%
if -7.39999999999999992e-77 < y < 3.4999999999999998e-197 or 1.48e-155 < y < 9.2000000000000003e-8Initial program 89.2%
Taylor expanded in z around 0 89.2%
associate-*r*89.2%
*-commutative89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in x around 0 71.0%
associate-/r*67.7%
associate-*r/67.7%
associate-*r/67.6%
div-sub67.6%
distribute-lft-out--67.6%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in t around inf 66.5%
*-commutative66.5%
associate-*l/73.4%
Simplified73.4%
if 3.4999999999999998e-197 < y < 1.48e-155Initial program 100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* (/ y z) 0.3333333333333333))))
(if (<= y -2.9e-77)
t_1
(if (<= y 3.2e-196)
(/ 0.3333333333333333 (/ y (/ t z)))
(if (<= y 1.6e-155)
x
(if (<= y 9.2e-8) (/ 0.3333333333333333 (* y (/ z t))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -2.9e-77) {
tmp = t_1;
} else if (y <= 3.2e-196) {
tmp = 0.3333333333333333 / (y / (t / z));
} else if (y <= 1.6e-155) {
tmp = x;
} else if (y <= 9.2e-8) {
tmp = 0.3333333333333333 / (y * (z / t));
} 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 = x - ((y / z) * 0.3333333333333333d0)
if (y <= (-2.9d-77)) then
tmp = t_1
else if (y <= 3.2d-196) then
tmp = 0.3333333333333333d0 / (y / (t / z))
else if (y <= 1.6d-155) then
tmp = x
else if (y <= 9.2d-8) then
tmp = 0.3333333333333333d0 / (y * (z / t))
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 = x - ((y / z) * 0.3333333333333333);
double tmp;
if (y <= -2.9e-77) {
tmp = t_1;
} else if (y <= 3.2e-196) {
tmp = 0.3333333333333333 / (y / (t / z));
} else if (y <= 1.6e-155) {
tmp = x;
} else if (y <= 9.2e-8) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - ((y / z) * 0.3333333333333333) tmp = 0 if y <= -2.9e-77: tmp = t_1 elif y <= 3.2e-196: tmp = 0.3333333333333333 / (y / (t / z)) elif y <= 1.6e-155: tmp = x elif y <= 9.2e-8: tmp = 0.3333333333333333 / (y * (z / t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) tmp = 0.0 if (y <= -2.9e-77) tmp = t_1; elseif (y <= 3.2e-196) tmp = Float64(0.3333333333333333 / Float64(y / Float64(t / z))); elseif (y <= 1.6e-155) tmp = x; elseif (y <= 9.2e-8) tmp = Float64(0.3333333333333333 / Float64(y * Float64(z / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - ((y / z) * 0.3333333333333333); tmp = 0.0; if (y <= -2.9e-77) tmp = t_1; elseif (y <= 3.2e-196) tmp = 0.3333333333333333 / (y / (t / z)); elseif (y <= 1.6e-155) tmp = x; elseif (y <= 9.2e-8) tmp = 0.3333333333333333 / (y * (z / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-77], t$95$1, If[LessEqual[y, 3.2e-196], N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-155], x, If[LessEqual[y, 9.2e-8], N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z} \cdot 0.3333333333333333\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{-77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-196}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-155}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.8999999999999999e-77 or 9.2000000000000003e-8 < y Initial program 98.3%
Taylor expanded in t around 0 86.5%
if -2.8999999999999999e-77 < y < 3.2e-196Initial program 87.9%
Taylor expanded in z around 0 88.0%
associate-*r*88.0%
*-commutative88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in x around 0 67.3%
associate-/r*61.8%
associate-*r/61.7%
associate-*r/61.7%
div-sub61.7%
distribute-lft-out--61.7%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in t around inf 65.8%
associate-/l*74.5%
Simplified74.5%
if 3.2e-196 < y < 1.60000000000000006e-155Initial program 100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 1.60000000000000006e-155 < y < 9.2000000000000003e-8Initial program 93.1%
Taylor expanded in z around 0 93.1%
associate-*r*93.0%
*-commutative93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in x around 0 82.5%
associate-/r*85.9%
associate-*r/86.0%
associate-*r/85.8%
div-sub85.8%
distribute-lft-out--85.8%
associate-/l*85.9%
Simplified85.9%
Taylor expanded in t around inf 68.7%
*-commutative68.7%
associate-*l/72.0%
Simplified72.0%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.05e-150) (not (<= y 2.36e-122))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (/ 0.3333333333333333 (/ y (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.05e-150) || !(y <= 2.36e-122)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + (0.3333333333333333 / (y / (t / z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.05d-150)) .or. (.not. (y <= 2.36d-122))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x + (0.3333333333333333d0 / (y / (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.05e-150) || !(y <= 2.36e-122)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + (0.3333333333333333 / (y / (t / z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.05e-150) or not (y <= 2.36e-122): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + (0.3333333333333333 / (y / (t / z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.05e-150) || !(y <= 2.36e-122)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(y / Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.05e-150) || ~((y <= 2.36e-122))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + (0.3333333333333333 / (y / (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.05e-150], N[Not[LessEqual[y, 2.36e-122]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{-150} \lor \neg \left(y \leq 2.36 \cdot 10^{-122}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\end{array}
\end{array}
if y < -2.0499999999999999e-150 or 2.35999999999999995e-122 < y Initial program 97.5%
Simplified99.1%
Taylor expanded in z around 0 99.2%
if -2.0499999999999999e-150 < y < 2.35999999999999995e-122Initial program 87.7%
Simplified79.9%
Taylor expanded in y around 0 87.6%
metadata-eval87.6%
clear-num87.6%
inv-pow87.6%
unpow-prod-down87.6%
inv-pow87.6%
associate-/r*87.7%
metadata-eval87.7%
associate-/l*98.9%
Applied egg-rr98.9%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -3.9e-150)
(+ x (* -0.3333333333333333 (/ t_1 z)))
(if (<= y 4.5e-124)
(+ x (/ 0.3333333333333333 (/ y (/ t z))))
(+ x (/ t_1 (* z -3.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.9e-150) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 4.5e-124) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else {
tmp = x + (t_1 / (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) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-3.9d-150)) then
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
else if (y <= 4.5d-124) then
tmp = x + (0.3333333333333333d0 / (y / (t / z)))
else
tmp = x + (t_1 / (z * (-3.0d0)))
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 <= -3.9e-150) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 4.5e-124) {
tmp = x + (0.3333333333333333 / (y / (t / z)));
} else {
tmp = x + (t_1 / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -3.9e-150: tmp = x + (-0.3333333333333333 * (t_1 / z)) elif y <= 4.5e-124: tmp = x + (0.3333333333333333 / (y / (t / z))) else: tmp = x + (t_1 / (z * -3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -3.9e-150) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); elseif (y <= 4.5e-124) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y / Float64(t / z)))); else tmp = Float64(x + Float64(t_1 / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -3.9e-150) tmp = x + (-0.3333333333333333 * (t_1 / z)); elseif (y <= 4.5e-124) tmp = x + (0.3333333333333333 / (y / (t / z))); else tmp = x + (t_1 / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.9e-150], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-124], N[(x + N[(0.3333333333333333 / N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3.9 \cdot 10^{-150}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t_1}{z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y}{\frac{t}{z}}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t_1}{z \cdot -3}\\
\end{array}
\end{array}
if y < -3.9000000000000002e-150Initial program 96.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
if -3.9000000000000002e-150 < y < 4.4999999999999996e-124Initial program 87.7%
Simplified79.9%
Taylor expanded in y around 0 87.6%
metadata-eval87.6%
clear-num87.6%
inv-pow87.6%
unpow-prod-down87.6%
inv-pow87.6%
associate-/r*87.7%
metadata-eval87.7%
associate-/l*98.9%
Applied egg-rr98.9%
if 4.4999999999999996e-124 < y Initial program 98.5%
Simplified98.3%
*-commutative98.3%
clear-num98.3%
un-div-inv98.4%
div-inv98.5%
metadata-eval98.5%
Applied egg-rr98.5%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.35e+95) (not (<= z 4.8e+140))) (+ x (* y (/ -0.3333333333333333 z))) (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.35e+95) || !(z <= 4.8e+140)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = ((t / y) - 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 ((z <= (-1.35d+95)) .or. (.not. (z <= 4.8d+140))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = ((t / y) - 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 ((z <= -1.35e+95) || !(z <= 4.8e+140)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.35e+95) or not (z <= 4.8e+140): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = ((t / y) - y) * (0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.35e+95) || !(z <= 4.8e+140)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.35e+95) || ~((z <= 4.8e+140))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = ((t / y) - y) * (0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.35e+95], N[Not[LessEqual[z, 4.8e+140]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+95} \lor \neg \left(z \leq 4.8 \cdot 10^{+140}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if z < -1.35e95 or 4.7999999999999999e140 < z Initial program 98.7%
Simplified81.6%
Taylor expanded in y around inf 73.1%
if -1.35e95 < z < 4.7999999999999999e140Initial program 92.1%
Taylor expanded in z around 0 92.1%
associate-*r*92.1%
*-commutative92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in x around 0 80.8%
associate-/r*86.0%
associate-*r/85.9%
associate-*r/85.8%
div-sub85.8%
distribute-lft-out--85.8%
associate-/l*85.9%
Simplified85.9%
associate-/r/85.8%
Applied egg-rr85.8%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (<= x -1.3e+92) x (if (<= x 4.8e+35) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e+92) {
tmp = x;
} else if (x <= 4.8e+35) {
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 (x <= (-1.3d+92)) then
tmp = x
else if (x <= 4.8d+35) 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 (x <= -1.3e+92) {
tmp = x;
} else if (x <= 4.8e+35) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.3e+92: tmp = x elif x <= 4.8e+35: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.3e+92) tmp = x; elseif (x <= 4.8e+35) 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 (x <= -1.3e+92) tmp = x; elseif (x <= 4.8e+35) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.3e+92], x, If[LessEqual[x, 4.8e+35], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+92}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+35}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.2999999999999999e92 or 4.80000000000000029e35 < x Initial program 95.7%
Simplified94.6%
Taylor expanded in x around inf 55.3%
if -1.2999999999999999e92 < x < 4.80000000000000029e35Initial program 93.5%
Taylor expanded in z around 0 93.5%
associate-*r*93.5%
*-commutative93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in y around inf 44.1%
*-commutative44.1%
Simplified44.1%
Final simplification48.0%
(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 94.3%
Simplified92.7%
Taylor expanded in y around inf 59.9%
Final simplification59.9%
(FPCore (x y z t) :precision binary64 (+ x (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + (y / (z * -3.0));
}
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)))
end function
public static double code(double x, double y, double z, double t) {
return x + (y / (z * -3.0));
}
def code(x, y, z, t): return x + (y / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{z \cdot -3}
\end{array}
Initial program 94.3%
Simplified92.7%
*-commutative92.7%
clear-num92.7%
un-div-inv92.7%
div-inv92.8%
metadata-eval92.8%
Applied egg-rr92.8%
Taylor expanded in y around inf 59.9%
Final simplification59.9%
(FPCore (x y z t) :precision binary64 (- x (* (/ y z) 0.3333333333333333)))
double code(double x, double y, double z, double t) {
return x - ((y / z) * 0.3333333333333333);
}
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) * 0.3333333333333333d0)
end function
public static double code(double x, double y, double z, double t) {
return x - ((y / z) * 0.3333333333333333);
}
def code(x, y, z, t): return x - ((y / z) * 0.3333333333333333)
function code(x, y, z, t) return Float64(x - Float64(Float64(y / z) * 0.3333333333333333)) end
function tmp = code(x, y, z, t) tmp = x - ((y / z) * 0.3333333333333333); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{z} \cdot 0.3333333333333333
\end{array}
Initial program 94.3%
Taylor expanded in t around 0 59.9%
Final simplification59.9%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.3%
Simplified92.7%
Taylor expanded in x around inf 26.8%
Final simplification26.8%
(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 2023276
(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))))