
(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 24 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 (/ t (* y (* z 3.0)))))
(if (<= (* z 3.0) -2e+108)
(+ (- x (/ 1.0 (* 3.0 (/ z y)))) t_1)
(if (<= (* z 3.0) 1e-62)
(- x (* 0.3333333333333333 (/ (- y (/ t y)) z)))
(+ t_1 (- x (/ y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = t / (y * (z * 3.0));
double tmp;
if ((z * 3.0) <= -2e+108) {
tmp = (x - (1.0 / (3.0 * (z / y)))) + t_1;
} else if ((z * 3.0) <= 1e-62) {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = t_1 + (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) :: t_1
real(8) :: tmp
t_1 = t / (y * (z * 3.0d0))
if ((z * 3.0d0) <= (-2d+108)) then
tmp = (x - (1.0d0 / (3.0d0 * (z / y)))) + t_1
else if ((z * 3.0d0) <= 1d-62) then
tmp = x - (0.3333333333333333d0 * ((y - (t / y)) / z))
else
tmp = t_1 + (x - (y / (z * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = t / (y * (z * 3.0));
double tmp;
if ((z * 3.0) <= -2e+108) {
tmp = (x - (1.0 / (3.0 * (z / y)))) + t_1;
} else if ((z * 3.0) <= 1e-62) {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = t_1 + (x - (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): t_1 = t / (y * (z * 3.0)) tmp = 0 if (z * 3.0) <= -2e+108: tmp = (x - (1.0 / (3.0 * (z / y)))) + t_1 elif (z * 3.0) <= 1e-62: tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = t_1 + (x - (y / (z * 3.0))) return tmp
function code(x, y, z, t) t_1 = Float64(t / Float64(y * Float64(z * 3.0))) tmp = 0.0 if (Float64(z * 3.0) <= -2e+108) tmp = Float64(Float64(x - Float64(1.0 / Float64(3.0 * Float64(z / y)))) + t_1); elseif (Float64(z * 3.0) <= 1e-62) tmp = Float64(x - Float64(0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(t_1 + Float64(x - Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = t / (y * (z * 3.0)); tmp = 0.0; if ((z * 3.0) <= -2e+108) tmp = (x - (1.0 / (3.0 * (z / y)))) + t_1; elseif ((z * 3.0) <= 1e-62) tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)); else tmp = t_1 + (x - (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+108], N[(N[(x - N[(1.0 / N[(3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-62], N[(x - N[(0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+108}:\\
\;\;\;\;\left(x - \frac{1}{3 \cdot \frac{z}{y}}\right) + t_1\\
\mathbf{elif}\;z \cdot 3 \leq 10^{-62}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(x - \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < -2.0000000000000001e108Initial program 99.7%
clear-num99.7%
inv-pow99.7%
*-commutative99.7%
*-un-lft-identity99.7%
times-frac99.8%
metadata-eval99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
if -2.0000000000000001e108 < (*.f64 z 3) < 1e-62Initial program 91.2%
Simplified99.8%
Taylor expanded in z around 0 99.9%
if 1e-62 < (*.f64 z 3) Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (/ 0.3333333333333333 z))))
(if (<= t 4e-137)
(- (+ (/ (/ t z) (* y 3.0)) x) t_1)
(fma t (/ 0.3333333333333333 (* z y)) (- x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = y * (0.3333333333333333 / z);
double tmp;
if (t <= 4e-137) {
tmp = (((t / z) / (y * 3.0)) + x) - t_1;
} else {
tmp = fma(t, (0.3333333333333333 / (z * y)), (x - t_1));
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(y * Float64(0.3333333333333333 / z)) tmp = 0.0 if (t <= 4e-137) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x) - t_1); else tmp = fma(t, Float64(0.3333333333333333 / Float64(z * y)), Float64(x - t_1)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, 4e-137], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - t$95$1), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(x - t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{if}\;t \leq 4 \cdot 10^{-137}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{0.3333333333333333}{z \cdot y}, x - t_1\right)\\
\end{array}
\end{array}
if t < 3.99999999999999991e-137Initial program 93.9%
associate-*l*93.9%
*-commutative93.9%
Simplified93.9%
+-commutative93.9%
*-commutative93.9%
associate-*l*93.9%
associate-+r-93.9%
associate-*l*93.9%
*-commutative93.9%
associate-/r*97.5%
div-inv97.5%
metadata-eval97.5%
div-inv97.4%
clear-num97.4%
Applied egg-rr97.4%
if 3.99999999999999991e-137 < t Initial program 97.7%
associate-*l*97.6%
*-commutative97.6%
Simplified97.6%
+-commutative97.6%
*-commutative97.6%
associate-*l*97.7%
div-inv97.7%
fma-def99.8%
associate-*l*99.6%
*-commutative99.6%
div-inv99.6%
metadata-eval99.6%
div-inv99.6%
clear-num99.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 99.8%
Final simplification98.3%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -1e-5) (not (<= (* z 3.0) 1e-62))) (+ (- x (/ y (* z 3.0))) (/ t (* z (* y 3.0)))) (- x (* 0.3333333333333333 (/ (- y (/ t y)) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e-5) || !((z * 3.0) <= 1e-62)) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
} else {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-1d-5)) .or. (.not. ((z * 3.0d0) <= 1d-62))) then
tmp = (x - (y / (z * 3.0d0))) + (t / (z * (y * 3.0d0)))
else
tmp = x - (0.3333333333333333d0 * ((y - (t / y)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e-5) || !((z * 3.0) <= 1e-62)) {
tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0)));
} else {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -1e-5) or not ((z * 3.0) <= 1e-62): tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))) else: tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -1e-5) || !(Float64(z * 3.0) <= 1e-62)) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(z * Float64(y * 3.0)))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -1e-5) || ~(((z * 3.0) <= 1e-62))) tmp = (x - (y / (z * 3.0))) + (t / (z * (y * 3.0))); else tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -1e-5], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-62]], $MachinePrecision]], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-5} \lor \neg \left(z \cdot 3 \leq 10^{-62}\right):\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{z \cdot \left(y \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.00000000000000008e-5 or 1e-62 < (*.f64 z 3) Initial program 99.8%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
if -1.00000000000000008e-5 < (*.f64 z 3) < 1e-62Initial program 89.4%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -1e-5) (not (<= (* z 3.0) 1e-62))) (+ (/ t (* y (* z 3.0))) (- x (/ y (* z 3.0)))) (- x (* 0.3333333333333333 (/ (- y (/ t y)) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e-5) || !((z * 3.0) <= 1e-62)) {
tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0)));
} else {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-1d-5)) .or. (.not. ((z * 3.0d0) <= 1d-62))) then
tmp = (t / (y * (z * 3.0d0))) + (x - (y / (z * 3.0d0)))
else
tmp = x - (0.3333333333333333d0 * ((y - (t / y)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e-5) || !((z * 3.0) <= 1e-62)) {
tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0)));
} else {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -1e-5) or not ((z * 3.0) <= 1e-62): tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))) else: tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -1e-5) || !(Float64(z * 3.0) <= 1e-62)) tmp = Float64(Float64(t / Float64(y * Float64(z * 3.0))) + Float64(x - Float64(y / Float64(z * 3.0)))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -1e-5) || ~(((z * 3.0) <= 1e-62))) tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))); else tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -1e-5], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-62]], $MachinePrecision]], N[(N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-5} \lor \neg \left(z \cdot 3 \leq 10^{-62}\right):\\
\;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.00000000000000008e-5 or 1e-62 < (*.f64 z 3) Initial program 99.8%
if -1.00000000000000008e-5 < (*.f64 z 3) < 1e-62Initial program 89.4%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(if (<= (* z 3.0) -2e+113)
(- (+ (/ (/ t z) (* y 3.0)) x) (* y (/ 0.3333333333333333 z)))
(if (<= (* z 3.0) 1e-62)
(- x (* 0.3333333333333333 (/ (- y (/ t y)) z)))
(+ (/ t (* y (* z 3.0))) (- x (/ y (* z 3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+113) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else if ((z * 3.0) <= 1e-62) {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = (t / (y * (z * 3.0))) + (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 ((z * 3.0d0) <= (-2d+113)) then
tmp = (((t / z) / (y * 3.0d0)) + x) - (y * (0.3333333333333333d0 / z))
else if ((z * 3.0d0) <= 1d-62) then
tmp = x - (0.3333333333333333d0 * ((y - (t / y)) / z))
else
tmp = (t / (y * (z * 3.0d0))) + (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 ((z * 3.0) <= -2e+113) {
tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z));
} else if ((z * 3.0) <= 1e-62) {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e+113: tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)) elif (z * 3.0) <= 1e-62: tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e+113) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(y * 3.0)) + x) - Float64(y * Float64(0.3333333333333333 / z))); elseif (Float64(z * 3.0) <= 1e-62) tmp = Float64(x - Float64(0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(Float64(t / Float64(y * Float64(z * 3.0))) + Float64(x - Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -2e+113) tmp = (((t / z) / (y * 3.0)) + x) - (y * (0.3333333333333333 / z)); elseif ((z * 3.0) <= 1e-62) tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)); else tmp = (t / (y * (z * 3.0))) + (x - (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+113], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-62], N[(x - N[(0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+113}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{y \cdot 3} + x\right) - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;z \cdot 3 \leq 10^{-62}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)} + \left(x - \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < -2e113Initial program 99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
+-commutative99.7%
*-commutative99.7%
associate-*l*99.7%
associate-+r-99.7%
associate-*l*99.7%
*-commutative99.7%
associate-/r*99.7%
div-inv99.7%
metadata-eval99.7%
div-inv99.6%
clear-num99.7%
Applied egg-rr99.7%
if -2e113 < (*.f64 z 3) < 1e-62Initial program 91.2%
Simplified99.8%
Taylor expanded in z around 0 99.9%
if 1e-62 < (*.f64 z 3) Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= y -3e+78)
t_1
(if (<= y -7.6e+30)
(+ x (/ t (* y (* z 3.0))))
(if (<= y -340000000.0)
(* (- y (/ t y)) (/ -0.3333333333333333 z))
(if (<= y 6.5e+60)
(+ x (/ (* (/ t z) 0.3333333333333333) y))
t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if (y <= -3e+78) {
tmp = t_1;
} else if (y <= -7.6e+30) {
tmp = x + (t / (y * (z * 3.0)));
} else if (y <= -340000000.0) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else if (y <= 6.5e+60) {
tmp = x + (((t / z) * 0.3333333333333333) / 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 * 3.0d0))
if (y <= (-3d+78)) then
tmp = t_1
else if (y <= (-7.6d+30)) then
tmp = x + (t / (y * (z * 3.0d0)))
else if (y <= (-340000000.0d0)) then
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
else if (y <= 6.5d+60) then
tmp = x + (((t / z) * 0.3333333333333333d0) / 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 * 3.0));
double tmp;
if (y <= -3e+78) {
tmp = t_1;
} else if (y <= -7.6e+30) {
tmp = x + (t / (y * (z * 3.0)));
} else if (y <= -340000000.0) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else if (y <= 6.5e+60) {
tmp = x + (((t / z) * 0.3333333333333333) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if y <= -3e+78: tmp = t_1 elif y <= -7.6e+30: tmp = x + (t / (y * (z * 3.0))) elif y <= -340000000.0: tmp = (y - (t / y)) * (-0.3333333333333333 / z) elif y <= 6.5e+60: tmp = x + (((t / z) * 0.3333333333333333) / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (y <= -3e+78) tmp = t_1; elseif (y <= -7.6e+30) tmp = Float64(x + Float64(t / Float64(y * Float64(z * 3.0)))); elseif (y <= -340000000.0) tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); elseif (y <= 6.5e+60) tmp = Float64(x + Float64(Float64(Float64(t / z) * 0.3333333333333333) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if (y <= -3e+78) tmp = t_1; elseif (y <= -7.6e+30) tmp = x + (t / (y * (z * 3.0))); elseif (y <= -340000000.0) tmp = (y - (t / y)) * (-0.3333333333333333 / z); elseif (y <= 6.5e+60) tmp = x + (((t / z) * 0.3333333333333333) / y); else tmp = t_1; 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[y, -3e+78], t$95$1, If[LessEqual[y, -7.6e+30], N[(x + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -340000000.0], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+60], N[(x + N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;y \leq -3 \cdot 10^{+78}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{+30}:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{elif}\;y \leq -340000000:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+60}:\\
\;\;\;\;x + \frac{\frac{t}{z} \cdot 0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.99999999999999982e78 or 6.49999999999999931e60 < 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*97.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.0%
if -2.99999999999999982e78 < y < -7.6000000000000003e30Initial program 99.9%
Simplified99.5%
Taylor expanded in t around inf 90.5%
clear-num90.5%
frac-times90.7%
*-un-lft-identity90.7%
div-inv90.9%
metadata-eval90.9%
Applied egg-rr90.9%
if -7.6000000000000003e30 < y < -3.4e8Initial program 99.7%
associate-*l*99.4%
*-commutative99.4%
Simplified99.4%
+-commutative99.4%
*-commutative99.4%
associate-*l*99.7%
div-inv99.7%
fma-def99.7%
associate-*l*99.4%
*-commutative99.4%
div-inv98.8%
metadata-eval98.8%
div-inv99.1%
clear-num99.1%
Applied egg-rr99.1%
Taylor expanded in z around 0 99.7%
cancel-sign-sub-inv99.7%
metadata-eval99.7%
times-frac99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
distribute-rgt-neg-in99.4%
times-frac99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
distribute-lft-in99.7%
+-commutative99.7%
sub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
associate-*l/99.7%
associate-*r/99.4%
distribute-rgt-neg-in99.4%
distribute-neg-frac99.4%
Simplified99.4%
if -3.4e8 < y < 6.49999999999999931e60Initial program 93.5%
Simplified92.2%
Taylor expanded in t around inf 88.6%
associate-*r/88.5%
*-commutative88.5%
associate-/r*92.9%
associate-*r/92.9%
Simplified92.9%
Final simplification94.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= y -4.3e+80)
t_1
(if (<= y -1.85e+31)
(+ x (/ t (* y (* z 3.0))))
(if (<= y -1.7e+15)
(* (- y (/ t y)) (/ -0.3333333333333333 z))
(if (<= y 2.15e+52)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if (y <= -4.3e+80) {
tmp = t_1;
} else if (y <= -1.85e+31) {
tmp = x + (t / (y * (z * 3.0)));
} else if (y <= -1.7e+15) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else if (y <= 2.15e+52) {
tmp = x + ((t * (0.3333333333333333 / 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 * 3.0d0))
if (y <= (-4.3d+80)) then
tmp = t_1
else if (y <= (-1.85d+31)) then
tmp = x + (t / (y * (z * 3.0d0)))
else if (y <= (-1.7d+15)) then
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
else if (y <= 2.15d+52) then
tmp = x + ((t * (0.3333333333333333d0 / 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 * 3.0));
double tmp;
if (y <= -4.3e+80) {
tmp = t_1;
} else if (y <= -1.85e+31) {
tmp = x + (t / (y * (z * 3.0)));
} else if (y <= -1.7e+15) {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
} else if (y <= 2.15e+52) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if y <= -4.3e+80: tmp = t_1 elif y <= -1.85e+31: tmp = x + (t / (y * (z * 3.0))) elif y <= -1.7e+15: tmp = (y - (t / y)) * (-0.3333333333333333 / z) elif y <= 2.15e+52: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (y <= -4.3e+80) tmp = t_1; elseif (y <= -1.85e+31) tmp = Float64(x + Float64(t / Float64(y * Float64(z * 3.0)))); elseif (y <= -1.7e+15) tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); elseif (y <= 2.15e+52) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if (y <= -4.3e+80) tmp = t_1; elseif (y <= -1.85e+31) tmp = x + (t / (y * (z * 3.0))); elseif (y <= -1.7e+15) tmp = (y - (t / y)) * (-0.3333333333333333 / z); elseif (y <= 2.15e+52) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = t_1; 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[y, -4.3e+80], t$95$1, If[LessEqual[y, -1.85e+31], N[(x + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e+15], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.15e+52], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+31}:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{+15}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{+52}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.30000000000000004e80 or 2.15e52 < 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*97.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.0%
if -4.30000000000000004e80 < y < -1.8499999999999999e31Initial program 99.9%
Simplified99.5%
Taylor expanded in t around inf 90.5%
clear-num90.5%
frac-times90.7%
*-un-lft-identity90.7%
div-inv90.9%
metadata-eval90.9%
Applied egg-rr90.9%
if -1.8499999999999999e31 < y < -1.7e15Initial program 99.7%
associate-*l*99.4%
*-commutative99.4%
Simplified99.4%
+-commutative99.4%
*-commutative99.4%
associate-*l*99.7%
div-inv99.7%
fma-def99.7%
associate-*l*99.4%
*-commutative99.4%
div-inv98.8%
metadata-eval98.8%
div-inv99.1%
clear-num99.1%
Applied egg-rr99.1%
Taylor expanded in z around 0 99.7%
cancel-sign-sub-inv99.7%
metadata-eval99.7%
times-frac99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
distribute-rgt-neg-in99.4%
times-frac99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
distribute-lft-in99.7%
+-commutative99.7%
sub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
associate-*l/99.7%
associate-*r/99.4%
distribute-rgt-neg-in99.4%
distribute-neg-frac99.4%
Simplified99.4%
if -1.7e15 < y < 2.15e52Initial program 93.5%
Simplified92.2%
Taylor expanded in t around inf 86.0%
associate-*r/93.0%
Applied egg-rr93.0%
Final simplification94.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= y -8.5e-33)
t_1
(if (<= y 1.62e-111)
(/ (/ 0.3333333333333333 z) (/ y t))
(if (<= y 7.5e-100)
t_1
(if (<= y 115000.0)
(/ t (* 3.0 (* z y)))
(- x (* 0.3333333333333333 (/ y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if (y <= -8.5e-33) {
tmp = t_1;
} else if (y <= 1.62e-111) {
tmp = (0.3333333333333333 / z) / (y / t);
} else if (y <= 7.5e-100) {
tmp = t_1;
} else if (y <= 115000.0) {
tmp = t / (3.0 * (z * y));
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y / (z * 3.0d0))
if (y <= (-8.5d-33)) then
tmp = t_1
else if (y <= 1.62d-111) then
tmp = (0.3333333333333333d0 / z) / (y / t)
else if (y <= 7.5d-100) then
tmp = t_1
else if (y <= 115000.0d0) then
tmp = t / (3.0d0 * (z * y))
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 t_1 = x - (y / (z * 3.0));
double tmp;
if (y <= -8.5e-33) {
tmp = t_1;
} else if (y <= 1.62e-111) {
tmp = (0.3333333333333333 / z) / (y / t);
} else if (y <= 7.5e-100) {
tmp = t_1;
} else if (y <= 115000.0) {
tmp = t / (3.0 * (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if y <= -8.5e-33: tmp = t_1 elif y <= 1.62e-111: tmp = (0.3333333333333333 / z) / (y / t) elif y <= 7.5e-100: tmp = t_1 elif y <= 115000.0: tmp = t / (3.0 * (z * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (y <= -8.5e-33) tmp = t_1; elseif (y <= 1.62e-111) tmp = Float64(Float64(0.3333333333333333 / z) / Float64(y / t)); elseif (y <= 7.5e-100) tmp = t_1; elseif (y <= 115000.0) tmp = Float64(t / Float64(3.0 * Float64(z * y))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if (y <= -8.5e-33) tmp = t_1; elseif (y <= 1.62e-111) tmp = (0.3333333333333333 / z) / (y / t); elseif (y <= 7.5e-100) tmp = t_1; elseif (y <= 115000.0) tmp = t / (3.0 * (z * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e-33], t$95$1, If[LessEqual[y, 1.62e-111], N[(N[(0.3333333333333333 / z), $MachinePrecision] / N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e-100], t$95$1, If[LessEqual[y, 115000.0], N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-111}:\\
\;\;\;\;\frac{\frac{0.3333333333333333}{z}}{\frac{y}{t}}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 115000:\\
\;\;\;\;\frac{t}{3 \cdot \left(z \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -8.49999999999999945e-33 or 1.62000000000000004e-111 < y < 7.50000000000000015e-100Initial program 98.6%
associate-*l*98.5%
*-commutative98.5%
Simplified98.5%
*-commutative98.5%
associate-*l*98.6%
associate-+l-98.6%
*-commutative98.6%
associate-/r*98.7%
sub-div98.7%
Applied egg-rr98.7%
Taylor expanded in y around inf 81.7%
if -8.49999999999999945e-33 < y < 1.62000000000000004e-111Initial program 92.2%
associate-*l*92.3%
*-commutative92.3%
Simplified92.3%
+-commutative92.3%
*-commutative92.3%
associate-*l*92.2%
div-inv91.2%
fma-def91.2%
associate-*l*91.1%
*-commutative91.1%
div-inv91.1%
metadata-eval91.1%
div-inv91.1%
clear-num91.1%
Applied egg-rr91.1%
Taylor expanded in t around inf 68.9%
associate-*r/68.9%
associate-/l*69.0%
associate-*l/71.0%
associate-/l/71.1%
Applied egg-rr71.1%
if 7.50000000000000015e-100 < y < 115000Initial program 95.6%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
+-commutative95.4%
*-commutative95.4%
associate-*l*95.6%
div-inv95.5%
fma-def95.5%
associate-*l*95.6%
*-commutative95.6%
div-inv95.5%
metadata-eval95.5%
div-inv95.5%
clear-num95.5%
Applied egg-rr95.5%
Taylor expanded in t around inf 60.1%
*-commutative60.1%
associate-*l/60.1%
associate-*r/60.0%
clear-num59.9%
un-div-inv60.0%
associate-/l*60.2%
Applied egg-rr60.2%
Taylor expanded in y around 0 60.2%
*-commutative60.2%
Simplified60.2%
if 115000 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification77.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.9e-41) (not (<= y 3.45e-161))) (- x (* 0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (/ (* t (/ 0.3333333333333333 z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.9e-41) || !(y <= 3.45e-161)) {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
} 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 <= (-6.9d-41)) .or. (.not. (y <= 3.45d-161))) then
tmp = x - (0.3333333333333333d0 * ((y - (t / y)) / z))
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 <= -6.9e-41) || !(y <= 3.45e-161)) {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.9e-41) or not (y <= 3.45e-161): tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + ((t * (0.3333333333333333 / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.9e-41) || !(y <= 3.45e-161)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.9e-41) || ~((y <= 3.45e-161))) tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + ((t * (0.3333333333333333 / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.9e-41], N[Not[LessEqual[y, 3.45e-161]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.9 \cdot 10^{-41} \lor \neg \left(y \leq 3.45 \cdot 10^{-161}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -6.8999999999999998e-41 or 3.45000000000000001e-161 < y Initial program 97.0%
Simplified98.6%
Taylor expanded in z around 0 98.7%
if -6.8999999999999998e-41 < y < 3.45000000000000001e-161Initial program 92.1%
Simplified88.8%
Taylor expanded in t around inf 88.8%
associate-*r/98.7%
Applied egg-rr98.7%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -7e-54)
(+ x (/ (- (/ t y) y) (* z 3.0)))
(if (<= y 3.15e-161)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(- x (* 0.3333333333333333 (/ (- y (/ t y)) z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-54) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else if (y <= 3.15e-161) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7d-54)) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else if (y <= 3.15d-161) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x - (0.3333333333333333d0 * ((y - (t / y)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-54) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else if (y <= 3.15e-161) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x - (0.3333333333333333 * ((y - (t / y)) / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e-54: tmp = x + (((t / y) - y) / (z * 3.0)) elif y <= 3.15e-161: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e-54) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); elseif (y <= 3.15e-161) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7e-54) tmp = x + (((t / y) - y) / (z * 3.0)); elseif (y <= 3.15e-161) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x - (0.3333333333333333 * ((y - (t / y)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e-54], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.15e-161], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-54}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{-161}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if y < -6.99999999999999964e-54Initial program 99.8%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
*-commutative99.7%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
if -6.99999999999999964e-54 < y < 3.1500000000000001e-161Initial program 91.7%
Simplified88.1%
Taylor expanded in t around inf 88.1%
associate-*r/98.6%
Applied egg-rr98.6%
if 3.1500000000000001e-161 < y Initial program 94.6%
Simplified97.7%
Taylor expanded in z around 0 97.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.3e+127) (not (<= x 1.42e+48))) (- x (* 0.3333333333333333 (/ y z))) (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.3e+127) || !(x <= 1.42e+48)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2.3d+127)) .or. (.not. (x <= 1.42d+48))) then
tmp = x - (0.3333333333333333d0 * (y / z))
else
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.3e+127) || !(x <= 1.42e+48)) {
tmp = x - (0.3333333333333333 * (y / z));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.3e+127) or not (x <= 1.42e+48): tmp = x - (0.3333333333333333 * (y / z)) else: tmp = (y - (t / y)) * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.3e+127) || !(x <= 1.42e+48)) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.3e+127) || ~((x <= 1.42e+48))) tmp = x - (0.3333333333333333 * (y / z)); else tmp = (y - (t / y)) * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.3e+127], N[Not[LessEqual[x, 1.42e+48]], $MachinePrecision]], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+127} \lor \neg \left(x \leq 1.42 \cdot 10^{+48}\right):\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if x < -2.3000000000000002e127 or 1.42e48 < x Initial program 98.4%
associate-*l*98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in t around 0 73.6%
if -2.3000000000000002e127 < x < 1.42e48Initial program 93.9%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
+-commutative93.8%
*-commutative93.8%
associate-*l*93.9%
div-inv93.7%
fma-def94.8%
associate-*l*94.7%
*-commutative94.7%
div-inv94.7%
metadata-eval94.7%
div-inv94.7%
clear-num94.7%
Applied egg-rr94.7%
Taylor expanded in z around 0 85.2%
cancel-sign-sub-inv85.2%
metadata-eval85.2%
times-frac85.2%
metadata-eval85.2%
distribute-lft-neg-in85.2%
distribute-rgt-neg-in85.2%
times-frac85.2%
metadata-eval85.2%
distribute-neg-frac85.2%
metadata-eval85.2%
distribute-lft-in85.2%
+-commutative85.2%
sub-neg85.2%
associate-*r/85.2%
metadata-eval85.2%
distribute-lft-neg-in85.2%
*-commutative85.2%
associate-*l/85.2%
associate-*r/85.2%
distribute-rgt-neg-in85.2%
distribute-neg-frac85.2%
Simplified85.2%
Final simplification81.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.2e+78) (not (<= y 5.2e+50))) (- x (/ y (* z 3.0))) (+ x (* (/ 0.3333333333333333 z) (/ t y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e+78) || !(y <= 5.2e+50)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * (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 ((y <= (-2.2d+78)) .or. (.not. (y <= 5.2d+50))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((0.3333333333333333d0 / z) * (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e+78) || !(y <= 5.2e+50)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * (t / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.2e+78) or not (y <= 5.2e+50): tmp = x - (y / (z * 3.0)) else: tmp = x + ((0.3333333333333333 / z) * (t / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.2e+78) || !(y <= 5.2e+50)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.2e+78) || ~((y <= 5.2e+50))) tmp = x - (y / (z * 3.0)); else tmp = x + ((0.3333333333333333 / z) * (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.2e+78], N[Not[LessEqual[y, 5.2e+50]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+78} \lor \neg \left(y \leq 5.2 \cdot 10^{+50}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \frac{t}{y}\\
\end{array}
\end{array}
if y < -2.20000000000000014e78 or 5.2000000000000004e50 < 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*97.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.0%
if -2.20000000000000014e78 < y < 5.2000000000000004e50Initial program 94.1%
Simplified92.9%
Taylor expanded in t around inf 84.4%
Final simplification88.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.2e+78) (not (<= y 1.6e+59))) (- 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 <= -2.2e+78) || !(y <= 1.6e+59)) {
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 <= (-2.2d+78)) .or. (.not. (y <= 1.6d+59))) 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 <= -2.2e+78) || !(y <= 1.6e+59)) {
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 <= -2.2e+78) or not (y <= 1.6e+59): 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 <= -2.2e+78) || !(y <= 1.6e+59)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(t * Float64(Float64(0.3333333333333333 / z) / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.2e+78) || ~((y <= 1.6e+59))) 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, -2.2e+78], N[Not[LessEqual[y, 1.6e+59]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(0.3333333333333333 / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+78} \lor \neg \left(y \leq 1.6 \cdot 10^{+59}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{\frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -2.20000000000000014e78 or 1.59999999999999991e59 < 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*97.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.0%
if -2.20000000000000014e78 < y < 1.59999999999999991e59Initial program 94.1%
Simplified92.9%
Taylor expanded in t around inf 84.4%
clear-num84.4%
un-div-inv86.6%
Applied egg-rr86.6%
associate-/r/86.1%
Applied egg-rr86.1%
Final simplification89.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4e+80) (not (<= y 4.9e+51))) (- x (/ y (* z 3.0))) (+ x (/ t (* y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e+80) || !(y <= 4.9e+51)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (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 <= (-4d+80)) .or. (.not. (y <= 4.9d+51))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + (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 <= -4e+80) || !(y <= 4.9e+51)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + (t / (y * (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e+80) or not (y <= 4.9e+51): tmp = x - (y / (z * 3.0)) else: tmp = x + (t / (y * (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e+80) || !(y <= 4.9e+51)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(t / Float64(y * Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4e+80) || ~((y <= 4.9e+51))) tmp = x - (y / (z * 3.0)); else tmp = x + (t / (y * (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e+80], N[Not[LessEqual[y, 4.9e+51]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+80} \lor \neg \left(y \leq 4.9 \cdot 10^{+51}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if y < -4e80 or 4.89999999999999983e51 < 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*97.6%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 96.0%
if -4e80 < y < 4.89999999999999983e51Initial program 94.1%
Simplified92.9%
Taylor expanded in t around inf 84.4%
clear-num84.3%
frac-times86.7%
*-un-lft-identity86.7%
div-inv86.8%
metadata-eval86.8%
Applied egg-rr86.8%
Final simplification90.1%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -1e+36) x (if (<= (* z 3.0) 2e-9) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+36) {
tmp = x;
} else if ((z * 3.0) <= 2e-9) {
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 ((z * 3.0d0) <= (-1d+36)) then
tmp = x
else if ((z * 3.0d0) <= 2d-9) 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 ((z * 3.0) <= -1e+36) {
tmp = x;
} else if ((z * 3.0) <= 2e-9) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e+36: tmp = x elif (z * 3.0) <= 2e-9: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e+36) tmp = x; elseif (Float64(z * 3.0) <= 2e-9) 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 ((z * 3.0) <= -1e+36) tmp = x; elseif ((z * 3.0) <= 2e-9) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+36], x, If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-9], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+36}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-9}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.00000000000000004e36 or 2.00000000000000012e-9 < (*.f64 z 3) Initial program 99.8%
Simplified90.5%
Taylor expanded in x around inf 46.1%
if -1.00000000000000004e36 < (*.f64 z 3) < 2.00000000000000012e-9Initial program 91.4%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
+-commutative91.4%
*-commutative91.4%
associate-*l*91.4%
div-inv90.6%
fma-def92.1%
associate-*l*92.1%
*-commutative92.1%
div-inv92.1%
metadata-eval92.1%
div-inv92.1%
clear-num92.1%
Applied egg-rr92.1%
Taylor expanded in y around inf 47.0%
Final simplification46.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.1e+74)
(* -0.3333333333333333 (/ y z))
(if (<= y 2.5e+19)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 8e+107) x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e+74) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 2.5e+19) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8e+107) {
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.1d+74)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 2.5d+19) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 8d+107) 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.1e+74) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 2.5e+19) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 8e+107) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e+74: tmp = -0.3333333333333333 * (y / z) elif y <= 2.5e+19: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 8e+107: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e+74) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 2.5e+19) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 8e+107) tmp = x; else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.1e+74) tmp = -0.3333333333333333 * (y / z); elseif (y <= 2.5e+19) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 8e+107) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e+74], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+19], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+107], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+74}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+107}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.10000000000000021e74Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l*99.8%
div-inv99.8%
fma-def99.8%
associate-*l*99.8%
*-commutative99.8%
div-inv99.8%
metadata-eval99.8%
div-inv99.7%
clear-num99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 75.8%
if -3.10000000000000021e74 < y < 2.5e19Initial program 93.9%
associate-*l*93.9%
*-commutative93.9%
Simplified93.9%
+-commutative93.9%
*-commutative93.9%
associate-*l*93.9%
div-inv93.2%
fma-def93.2%
associate-*l*93.1%
*-commutative93.1%
div-inv93.1%
metadata-eval93.1%
div-inv93.1%
clear-num93.1%
Applied egg-rr93.1%
Taylor expanded in t around inf 60.3%
if 2.5e19 < y < 7.9999999999999998e107Initial program 99.8%
Simplified99.8%
Taylor expanded in x around inf 58.9%
if 7.9999999999999998e107 < y Initial program 93.8%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
+-commutative93.8%
*-commutative93.8%
associate-*l*93.8%
div-inv93.8%
fma-def99.7%
associate-*l*99.7%
*-commutative99.7%
div-inv99.9%
metadata-eval99.9%
div-inv99.7%
clear-num99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 84.0%
metadata-eval84.0%
distribute-lft-neg-in84.0%
associate-*r/84.1%
*-commutative84.1%
associate-*r/84.0%
distribute-rgt-neg-in84.0%
distribute-neg-frac84.0%
metadata-eval84.0%
Simplified84.0%
associate-*r/84.1%
Applied egg-rr84.1%
Final simplification66.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.1e-33) (not (<= y 15500.0))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.1e-33) || !(y <= 15500.0)) {
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 <= (-4.1d-33)) .or. (.not. (y <= 15500.0d0))) 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 <= -4.1e-33) || !(y <= 15500.0)) {
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 <= -4.1e-33) or not (y <= 15500.0): 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 <= -4.1e-33) || !(y <= 15500.0)) 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 <= -4.1e-33) || ~((y <= 15500.0))) 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, -4.1e-33], N[Not[LessEqual[y, 15500.0]], $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 -4.1 \cdot 10^{-33} \lor \neg \left(y \leq 15500\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -4.1e-33 or 15500 < y Initial program 98.2%
Simplified99.7%
Taylor expanded in t around 0 85.8%
*-commutative85.8%
associate-*l/85.7%
associate-*r/85.7%
Simplified85.7%
if -4.1e-33 < y < 15500Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
Final simplification75.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e-33)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 47000.0)
(* 0.3333333333333333 (/ t (* z y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-33) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 47000.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} 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 (y <= (-5.2d-33)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 47000.0d0) then
tmp = 0.3333333333333333d0 * (t / (z * y))
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 (y <= -5.2e-33) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 47000.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e-33: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 47000.0: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e-33) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 47000.0) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); 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 (y <= -5.2e-33) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 47000.0) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e-33], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 47000.0], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-33}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 47000:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -5.19999999999999988e-33Initial program 99.8%
Simplified99.7%
Taylor expanded in t around 0 81.4%
*-commutative81.4%
associate-*l/81.4%
associate-*r/81.4%
Simplified81.4%
if -5.19999999999999988e-33 < y < 47000Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
if 47000 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification75.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.3e-33)
(- x (/ y (* z 3.0)))
(if (<= y 28000.0)
(* 0.3333333333333333 (/ t (* z y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-33) {
tmp = x - (y / (z * 3.0));
} else if (y <= 28000.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} 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 (y <= (-3.3d-33)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 28000.0d0) then
tmp = 0.3333333333333333d0 * (t / (z * y))
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 (y <= -3.3e-33) {
tmp = x - (y / (z * 3.0));
} else if (y <= 28000.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-33: tmp = x - (y / (z * 3.0)) elif y <= 28000.0: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-33) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 28000.0) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); 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 (y <= -3.3e-33) tmp = x - (y / (z * 3.0)); elseif (y <= 28000.0) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-33], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 28000.0], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-33}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 28000:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -3.3000000000000003e-33Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 81.5%
if -3.3000000000000003e-33 < y < 28000Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
if 28000 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification75.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.4e-33)
(- x (/ y (* z 3.0)))
(if (<= y 20000.0)
(/ t (* 3.0 (* z y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e-33) {
tmp = x - (y / (z * 3.0));
} else if (y <= 20000.0) {
tmp = t / (3.0 * (z * y));
} 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 (y <= (-5.4d-33)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 20000.0d0) then
tmp = t / (3.0d0 * (z * y))
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 (y <= -5.4e-33) {
tmp = x - (y / (z * 3.0));
} else if (y <= 20000.0) {
tmp = t / (3.0 * (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.4e-33: tmp = x - (y / (z * 3.0)) elif y <= 20000.0: tmp = t / (3.0 * (z * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e-33) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 20000.0) tmp = Float64(t / Float64(3.0 * Float64(z * y))); 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 (y <= -5.4e-33) tmp = x - (y / (z * 3.0)); elseif (y <= 20000.0) tmp = t / (3.0 * (z * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e-33], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 20000.0], N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{-33}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 20000:\\
\;\;\;\;\frac{t}{3 \cdot \left(z \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -5.4000000000000002e-33Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 81.5%
if -5.4000000000000002e-33 < y < 2e4Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
*-commutative65.0%
associate-*l/65.0%
associate-*r/64.7%
clear-num64.6%
un-div-inv65.0%
associate-/l*65.1%
Applied egg-rr65.1%
Taylor expanded in y around 0 65.1%
*-commutative65.1%
Simplified65.1%
if 2e4 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification75.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e-32)
(- x (/ y (* z 3.0)))
(if (<= y 108000.0)
(/ t (* y (* z 3.0)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e-32) {
tmp = x - (y / (z * 3.0));
} else if (y <= 108000.0) {
tmp = t / (y * (z * 3.0));
} 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 (y <= (-1d-32)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 108000.0d0) then
tmp = t / (y * (z * 3.0d0))
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 (y <= -1e-32) {
tmp = x - (y / (z * 3.0));
} else if (y <= 108000.0) {
tmp = t / (y * (z * 3.0));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e-32: tmp = x - (y / (z * 3.0)) elif y <= 108000.0: tmp = t / (y * (z * 3.0)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e-32) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 108000.0) tmp = Float64(t / Float64(y * Float64(z * 3.0))); 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 (y <= -1e-32) tmp = x - (y / (z * 3.0)); elseif (y <= 108000.0) tmp = t / (y * (z * 3.0)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e-32], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 108000.0], N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-32}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 108000:\\
\;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.00000000000000006e-32Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 81.5%
if -1.00000000000000006e-32 < y < 108000Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
associate-*r/65.0%
*-commutative65.0%
frac-times62.8%
clear-num62.7%
frac-times65.1%
*-un-lft-identity65.1%
div-inv65.1%
metadata-eval65.1%
Applied egg-rr65.1%
if 108000 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification75.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.02e-32)
(- x (/ y (* z 3.0)))
(if (<= y 25500.0)
(/ t (/ y (/ 0.3333333333333333 z)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e-32) {
tmp = x - (y / (z * 3.0));
} else if (y <= 25500.0) {
tmp = 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 (y <= (-1.02d-32)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 25500.0d0) then
tmp = 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 (y <= -1.02e-32) {
tmp = x - (y / (z * 3.0));
} else if (y <= 25500.0) {
tmp = t / (y / (0.3333333333333333 / z));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e-32: tmp = x - (y / (z * 3.0)) elif y <= 25500.0: tmp = t / (y / (0.3333333333333333 / z)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e-32) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 25500.0) tmp = Float64(t / Float64(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 (y <= -1.02e-32) tmp = x - (y / (z * 3.0)); elseif (y <= 25500.0) tmp = t / (y / (0.3333333333333333 / z)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e-32], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 25500.0], N[(t / N[(y / N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-32}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 25500:\\
\;\;\;\;\frac{t}{\frac{y}{\frac{0.3333333333333333}{z}}}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.02000000000000002e-32Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 81.5%
if -1.02000000000000002e-32 < y < 25500Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
*-commutative65.0%
associate-*l/65.0%
associate-*r/64.7%
clear-num64.6%
un-div-inv65.0%
associate-/l*65.1%
Applied egg-rr65.1%
if 25500 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification75.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.9e-33)
(- x (/ y (* z 3.0)))
(if (<= y 15500.0)
(/ (/ (* t 0.3333333333333333) z) y)
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e-33) {
tmp = x - (y / (z * 3.0));
} else if (y <= 15500.0) {
tmp = ((t * 0.3333333333333333) / z) / y;
} 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 (y <= (-2.9d-33)) then
tmp = x - (y / (z * 3.0d0))
else if (y <= 15500.0d0) then
tmp = ((t * 0.3333333333333333d0) / z) / y
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 (y <= -2.9e-33) {
tmp = x - (y / (z * 3.0));
} else if (y <= 15500.0) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e-33: tmp = x - (y / (z * 3.0)) elif y <= 15500.0: tmp = ((t * 0.3333333333333333) / z) / y else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e-33) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (y <= 15500.0) tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); 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 (y <= -2.9e-33) tmp = x - (y / (z * 3.0)); elseif (y <= 15500.0) tmp = ((t * 0.3333333333333333) / z) / y; else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e-33], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 15500.0], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-33}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 15500:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -2.90000000000000003e-33Initial program 99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
*-commutative99.8%
associate-*l*99.8%
associate-+l-99.8%
*-commutative99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 81.5%
if -2.90000000000000003e-33 < y < 15500Initial program 92.4%
associate-*l*92.4%
*-commutative92.4%
Simplified92.4%
+-commutative92.4%
*-commutative92.4%
associate-*l*92.4%
div-inv91.6%
fma-def91.6%
associate-*l*91.5%
*-commutative91.5%
div-inv91.5%
metadata-eval91.5%
div-inv91.5%
clear-num91.5%
Applied egg-rr91.5%
Taylor expanded in t around inf 65.0%
associate-*r/65.0%
*-commutative65.0%
associate-/r*69.7%
*-commutative69.7%
Applied egg-rr69.7%
if 15500 < y Initial program 96.1%
associate-*l*96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 91.6%
Final simplification77.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 95.4%
Simplified95.4%
Taylor expanded in x around inf 26.1%
Final simplification26.1%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2023322
(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))))