
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
remove-double-neg95.9%
distribute-frac-neg95.9%
sub-neg95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.8%
*-commutative95.8%
neg-mul-195.8%
times-frac97.1%
distribute-lft-out--97.1%
*-commutative97.1%
associate-/r*97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in z around 0 97.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.06e+99)
(/ (/ y z) -3.0)
(if (<= y -2.3e-175)
x
(if (<= y 4.5e-44)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 5.4e+73) x (* -0.3333333333333333 (/ y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.06e+99) {
tmp = (y / z) / -3.0;
} else if (y <= -2.3e-175) {
tmp = x;
} else if (y <= 4.5e-44) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 5.4e+73) {
tmp = x;
} else {
tmp = -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.06d+99)) then
tmp = (y / z) / (-3.0d0)
else if (y <= (-2.3d-175)) then
tmp = x
else if (y <= 4.5d-44) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 5.4d+73) then
tmp = x
else
tmp = (-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.06e+99) {
tmp = (y / z) / -3.0;
} else if (y <= -2.3e-175) {
tmp = x;
} else if (y <= 4.5e-44) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 5.4e+73) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.06e+99: tmp = (y / z) / -3.0 elif y <= -2.3e-175: tmp = x elif y <= 4.5e-44: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 5.4e+73: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.06e+99) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= -2.3e-175) tmp = x; elseif (y <= 4.5e-44) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 5.4e+73) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.06e+99) tmp = (y / z) / -3.0; elseif (y <= -2.3e-175) tmp = x; elseif (y <= 4.5e-44) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 5.4e+73) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.06e+99], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, -2.3e-175], x, If[LessEqual[y, 4.5e-44], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.4e+73], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+99}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-175}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-44}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 5.4 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.05999999999999999e99Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
metadata-eval99.6%
cancel-sign-sub-inv99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.6%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in x around 0 89.1%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.2%
Simplified89.2%
associate-*r/89.2%
frac-2neg89.2%
distribute-frac-neg289.2%
distribute-rgt-neg-in89.2%
metadata-eval89.2%
associate-*l/89.1%
metadata-eval89.1%
div-inv89.3%
distribute-neg-frac289.3%
metadata-eval89.3%
Applied egg-rr89.3%
if -1.05999999999999999e99 < y < -2.3e-175 or 4.4999999999999999e-44 < y < 5.3999999999999998e73Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
times-frac97.3%
fma-define97.3%
metadata-eval97.3%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x around inf 57.9%
if -2.3e-175 < y < 4.4999999999999999e-44Initial program 92.6%
sub-neg92.6%
associate-+l+92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
times-frac92.6%
fma-define92.6%
metadata-eval92.6%
associate-*l*92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 75.4%
associate-*r/75.4%
Simplified75.4%
associate-/l*75.4%
associate-/l*75.5%
Applied egg-rr75.5%
if 5.3999999999999998e73 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac97.9%
fma-define97.9%
metadata-eval97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 97.9%
metadata-eval97.9%
cancel-sign-sub-inv97.9%
associate-*r/97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around 0 97.9%
associate-*r/97.8%
*-commutative97.8%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification70.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.4e+98)
(/ (/ y z) -3.0)
(if (<= y -2.3e-175)
x
(if (<= y 3.4e-44)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 3.4e+73) x (* -0.3333333333333333 (/ y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.4e+98) {
tmp = (y / z) / -3.0;
} else if (y <= -2.3e-175) {
tmp = x;
} else if (y <= 3.4e-44) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 3.4e+73) {
tmp = x;
} else {
tmp = -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 <= (-9.4d+98)) then
tmp = (y / z) / (-3.0d0)
else if (y <= (-2.3d-175)) then
tmp = x
else if (y <= 3.4d-44) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 3.4d+73) then
tmp = x
else
tmp = (-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 <= -9.4e+98) {
tmp = (y / z) / -3.0;
} else if (y <= -2.3e-175) {
tmp = x;
} else if (y <= 3.4e-44) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 3.4e+73) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.4e+98: tmp = (y / z) / -3.0 elif y <= -2.3e-175: tmp = x elif y <= 3.4e-44: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 3.4e+73: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.4e+98) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= -2.3e-175) tmp = x; elseif (y <= 3.4e-44) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 3.4e+73) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.4e+98) tmp = (y / z) / -3.0; elseif (y <= -2.3e-175) tmp = x; elseif (y <= 3.4e-44) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 3.4e+73) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.4e+98], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, -2.3e-175], x, If[LessEqual[y, 3.4e-44], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+73], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{+98}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-175}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-44}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.3999999999999994e98Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
metadata-eval99.6%
cancel-sign-sub-inv99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.6%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in x around 0 89.1%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.2%
Simplified89.2%
associate-*r/89.2%
frac-2neg89.2%
distribute-frac-neg289.2%
distribute-rgt-neg-in89.2%
metadata-eval89.2%
associate-*l/89.1%
metadata-eval89.1%
div-inv89.3%
distribute-neg-frac289.3%
metadata-eval89.3%
Applied egg-rr89.3%
if -9.3999999999999994e98 < y < -2.3e-175 or 3.40000000000000016e-44 < y < 3.4000000000000002e73Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
times-frac97.3%
fma-define97.3%
metadata-eval97.3%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in x around inf 57.9%
if -2.3e-175 < y < 3.40000000000000016e-44Initial program 92.6%
sub-neg92.6%
associate-+l+92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
times-frac92.6%
fma-define92.6%
metadata-eval92.6%
associate-*l*92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 75.4%
associate-*r/75.4%
Simplified75.4%
Taylor expanded in t around 0 69.3%
if 3.4000000000000002e73 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac97.9%
fma-define97.9%
metadata-eval97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 97.9%
metadata-eval97.9%
cancel-sign-sub-inv97.9%
associate-*r/97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around 0 97.9%
associate-*r/97.8%
*-commutative97.8%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification68.7%
(FPCore (x y z t)
:precision binary64
(if (<= (* z 3.0) -2e+62)
(- x (/ (/ y z) 3.0))
(if (<= (* z 3.0) 2e+58)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+62) {
tmp = x - ((y / z) / 3.0);
} else if ((z * 3.0) <= 2e+58) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-2d+62)) then
tmp = x - ((y / z) / 3.0d0)
else if ((z * 3.0d0) <= 2d+58) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+62) {
tmp = x - ((y / z) / 3.0);
} else if ((z * 3.0) <= 2e+58) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e+62: tmp = x - ((y / z) / 3.0) elif (z * 3.0) <= 2e+58: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e+62) tmp = Float64(x - Float64(Float64(y / z) / 3.0)); elseif (Float64(z * 3.0) <= 2e+58) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -2e+62) tmp = x - ((y / z) / 3.0); elseif ((z * 3.0) <= 2e+58) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+62], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e+58], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+62}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{+58}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -2.00000000000000007e62Initial program 94.7%
sub-neg94.7%
associate-+l+94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in t around 0 83.1%
metadata-eval83.1%
cancel-sign-sub-inv83.1%
associate-*r/83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in y around 0 83.1%
associate-*r/83.1%
*-commutative83.1%
associate-*r/83.1%
Simplified83.1%
*-commutative83.1%
associate-/r/83.1%
metadata-eval83.1%
associate-/r*83.0%
*-commutative83.0%
associate-/r*83.2%
clear-num83.2%
Applied egg-rr83.2%
if -2.00000000000000007e62 < (*.f64 z #s(literal 3 binary64)) < 1.99999999999999989e58Initial program 95.0%
sub-neg95.0%
associate-+l+95.0%
remove-double-neg95.0%
distribute-frac-neg95.0%
sub-neg95.0%
distribute-frac-neg95.0%
neg-mul-195.0%
*-commutative95.0%
associate-/l*95.0%
*-commutative95.0%
neg-mul-195.0%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 85.2%
if 1.99999999999999989e58 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
neg-mul-199.8%
times-frac94.2%
distribute-lft-out--94.2%
*-commutative94.2%
associate-/r*94.1%
metadata-eval94.1%
Simplified94.1%
Taylor expanded in y around inf 76.2%
*-commutative76.2%
metadata-eval76.2%
times-frac76.3%
*-rgt-identity76.3%
Simplified76.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.8e+38)
(- x (/ (/ y z) 3.0))
(if (<= y 5.5e+64)
(- x (* (/ t y) (/ -0.3333333333333333 z)))
(- x (* (/ y z) 0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.8e+38) {
tmp = x - ((y / z) / 3.0);
} else if (y <= 5.5e+64) {
tmp = x - ((t / y) * (-0.3333333333333333 / z));
} 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 <= (-8.8d+38)) then
tmp = x - ((y / z) / 3.0d0)
else if (y <= 5.5d+64) then
tmp = x - ((t / y) * ((-0.3333333333333333d0) / z))
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 <= -8.8e+38) {
tmp = x - ((y / z) / 3.0);
} else if (y <= 5.5e+64) {
tmp = x - ((t / y) * (-0.3333333333333333 / z));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.8e+38: tmp = x - ((y / z) / 3.0) elif y <= 5.5e+64: tmp = x - ((t / y) * (-0.3333333333333333 / z)) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.8e+38) tmp = Float64(x - Float64(Float64(y / z) / 3.0)); elseif (y <= 5.5e+64) tmp = Float64(x - Float64(Float64(t / y) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.8e+38) tmp = x - ((y / z) / 3.0); elseif (y <= 5.5e+64) tmp = x - ((t / y) * (-0.3333333333333333 / z)); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.8e+38], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+64], N[(x - N[(N[(t / y), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.8 \cdot 10^{+38}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+64}:\\
\;\;\;\;x - \frac{t}{y} \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -8.80000000000000026e38Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 96.5%
metadata-eval96.5%
cancel-sign-sub-inv96.5%
associate-*r/96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around 0 96.5%
associate-*r/96.5%
*-commutative96.5%
associate-*r/96.5%
Simplified96.5%
*-commutative96.5%
associate-/r/96.4%
metadata-eval96.4%
associate-/r*96.4%
*-commutative96.4%
associate-/r*96.6%
clear-num96.7%
Applied egg-rr96.7%
if -8.80000000000000026e38 < y < 5.4999999999999996e64Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
remove-double-neg94.2%
distribute-frac-neg94.2%
sub-neg94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
neg-mul-194.2%
times-frac95.8%
distribute-lft-out--95.8%
*-commutative95.8%
associate-/r*95.8%
metadata-eval95.8%
Simplified95.8%
Taylor expanded in y around 0 91.2%
neg-mul-191.2%
distribute-neg-frac291.2%
Simplified91.2%
if 5.4999999999999996e64 < y Initial program 96.2%
Taylor expanded in t around 0 98.1%
Final simplification93.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.7e+38)
(- x (/ (/ y z) 3.0))
(if (<= y 2.25e+55)
(+ x (/ (/ t 3.0) (* y z)))
(- x (* (/ y z) 0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e+38) {
tmp = x - ((y / z) / 3.0);
} else if (y <= 2.25e+55) {
tmp = x + ((t / 3.0) / (y * z));
} 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 <= (-2.7d+38)) then
tmp = x - ((y / z) / 3.0d0)
else if (y <= 2.25d+55) then
tmp = x + ((t / 3.0d0) / (y * z))
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 <= -2.7e+38) {
tmp = x - ((y / z) / 3.0);
} else if (y <= 2.25e+55) {
tmp = x + ((t / 3.0) / (y * z));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e+38: tmp = x - ((y / z) / 3.0) elif y <= 2.25e+55: tmp = x + ((t / 3.0) / (y * z)) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e+38) tmp = Float64(x - Float64(Float64(y / z) / 3.0)); elseif (y <= 2.25e+55) tmp = Float64(x + Float64(Float64(t / 3.0) / Float64(y * z))); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.7e+38) tmp = x - ((y / z) / 3.0); elseif (y <= 2.25e+55) tmp = x + ((t / 3.0) / (y * z)); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e+38], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e+55], N[(x + N[(N[(t / 3.0), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+38}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+55}:\\
\;\;\;\;x + \frac{\frac{t}{3}}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -2.69999999999999996e38Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 96.5%
metadata-eval96.5%
cancel-sign-sub-inv96.5%
associate-*r/96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around 0 96.5%
associate-*r/96.5%
*-commutative96.5%
associate-*r/96.5%
Simplified96.5%
*-commutative96.5%
associate-/r/96.4%
metadata-eval96.4%
associate-/r*96.4%
*-commutative96.4%
associate-/r*96.6%
clear-num96.7%
Applied egg-rr96.7%
if -2.69999999999999996e38 < y < 2.24999999999999999e55Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
remove-double-neg94.2%
distribute-frac-neg94.2%
sub-neg94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
neg-mul-194.2%
times-frac95.8%
distribute-lft-out--95.8%
*-commutative95.8%
associate-/r*95.8%
metadata-eval95.8%
Simplified95.8%
Taylor expanded in y around 0 89.6%
metadata-eval89.6%
times-frac89.7%
*-commutative89.7%
times-frac89.4%
associate-*l/89.6%
*-lft-identity89.6%
Simplified89.6%
if 2.24999999999999999e55 < y Initial program 96.2%
Taylor expanded in t around 0 98.1%
Final simplification92.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.1e+42)
(- x (/ (/ y z) 3.0))
(if (<= y 1.15e+62)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(- x (* (/ y z) 0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+42) {
tmp = x - ((y / z) / 3.0);
} else if (y <= 1.15e+62) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} 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 <= (-1.1d+42)) then
tmp = x - ((y / z) / 3.0d0)
else if (y <= 1.15d+62) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
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 <= -1.1e+42) {
tmp = x - ((y / z) / 3.0);
} else if (y <= 1.15e+62) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+42: tmp = x - ((y / z) / 3.0) elif y <= 1.15e+62: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+42) tmp = Float64(x - Float64(Float64(y / z) / 3.0)); elseif (y <= 1.15e+62) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.1e+42) tmp = x - ((y / z) / 3.0); elseif (y <= 1.15e+62) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+42], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+62], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+42}:\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+62}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -1.1000000000000001e42Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 96.5%
metadata-eval96.5%
cancel-sign-sub-inv96.5%
associate-*r/96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around 0 96.5%
associate-*r/96.5%
*-commutative96.5%
associate-*r/96.5%
Simplified96.5%
*-commutative96.5%
associate-/r/96.4%
metadata-eval96.4%
associate-/r*96.4%
*-commutative96.4%
associate-/r*96.6%
clear-num96.7%
Applied egg-rr96.7%
if -1.1000000000000001e42 < y < 1.14999999999999992e62Initial program 94.2%
sub-neg94.2%
associate-+l+94.2%
remove-double-neg94.2%
distribute-frac-neg94.2%
sub-neg94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
neg-mul-194.2%
times-frac95.8%
distribute-lft-out--95.8%
*-commutative95.8%
associate-/r*95.8%
metadata-eval95.8%
Simplified95.8%
Taylor expanded in y around 0 89.6%
if 1.14999999999999992e62 < y Initial program 96.2%
Taylor expanded in t around 0 98.1%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.3e-175) (not (<= y 8.6e-58))) (- x (/ (/ y z) 3.0)) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e-175) || !(y <= 8.6e-58)) {
tmp = x - ((y / z) / 3.0);
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.3d-175)) .or. (.not. (y <= 8.6d-58))) then
tmp = x - ((y / z) / 3.0d0)
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e-175) || !(y <= 8.6e-58)) {
tmp = x - ((y / z) / 3.0);
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.3e-175) or not (y <= 8.6e-58): tmp = x - ((y / z) / 3.0) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.3e-175) || !(y <= 8.6e-58)) tmp = Float64(x - Float64(Float64(y / z) / 3.0)); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.3e-175) || ~((y <= 8.6e-58))) tmp = x - ((y / z) / 3.0); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.3e-175], N[Not[LessEqual[y, 8.6e-58]], $MachinePrecision]], N[(x - N[(N[(y / z), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-175} \lor \neg \left(y \leq 8.6 \cdot 10^{-58}\right):\\
\;\;\;\;x - \frac{\frac{y}{z}}{3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -2.3e-175 or 8.5999999999999999e-58 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
times-frac98.2%
fma-define98.2%
metadata-eval98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 84.1%
metadata-eval84.1%
cancel-sign-sub-inv84.1%
associate-*r/84.1%
*-commutative84.1%
Simplified84.1%
Taylor expanded in y around 0 84.1%
associate-*r/84.1%
*-commutative84.1%
associate-*r/84.1%
Simplified84.1%
*-commutative84.1%
associate-/r/84.1%
metadata-eval84.1%
associate-/r*84.1%
*-commutative84.1%
associate-/r*84.2%
clear-num84.2%
Applied egg-rr84.2%
if -2.3e-175 < y < 8.5999999999999999e-58Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 98.4%
Taylor expanded in t around inf 77.9%
associate-*r/77.9%
Simplified77.9%
associate-/l*77.9%
associate-/l*78.0%
Applied egg-rr78.0%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.3e-175) (not (<= y 1.95e-55))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e-175) || !(y <= 1.95e-55)) {
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 <= (-2.3d-175)) .or. (.not. (y <= 1.95d-55))) 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 <= -2.3e-175) || !(y <= 1.95e-55)) {
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 <= -2.3e-175) or not (y <= 1.95e-55): 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 <= -2.3e-175) || !(y <= 1.95e-55)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.3e-175) || ~((y <= 1.95e-55))) 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, -2.3e-175], N[Not[LessEqual[y, 1.95e-55]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-175} \lor \neg \left(y \leq 1.95 \cdot 10^{-55}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -2.3e-175 or 1.95e-55 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
sub-neg97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
neg-mul-197.6%
times-frac98.1%
distribute-lft-out--98.1%
*-commutative98.1%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around inf 84.1%
if -2.3e-175 < y < 1.95e-55Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 98.4%
Taylor expanded in t around inf 77.9%
associate-*r/77.9%
Simplified77.9%
associate-/l*77.9%
associate-/l*78.0%
Applied egg-rr78.0%
Final simplification82.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.7e-176)
(+ x (/ y (* z -3.0)))
(if (<= y 6.6e-58)
(* 0.3333333333333333 (/ (/ t z) y))
(- x (* (/ y z) 0.3333333333333333)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-176) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6.6e-58) {
tmp = 0.3333333333333333 * ((t / z) / 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 <= (-2.7d-176)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 6.6d-58) then
tmp = 0.3333333333333333d0 * ((t / z) / 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 <= -2.7e-176) {
tmp = x + (y / (z * -3.0));
} else if (y <= 6.6e-58) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e-176: tmp = x + (y / (z * -3.0)) elif y <= 6.6e-58: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e-176) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 6.6e-58) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.7e-176) tmp = x + (y / (z * -3.0)); elseif (y <= 6.6e-58) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e-176], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e-58], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-176}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-58}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -2.6999999999999998e-176Initial program 98.8%
sub-neg98.8%
associate-+l+98.8%
remove-double-neg98.8%
distribute-frac-neg98.8%
sub-neg98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.8%
*-commutative98.8%
neg-mul-198.8%
times-frac97.7%
distribute-lft-out--97.7%
*-commutative97.7%
associate-/r*97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in y around inf 83.3%
*-commutative83.3%
metadata-eval83.3%
times-frac83.4%
*-rgt-identity83.4%
Simplified83.4%
if -2.6999999999999998e-176 < y < 6.60000000000000052e-58Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 98.4%
Taylor expanded in t around inf 77.9%
associate-*r/77.9%
Simplified77.9%
associate-/l*77.9%
associate-/l*78.0%
Applied egg-rr78.0%
if 6.60000000000000052e-58 < y Initial program 96.3%
Taylor expanded in t around 0 85.1%
Final simplification82.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e-176)
(+ x (/ y (* z -3.0)))
(if (<= y 1.55e-54)
(* 0.3333333333333333 (/ (/ t z) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-176) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.55e-54) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8d-176)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1.55d-54) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-176) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.55e-54) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-176: tmp = x + (y / (z * -3.0)) elif y <= 1.55e-54: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-176) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1.55e-54) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e-176) tmp = x + (y / (z * -3.0)); elseif (y <= 1.55e-54) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-176], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-54], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-176}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-54}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -8e-176Initial program 98.8%
sub-neg98.8%
associate-+l+98.8%
remove-double-neg98.8%
distribute-frac-neg98.8%
sub-neg98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.8%
*-commutative98.8%
neg-mul-198.8%
times-frac97.7%
distribute-lft-out--97.7%
*-commutative97.7%
associate-/r*97.7%
metadata-eval97.7%
Simplified97.7%
Taylor expanded in y around inf 83.3%
*-commutative83.3%
metadata-eval83.3%
times-frac83.4%
*-rgt-identity83.4%
Simplified83.4%
if -8e-176 < y < 1.55000000000000002e-54Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in y around 0 98.4%
Taylor expanded in t around inf 77.9%
associate-*r/77.9%
Simplified77.9%
associate-/l*77.9%
associate-/l*78.0%
Applied egg-rr78.0%
if 1.55000000000000002e-54 < y Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
sub-neg96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
associate-/l*96.2%
*-commutative96.2%
neg-mul-196.2%
times-frac98.5%
distribute-lft-out--98.5%
*-commutative98.5%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 85.0%
Final simplification82.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e+99) (not (<= y 2.25e+73))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e+99) || !(y <= 2.25e+73)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.1d+99)) .or. (.not. (y <= 2.25d+73))) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e+99) || !(y <= 2.25e+73)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e+99) or not (y <= 2.25e+73): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e+99) || !(y <= 2.25e+73)) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e+99) || ~((y <= 2.25e+73))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e+99], N[Not[LessEqual[y, 2.25e+73]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+99} \lor \neg \left(y \leq 2.25 \cdot 10^{+73}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.09999999999999989e99 or 2.24999999999999992e73 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
times-frac98.7%
fma-define98.7%
metadata-eval98.7%
associate-*l*98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in t around 0 98.7%
metadata-eval98.7%
cancel-sign-sub-inv98.7%
associate-*r/98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in y around 0 98.7%
associate-*r/98.8%
*-commutative98.8%
associate-*r/98.7%
Simplified98.7%
Taylor expanded in x around 0 76.9%
associate-*r/76.9%
*-commutative76.9%
associate-*r/76.9%
Simplified76.9%
if -1.09999999999999989e99 < y < 2.24999999999999992e73Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
times-frac94.8%
fma-define94.8%
metadata-eval94.8%
associate-*l*94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in x around inf 38.9%
Final simplification52.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1.85e+101) (/ (/ y z) -3.0) (if (<= y 1.08e+74) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+101) {
tmp = (y / z) / -3.0;
} else if (y <= 1.08e+74) {
tmp = x;
} else {
tmp = -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.85d+101)) then
tmp = (y / z) / (-3.0d0)
else if (y <= 1.08d+74) then
tmp = x
else
tmp = (-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.85e+101) {
tmp = (y / z) / -3.0;
} else if (y <= 1.08e+74) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+101: tmp = (y / z) / -3.0 elif y <= 1.08e+74: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+101) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= 1.08e+74) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+101) tmp = (y / z) / -3.0; elseif (y <= 1.08e+74) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+101], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, 1.08e+74], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+101}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.8499999999999999e101Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
metadata-eval99.6%
cancel-sign-sub-inv99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.6%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in x around 0 89.1%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.2%
Simplified89.2%
associate-*r/89.2%
frac-2neg89.2%
distribute-frac-neg289.2%
distribute-rgt-neg-in89.2%
metadata-eval89.2%
associate-*l/89.1%
metadata-eval89.1%
div-inv89.3%
distribute-neg-frac289.3%
metadata-eval89.3%
Applied egg-rr89.3%
if -1.8499999999999999e101 < y < 1.08e74Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
times-frac94.8%
fma-define94.8%
metadata-eval94.8%
associate-*l*94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in x around inf 38.9%
if 1.08e74 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac97.9%
fma-define97.9%
metadata-eval97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 97.9%
metadata-eval97.9%
cancel-sign-sub-inv97.9%
associate-*r/97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around 0 97.9%
associate-*r/97.8%
*-commutative97.8%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.25e+103) (/ y (* z -3.0)) (if (<= y 1.75e+74) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e+103) {
tmp = y / (z * -3.0);
} else if (y <= 1.75e+74) {
tmp = x;
} else {
tmp = -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.25d+103)) then
tmp = y / (z * (-3.0d0))
else if (y <= 1.75d+74) then
tmp = x
else
tmp = (-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.25e+103) {
tmp = y / (z * -3.0);
} else if (y <= 1.75e+74) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e+103: tmp = y / (z * -3.0) elif y <= 1.75e+74: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e+103) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 1.75e+74) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.25e+103) tmp = y / (z * -3.0); elseif (y <= 1.75e+74) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e+103], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+74], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+103}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.25e103Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
metadata-eval99.6%
cancel-sign-sub-inv99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.6%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.7%
Simplified99.7%
*-commutative99.7%
associate-/r/99.5%
metadata-eval99.5%
associate-/r*99.5%
*-commutative99.5%
associate-/r*99.8%
clear-num99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 89.1%
metadata-eval89.1%
times-frac89.2%
*-commutative89.2%
associate-/l*89.2%
neg-mul-189.2%
distribute-frac-neg289.2%
distribute-rgt-neg-in89.2%
metadata-eval89.2%
Simplified89.2%
if -1.25e103 < y < 1.75000000000000007e74Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
times-frac94.8%
fma-define94.8%
metadata-eval94.8%
associate-*l*94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in x around inf 38.9%
if 1.75000000000000007e74 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac97.9%
fma-define97.9%
metadata-eval97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 97.9%
metadata-eval97.9%
cancel-sign-sub-inv97.9%
associate-*r/97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around 0 97.9%
associate-*r/97.8%
*-commutative97.8%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (<= y -1.1e+99) (* y (/ -0.3333333333333333 z)) (if (<= y 6.5e+74) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+99) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 6.5e+74) {
tmp = x;
} else {
tmp = -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.1d+99)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 6.5d+74) then
tmp = x
else
tmp = (-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.1e+99) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 6.5e+74) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+99: tmp = y * (-0.3333333333333333 / z) elif y <= 6.5e+74: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+99) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 6.5e+74) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.1e+99) tmp = y * (-0.3333333333333333 / z); elseif (y <= 6.5e+74) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+99], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+74], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+99}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.09999999999999989e99Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.6%
fma-define99.6%
metadata-eval99.6%
associate-*l*99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 99.6%
metadata-eval99.6%
cancel-sign-sub-inv99.6%
associate-*r/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.6%
associate-*r/99.7%
*-commutative99.7%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in x around 0 89.1%
associate-*r/89.2%
*-commutative89.2%
associate-*r/89.2%
Simplified89.2%
if -1.09999999999999989e99 < y < 6.49999999999999962e74Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
distribute-frac-neg94.8%
neg-mul-194.8%
*-commutative94.8%
times-frac94.8%
fma-define94.8%
metadata-eval94.8%
associate-*l*94.8%
*-commutative94.8%
Simplified94.8%
Taylor expanded in x around inf 38.9%
if 6.49999999999999962e74 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac97.9%
fma-define97.9%
metadata-eval97.9%
associate-*l*97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 97.9%
metadata-eval97.9%
cancel-sign-sub-inv97.9%
associate-*r/97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in y around 0 97.9%
associate-*r/97.8%
*-commutative97.8%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification52.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 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac96.2%
fma-define96.2%
metadata-eval96.2%
associate-*l*96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in x around inf 33.7%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024150
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))