
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= t -8.8e-36) (not (<= t 5e-8))) (+ x (+ (/ t (* z (* y 3.0))) (* -0.3333333333333333 (/ y z)))) (+ x (/ (/ (- (/ t y) y) z) 3.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.8e-36) || !(t <= 5e-8)) {
tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z)));
} else {
tmp = x + ((((t / y) - y) / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((t <= (-8.8d-36)) .or. (.not. (t <= 5d-8))) then
tmp = x + ((t / (z * (y * 3.0d0))) + ((-0.3333333333333333d0) * (y / z)))
else
tmp = x + ((((t / y) - y) / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -8.8e-36) || !(t <= 5e-8)) {
tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z)));
} else {
tmp = x + ((((t / y) - y) / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -8.8e-36) or not (t <= 5e-8): tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z))) else: tmp = x + ((((t / y) - y) / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -8.8e-36) || !(t <= 5e-8)) tmp = Float64(x + Float64(Float64(t / Float64(z * Float64(y * 3.0))) + Float64(-0.3333333333333333 * Float64(y / z)))); else tmp = Float64(x + Float64(Float64(Float64(Float64(t / y) - y) / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -8.8e-36) || ~((t <= 5e-8))) tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z))); else tmp = x + ((((t / y) - y) / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -8.8e-36], N[Not[LessEqual[t, 5e-8]], $MachinePrecision]], N[(x + N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-36} \lor \neg \left(t \leq 5 \cdot 10^{-8}\right):\\
\;\;\;\;x + \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + -0.3333333333333333 \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{y} - y}{z}}{3}\\
\end{array}
\end{array}
if t < -8.7999999999999997e-36 or 4.9999999999999998e-8 < t Initial program 99.7%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
if -8.7999999999999997e-36 < t < 4.9999999999999998e-8Initial program 92.3%
associate-+l-92.3%
*-commutative92.3%
Simplified92.3%
sub-neg92.3%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
associate-/r*99.8%
div-sub99.8%
div-sub99.8%
Applied egg-rr99.8%
unsub-neg99.8%
sub-div99.8%
sub-div99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* t (/ 0.3333333333333333 (* y z))))))
(if (<= y -1465000000.0)
(+ x (/ y (* z -3.0)))
(if (<= y -6e-228)
t_1
(if (<= y 2.4e-293)
(/ (/ (* t 0.3333333333333333) z) y)
(if (<= y 7.5e+39) t_1 (+ x (/ y (/ z -0.3333333333333333)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (t * (0.3333333333333333 / (y * z)));
double tmp;
if (y <= -1465000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= -6e-228) {
tmp = t_1;
} else if (y <= 2.4e-293) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else if (y <= 7.5e+39) {
tmp = t_1;
} else {
tmp = x + (y / (z / -0.3333333333333333));
}
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 + (t * (0.3333333333333333d0 / (y * z)))
if (y <= (-1465000000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= (-6d-228)) then
tmp = t_1
else if (y <= 2.4d-293) then
tmp = ((t * 0.3333333333333333d0) / z) / y
else if (y <= 7.5d+39) then
tmp = t_1
else
tmp = x + (y / (z / (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (t * (0.3333333333333333 / (y * z)));
double tmp;
if (y <= -1465000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= -6e-228) {
tmp = t_1;
} else if (y <= 2.4e-293) {
tmp = ((t * 0.3333333333333333) / z) / y;
} else if (y <= 7.5e+39) {
tmp = t_1;
} else {
tmp = x + (y / (z / -0.3333333333333333));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (t * (0.3333333333333333 / (y * z))) tmp = 0 if y <= -1465000000.0: tmp = x + (y / (z * -3.0)) elif y <= -6e-228: tmp = t_1 elif y <= 2.4e-293: tmp = ((t * 0.3333333333333333) / z) / y elif y <= 7.5e+39: tmp = t_1 else: tmp = x + (y / (z / -0.3333333333333333)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(t * Float64(0.3333333333333333 / Float64(y * z)))) tmp = 0.0 if (y <= -1465000000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= -6e-228) tmp = t_1; elseif (y <= 2.4e-293) tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); elseif (y <= 7.5e+39) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(z / -0.3333333333333333))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (t * (0.3333333333333333 / (y * z))); tmp = 0.0; if (y <= -1465000000.0) tmp = x + (y / (z * -3.0)); elseif (y <= -6e-228) tmp = t_1; elseif (y <= 2.4e-293) tmp = ((t * 0.3333333333333333) / z) / y; elseif (y <= 7.5e+39) tmp = t_1; else tmp = x + (y / (z / -0.3333333333333333)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1465000000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6e-228], t$95$1, If[LessEqual[y, 2.4e-293], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.5e+39], t$95$1, N[(x + N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{if}\;y \leq -1465000000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-293}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -1.465e9Initial program 99.8%
Simplified99.8%
Taylor expanded in y around inf 95.8%
*-commutative95.8%
clear-num95.8%
un-div-inv95.8%
div-inv95.9%
metadata-eval95.9%
Applied egg-rr95.9%
if -1.465e9 < y < -5.9999999999999999e-228 or 2.3999999999999999e-293 < y < 7.5000000000000005e39Initial program 95.5%
Simplified91.2%
Taylor expanded in y around 0 88.8%
*-commutative88.8%
metadata-eval88.8%
times-frac88.8%
*-commutative88.8%
associate-*r*88.8%
associate-*r/88.3%
associate-*r*88.4%
*-commutative88.4%
*-commutative88.4%
associate-/r*88.3%
metadata-eval88.3%
Simplified88.3%
if -5.9999999999999999e-228 < y < 2.3999999999999999e-293Initial program 72.8%
associate-+l-72.8%
*-commutative72.8%
Simplified72.8%
sub-neg72.8%
associate-/r*83.4%
sub-div83.4%
Applied egg-rr83.4%
associate-/r*83.3%
div-sub83.3%
div-sub83.3%
Applied egg-rr83.3%
unsub-neg83.3%
sub-div83.3%
sub-div83.3%
Applied egg-rr83.3%
Taylor expanded in y around 0 72.8%
*-commutative72.8%
associate-*l/72.8%
associate-/l/99.5%
Simplified99.5%
if 7.5000000000000005e39 < y Initial program 99.8%
Simplified99.7%
Taylor expanded in y around inf 98.1%
associate-*r/98.1%
*-commutative98.1%
associate-/l*98.2%
Simplified98.2%
Final simplification93.0%
(FPCore (x y z t) :precision binary64 (if (<= y -8.2e-164) (+ x (+ (/ t (* z (* y 3.0))) (* -0.3333333333333333 (/ y z)))) (- x (+ (/ (/ (* -0.3333333333333333 t) z) y) (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e-164) {
tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z)));
} else {
tmp = x - ((((-0.3333333333333333 * t) / z) / y) + (y / (z * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.2d-164)) then
tmp = x + ((t / (z * (y * 3.0d0))) + ((-0.3333333333333333d0) * (y / z)))
else
tmp = x - (((((-0.3333333333333333d0) * t) / z) / y) + (y / (z * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e-164) {
tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z)));
} else {
tmp = x - ((((-0.3333333333333333 * t) / z) / y) + (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.2e-164: tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z))) else: tmp = x - ((((-0.3333333333333333 * t) / z) / y) + (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.2e-164) tmp = Float64(x + Float64(Float64(t / Float64(z * Float64(y * 3.0))) + Float64(-0.3333333333333333 * Float64(y / z)))); else tmp = Float64(x - Float64(Float64(Float64(Float64(-0.3333333333333333 * t) / z) / y) + Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.2e-164) tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z))); else tmp = x - ((((-0.3333333333333333 * t) / z) / y) + (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.2e-164], N[(x + N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(N[(-0.3333333333333333 * t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision] + N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-164}:\\
\;\;\;\;x + \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + -0.3333333333333333 \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(\frac{\frac{-0.3333333333333333 \cdot t}{z}}{y} + \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if y < -8.1999999999999996e-164Initial program 99.7%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
if -8.1999999999999996e-164 < y Initial program 93.6%
associate-+l-93.6%
sub-neg93.6%
distribute-frac-neg93.6%
associate-/r*99.2%
neg-mul-199.2%
*-commutative99.2%
times-frac99.2%
metadata-eval99.2%
Simplified99.2%
associate-*r/99.2%
Applied egg-rr99.2%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (<= y -5.1e-139) (+ x (+ (/ t (* z (* y 3.0))) (* -0.3333333333333333 (/ y z)))) (- x (+ (/ (* -0.3333333333333333 (/ t z)) y) (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.1e-139) {
tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z)));
} else {
tmp = x - (((-0.3333333333333333 * (t / z)) / y) + (y / (z * 3.0)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.1d-139)) then
tmp = x + ((t / (z * (y * 3.0d0))) + ((-0.3333333333333333d0) * (y / z)))
else
tmp = x - ((((-0.3333333333333333d0) * (t / z)) / y) + (y / (z * 3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.1e-139) {
tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z)));
} else {
tmp = x - (((-0.3333333333333333 * (t / z)) / y) + (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.1e-139: tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z))) else: tmp = x - (((-0.3333333333333333 * (t / z)) / y) + (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.1e-139) tmp = Float64(x + Float64(Float64(t / Float64(z * Float64(y * 3.0))) + Float64(-0.3333333333333333 * Float64(y / z)))); else tmp = Float64(x - Float64(Float64(Float64(-0.3333333333333333 * Float64(t / z)) / y) + Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.1e-139) tmp = x + ((t / (z * (y * 3.0))) + (-0.3333333333333333 * (y / z))); else tmp = x - (((-0.3333333333333333 * (t / z)) / y) + (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.1e-139], N[(x + N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(-0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{-139}:\\
\;\;\;\;x + \left(\frac{t}{z \cdot \left(y \cdot 3\right)} + -0.3333333333333333 \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \left(\frac{-0.3333333333333333 \cdot \frac{t}{z}}{y} + \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if y < -5.10000000000000036e-139Initial program 99.7%
Simplified99.8%
fma-udef99.8%
Applied egg-rr99.8%
if -5.10000000000000036e-139 < y Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.2%
neg-mul-199.2%
*-commutative99.2%
times-frac99.2%
metadata-eval99.2%
Simplified99.2%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.6e-139) (not (<= y 3.7e-106))) (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e-139) || !(y <= 3.7e-106)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.6d-139)) .or. (.not. (y <= 3.7d-106))) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.6e-139) || !(y <= 3.7e-106)) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.6e-139) or not (y <= 3.7e-106): tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.6e-139) || !(y <= 3.7e-106)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.6e-139) || ~((y <= 3.7e-106))) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.6e-139], N[Not[LessEqual[y, 3.7e-106]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-139} \lor \neg \left(y \leq 3.7 \cdot 10^{-106}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -4.60000000000000025e-139 or 3.69999999999999979e-106 < y Initial program 99.2%
Simplified98.6%
Taylor expanded in z around 0 98.6%
if -4.60000000000000025e-139 < y < 3.69999999999999979e-106Initial program 89.0%
Simplified85.8%
Taylor expanded in y around 0 88.9%
*-commutative88.9%
metadata-eval88.9%
times-frac88.9%
*-commutative88.9%
associate-*r*88.9%
associate-*r/88.1%
associate-*r*88.2%
*-commutative88.2%
*-commutative88.2%
associate-/r*88.2%
metadata-eval88.2%
Simplified88.2%
Taylor expanded in t around 0 88.9%
associate-*r/88.8%
*-commutative88.8%
*-commutative88.8%
times-frac99.6%
Simplified99.6%
Final simplification98.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -4.6e-139)
(+ x (* -0.3333333333333333 (/ t_1 z)))
(if (<= y 3.4e-107)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (* t_1 (/ -0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -4.6e-139) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 3.4e-107) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (t_1 * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-4.6d-139)) then
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
else if (y <= 3.4d-107) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (t_1 * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -4.6e-139) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 3.4e-107) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (t_1 * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -4.6e-139: tmp = x + (-0.3333333333333333 * (t_1 / z)) elif y <= 3.4e-107: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + (t_1 * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -4.6e-139) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); elseif (y <= 3.4e-107) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(t_1 * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -4.6e-139) tmp = x + (-0.3333333333333333 * (t_1 / z)); elseif (y <= 3.4e-107) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + (t_1 * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e-139], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-107], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{-139}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t_1}{z}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-107}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + t_1 \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.60000000000000025e-139Initial program 99.7%
Simplified97.8%
Taylor expanded in z around 0 97.8%
if -4.60000000000000025e-139 < y < 3.39999999999999994e-107Initial program 88.8%
Simplified85.6%
Taylor expanded in y around 0 88.8%
*-commutative88.8%
metadata-eval88.8%
times-frac88.8%
*-commutative88.8%
associate-*r*88.8%
associate-*r/88.0%
associate-*r*88.1%
*-commutative88.1%
*-commutative88.1%
associate-/r*88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 88.8%
associate-*r/88.7%
*-commutative88.7%
*-commutative88.7%
times-frac99.6%
Simplified99.6%
if 3.39999999999999994e-107 < y Initial program 98.6%
Simplified99.7%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.6e-139)
(+ x (* -0.3333333333333333 (/ (- y (/ t y)) z)))
(if (<= y 2e-81)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (/ -0.3333333333333333 (/ z (- (/ t y) y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e-139) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else if (y <= 2e-81) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (-0.3333333333333333 / (z / ((t / y) - 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.6d-139)) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else if (y <= 2d-81) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x - ((-0.3333333333333333d0) / (z / ((t / y) - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e-139) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else if (y <= 2e-81) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (-0.3333333333333333 / (z / ((t / y) - y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.6e-139: tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) elif y <= 2e-81: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - (-0.3333333333333333 / (z / ((t / y) - y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.6e-139) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); elseif (y <= 2e-81) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x - Float64(-0.3333333333333333 / Float64(z / Float64(Float64(t / y) - y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.6e-139) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); elseif (y <= 2e-81) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - (-0.3333333333333333 / (z / ((t / y) - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.6e-139], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-81], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(-0.3333333333333333 / N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-139}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{-0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\
\end{array}
\end{array}
if y < -4.60000000000000025e-139Initial program 99.7%
Simplified97.8%
Taylor expanded in z around 0 97.8%
if -4.60000000000000025e-139 < y < 1.9999999999999999e-81Initial program 88.9%
Simplified87.0%
Taylor expanded in y around 0 88.8%
*-commutative88.8%
metadata-eval88.8%
times-frac88.8%
*-commutative88.8%
associate-*r*88.8%
associate-*r/88.1%
associate-*r*88.2%
*-commutative88.2%
*-commutative88.2%
associate-/r*88.1%
metadata-eval88.1%
Simplified88.1%
Taylor expanded in t around 0 88.8%
associate-*r/88.8%
*-commutative88.8%
*-commutative88.8%
times-frac99.6%
Simplified99.6%
if 1.9999999999999999e-81 < y Initial program 99.8%
Simplified99.7%
Taylor expanded in y around 0 99.7%
Simplified99.7%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.6e-139)
(+ x (* -0.3333333333333333 (/ (- y (/ t y)) z)))
(if (<= y 1.95e-107)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (/ (- (/ t y) y) z) 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e-139) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else if (y <= 1.95e-107) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((((t / y) - y) / z) / 3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.6d-139)) then
tmp = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
else if (y <= 1.95d-107) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + ((((t / y) - y) / z) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e-139) {
tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z));
} else if (y <= 1.95e-107) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((((t / y) - y) / z) / 3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.6e-139: tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)) elif y <= 1.95e-107: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((((t / y) - y) / z) / 3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.6e-139) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))); elseif (y <= 1.95e-107) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(Float64(Float64(t / y) - y) / z) / 3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.6e-139) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); elseif (y <= 1.95e-107) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((((t / y) - y) / z) / 3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.6e-139], N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-107], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-139}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-107}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{y} - y}{z}}{3}\\
\end{array}
\end{array}
if y < -4.60000000000000025e-139Initial program 99.7%
Simplified97.8%
Taylor expanded in z around 0 97.8%
if -4.60000000000000025e-139 < y < 1.95e-107Initial program 88.8%
Simplified85.6%
Taylor expanded in y around 0 88.8%
*-commutative88.8%
metadata-eval88.8%
times-frac88.8%
*-commutative88.8%
associate-*r*88.8%
associate-*r/88.0%
associate-*r*88.1%
*-commutative88.1%
*-commutative88.1%
associate-/r*88.0%
metadata-eval88.0%
Simplified88.0%
Taylor expanded in t around 0 88.8%
associate-*r/88.7%
*-commutative88.7%
*-commutative88.7%
times-frac99.6%
Simplified99.6%
if 1.95e-107 < y Initial program 98.6%
associate-+l-98.6%
*-commutative98.6%
Simplified98.6%
sub-neg98.6%
associate-/r*99.7%
sub-div99.7%
Applied egg-rr99.7%
associate-/r*99.8%
div-sub99.8%
div-sub99.7%
Applied egg-rr99.7%
unsub-neg99.7%
sub-div99.8%
sub-div99.8%
Applied egg-rr99.8%
Final simplification99.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.6e+89)
(/ (* y -0.3333333333333333) z)
(if (<= y -1465000000.0)
x
(if (<= y 2.15e-58)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 1.12e+55) x (/ -0.3333333333333333 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e+89) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -1465000000.0) {
tmp = x;
} else if (y <= 2.15e-58) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 1.12e+55) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.6d+89)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= (-1465000000.0d0)) then
tmp = x
else if (y <= 2.15d-58) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 1.12d+55) then
tmp = x
else
tmp = (-0.3333333333333333d0) / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e+89) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -1465000000.0) {
tmp = x;
} else if (y <= 2.15e-58) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 1.12e+55) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.6e+89: tmp = (y * -0.3333333333333333) / z elif y <= -1465000000.0: tmp = x elif y <= 2.15e-58: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 1.12e+55: tmp = x else: tmp = -0.3333333333333333 / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.6e+89) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= -1465000000.0) tmp = x; elseif (y <= 2.15e-58) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 1.12e+55) tmp = x; else tmp = Float64(-0.3333333333333333 / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.6e+89) tmp = (y * -0.3333333333333333) / z; elseif (y <= -1465000000.0) tmp = x; elseif (y <= 2.15e-58) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 1.12e+55) tmp = x; else tmp = -0.3333333333333333 / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.6e+89], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -1465000000.0], x, If[LessEqual[y, 2.15e-58], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+55], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -1465000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.15 \cdot 10^{-58}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -4.5999999999999998e89Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
Simplified99.7%
sub-neg99.7%
associate-/r*99.7%
sub-div99.7%
Applied egg-rr99.7%
associate-/r*99.7%
div-sub99.7%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 77.6%
associate-*r/77.7%
*-commutative77.7%
Simplified77.7%
if -4.5999999999999998e89 < y < -1.465e9 or 2.15e-58 < y < 1.12000000000000006e55Initial program 99.9%
Simplified99.8%
Taylor expanded in x around inf 54.8%
if -1.465e9 < y < 2.15e-58Initial program 91.4%
associate-+l-91.4%
*-commutative91.4%
Simplified91.4%
sub-neg91.4%
associate-/r*88.4%
sub-div88.5%
Applied egg-rr88.5%
associate-/r*88.6%
div-sub88.6%
div-sub88.6%
Applied egg-rr88.6%
unsub-neg88.6%
sub-div88.6%
sub-div88.6%
Applied egg-rr88.6%
Taylor expanded in y around 0 65.7%
if 1.12000000000000006e55 < y Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
Simplified99.8%
sub-neg99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
associate-/r*99.8%
div-sub99.8%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 76.5%
*-commutative76.5%
Simplified76.5%
*-commutative76.5%
clear-num76.5%
un-div-inv76.5%
Applied egg-rr76.5%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1465000000.0)
(+ x (/ y (* z -3.0)))
(if (<= y 7e+39)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ y (/ z -0.3333333333333333))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1465000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 7e+39) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y / (z / -0.3333333333333333));
}
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 <= (-1465000000.0d0)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 7d+39) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (y / (z / (-0.3333333333333333d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1465000000.0) {
tmp = x + (y / (z * -3.0));
} else if (y <= 7e+39) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y / (z / -0.3333333333333333));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1465000000.0: tmp = x + (y / (z * -3.0)) elif y <= 7e+39: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + (y / (z / -0.3333333333333333)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1465000000.0) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 7e+39) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(y / Float64(z / -0.3333333333333333))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1465000000.0) tmp = x + (y / (z * -3.0)); elseif (y <= 7e+39) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + (y / (z / -0.3333333333333333)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1465000000.0], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+39], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1465000000:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+39}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -1.465e9Initial program 99.8%
Simplified99.8%
Taylor expanded in y around inf 95.8%
*-commutative95.8%
clear-num95.8%
un-div-inv95.8%
div-inv95.9%
metadata-eval95.9%
Applied egg-rr95.9%
if -1.465e9 < y < 7.0000000000000003e39Initial program 92.7%
Simplified90.2%
Taylor expanded in y around 0 86.8%
*-commutative86.8%
metadata-eval86.8%
times-frac86.9%
*-commutative86.9%
associate-*r*86.9%
associate-*r/86.4%
associate-*r*86.5%
*-commutative86.5%
*-commutative86.5%
associate-/r*86.4%
metadata-eval86.4%
Simplified86.4%
Taylor expanded in t around 0 86.8%
associate-*r/86.8%
*-commutative86.8%
*-commutative86.8%
times-frac93.1%
Simplified93.1%
if 7.0000000000000003e39 < y Initial program 99.8%
Simplified99.7%
Taylor expanded in y around inf 98.1%
associate-*r/98.1%
*-commutative98.1%
associate-/l*98.2%
Simplified98.2%
Final simplification94.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.4e-48) (not (<= y 7.4e-78))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-48) || !(y <= 7.4e-78)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.4d-48)) .or. (.not. (y <= 7.4d-78))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.4e-48) || !(y <= 7.4e-78)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.4e-48) or not (y <= 7.4e-78): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.4e-48) || !(y <= 7.4e-78)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.4e-48) || ~((y <= 7.4e-78))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.4e-48], N[Not[LessEqual[y, 7.4e-78]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-48} \lor \neg \left(y \leq 7.4 \cdot 10^{-78}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.40000000000000002e-48 or 7.40000000000000011e-78 < y Initial program 99.8%
Simplified99.7%
Taylor expanded in y around inf 90.3%
if -1.40000000000000002e-48 < y < 7.40000000000000011e-78Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
Simplified90.6%
sub-neg90.6%
associate-/r*87.4%
sub-div87.4%
Applied egg-rr87.4%
associate-/r*87.5%
div-sub87.5%
div-sub87.5%
Applied egg-rr87.5%
unsub-neg87.5%
sub-div87.5%
sub-div87.5%
Applied egg-rr87.5%
Taylor expanded in y around 0 68.0%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.8e-40) (not (<= y 1.35e-77))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.8e-40) || !(y <= 1.35e-77)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.8d-40)) .or. (.not. (y <= 1.35d-77))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.8e-40) || !(y <= 1.35e-77)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.8e-40) or not (y <= 1.35e-77): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.8e-40) || !(y <= 1.35e-77)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.8e-40) || ~((y <= 1.35e-77))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.8e-40], N[Not[LessEqual[y, 1.35e-77]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-40} \lor \neg \left(y \leq 1.35 \cdot 10^{-77}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -5.7999999999999998e-40 or 1.35e-77 < y Initial program 99.8%
Simplified99.7%
Taylor expanded in y around inf 90.3%
*-commutative90.3%
clear-num90.2%
un-div-inv90.3%
div-inv90.4%
metadata-eval90.4%
Applied egg-rr90.4%
if -5.7999999999999998e-40 < y < 1.35e-77Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
Simplified90.6%
sub-neg90.6%
associate-/r*87.4%
sub-div87.4%
Applied egg-rr87.4%
associate-/r*87.5%
div-sub87.5%
div-sub87.5%
Applied egg-rr87.5%
unsub-neg87.5%
sub-div87.5%
sub-div87.5%
Applied egg-rr87.5%
Taylor expanded in y around 0 68.0%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.5e-31) (not (<= y 8e-78))) (+ x (/ y (* z -3.0))) (/ (/ (* t 0.3333333333333333) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-31) || !(y <= 8e-78)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = ((t * 0.3333333333333333) / z) / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.5d-31)) .or. (.not. (y <= 8d-78))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = ((t * 0.3333333333333333d0) / z) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.5e-31) || !(y <= 8e-78)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = ((t * 0.3333333333333333) / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.5e-31) or not (y <= 8e-78): tmp = x + (y / (z * -3.0)) else: tmp = ((t * 0.3333333333333333) / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.5e-31) || !(y <= 8e-78)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.5e-31) || ~((y <= 8e-78))) tmp = x + (y / (z * -3.0)); else tmp = ((t * 0.3333333333333333) / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.5e-31], N[Not[LessEqual[y, 8e-78]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-31} \lor \neg \left(y \leq 8 \cdot 10^{-78}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -4.5000000000000004e-31 or 7.99999999999999999e-78 < y Initial program 99.8%
Simplified99.7%
Taylor expanded in y around inf 90.3%
*-commutative90.3%
clear-num90.2%
un-div-inv90.3%
div-inv90.4%
metadata-eval90.4%
Applied egg-rr90.4%
if -4.5000000000000004e-31 < y < 7.99999999999999999e-78Initial program 90.6%
associate-+l-90.6%
*-commutative90.6%
Simplified90.6%
sub-neg90.6%
associate-/r*87.4%
sub-div87.4%
Applied egg-rr87.4%
associate-/r*87.5%
div-sub87.5%
div-sub87.5%
Applied egg-rr87.5%
unsub-neg87.5%
sub-div87.5%
sub-div87.5%
Applied egg-rr87.5%
Taylor expanded in y around 0 68.0%
*-commutative68.0%
associate-*l/67.9%
associate-/l/75.3%
Simplified75.3%
Final simplification84.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.6e+89) (not (<= y 1.5e+44))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.6e+89) || !(y <= 1.5e+44)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9.6d+89)) .or. (.not. (y <= 1.5d+44))) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.6e+89) || !(y <= 1.5e+44)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.6e+89) or not (y <= 1.5e+44): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.6e+89) || !(y <= 1.5e+44)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.6e+89) || ~((y <= 1.5e+44))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.6e+89], N[Not[LessEqual[y, 1.5e+44]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+89} \lor \neg \left(y \leq 1.5 \cdot 10^{+44}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.60000000000000018e89 or 1.49999999999999993e44 < y Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
Simplified99.8%
sub-neg99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
associate-/r*99.7%
div-sub99.7%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 77.1%
*-commutative77.1%
Simplified77.1%
if -9.60000000000000018e89 < y < 1.49999999999999993e44Initial program 93.8%
Simplified91.6%
Taylor expanded in x around inf 33.5%
Final simplification49.5%
(FPCore (x y z t) :precision binary64 (if (<= y -5e+89) (* -0.3333333333333333 (/ y z)) (if (<= y 3e+53) x (/ -0.3333333333333333 (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e+89) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 3e+53) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5d+89)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 3d+53) then
tmp = x
else
tmp = (-0.3333333333333333d0) / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5e+89) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 3e+53) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5e+89: tmp = -0.3333333333333333 * (y / z) elif y <= 3e+53: tmp = x else: tmp = -0.3333333333333333 / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5e+89) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 3e+53) tmp = x; else tmp = Float64(-0.3333333333333333 / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5e+89) tmp = -0.3333333333333333 * (y / z); elseif (y <= 3e+53) tmp = x; else tmp = -0.3333333333333333 / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5e+89], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+53], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+89}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+53}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -4.99999999999999983e89Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
Simplified99.7%
sub-neg99.7%
associate-/r*99.7%
sub-div99.7%
Applied egg-rr99.7%
associate-/r*99.7%
div-sub99.7%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 77.6%
*-commutative77.6%
Simplified77.6%
if -4.99999999999999983e89 < y < 2.99999999999999998e53Initial program 93.8%
Simplified91.6%
Taylor expanded in x around inf 33.5%
if 2.99999999999999998e53 < y Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
Simplified99.8%
sub-neg99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
associate-/r*99.8%
div-sub99.8%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 76.5%
*-commutative76.5%
Simplified76.5%
*-commutative76.5%
clear-num76.5%
un-div-inv76.5%
Applied egg-rr76.5%
Final simplification49.5%
(FPCore (x y z t) :precision binary64 (if (<= y -4.6e+89) (/ (* y -0.3333333333333333) z) (if (<= y 9e+42) x (/ -0.3333333333333333 (/ z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e+89) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 9e+42) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.6d+89)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 9d+42) then
tmp = x
else
tmp = (-0.3333333333333333d0) / (z / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.6e+89) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 9e+42) {
tmp = x;
} else {
tmp = -0.3333333333333333 / (z / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.6e+89: tmp = (y * -0.3333333333333333) / z elif y <= 9e+42: tmp = x else: tmp = -0.3333333333333333 / (z / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.6e+89) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 9e+42) tmp = x; else tmp = Float64(-0.3333333333333333 / Float64(z / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.6e+89) tmp = (y * -0.3333333333333333) / z; elseif (y <= 9e+42) tmp = x; else tmp = -0.3333333333333333 / (z / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.6e+89], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 9e+42], x, N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+42}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -4.5999999999999998e89Initial program 99.7%
associate-+l-99.7%
*-commutative99.7%
Simplified99.7%
sub-neg99.7%
associate-/r*99.7%
sub-div99.7%
Applied egg-rr99.7%
associate-/r*99.7%
div-sub99.7%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 77.6%
associate-*r/77.7%
*-commutative77.7%
Simplified77.7%
if -4.5999999999999998e89 < y < 9.00000000000000025e42Initial program 93.8%
Simplified91.6%
Taylor expanded in x around inf 33.5%
if 9.00000000000000025e42 < y Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
Simplified99.8%
sub-neg99.8%
associate-/r*99.8%
sub-div99.8%
Applied egg-rr99.8%
associate-/r*99.8%
div-sub99.8%
div-sub99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 76.5%
*-commutative76.5%
Simplified76.5%
*-commutative76.5%
clear-num76.5%
un-div-inv76.5%
Applied egg-rr76.5%
Final simplification49.5%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.0%
Simplified94.6%
Taylor expanded in x around inf 29.6%
Final simplification29.6%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2023318
(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))))