
(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 (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}
\end{array}
Initial program 96.9%
Final simplification96.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ (* y -0.3333333333333333) z))))
(if (<= (* z 3.0) -2e+116)
t_1
(if (<= (* z 3.0) -1e+75)
(/ (/ t (* y z)) 3.0)
(if (<= (* z 3.0) -2e+57)
(* y (+ (/ x y) (/ -0.3333333333333333 z)))
(if (<= (* z 3.0) 2e+54)
(* (- (/ t y) y) (/ 0.3333333333333333 z))
t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x + ((y * -0.3333333333333333) / z);
double tmp;
if ((z * 3.0) <= -2e+116) {
tmp = t_1;
} else if ((z * 3.0) <= -1e+75) {
tmp = (t / (y * z)) / 3.0;
} else if ((z * 3.0) <= -2e+57) {
tmp = y * ((x / y) + (-0.3333333333333333 / z));
} else if ((z * 3.0) <= 2e+54) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y * (-0.3333333333333333d0)) / z)
if ((z * 3.0d0) <= (-2d+116)) then
tmp = t_1
else if ((z * 3.0d0) <= (-1d+75)) then
tmp = (t / (y * z)) / 3.0d0
else if ((z * 3.0d0) <= (-2d+57)) then
tmp = y * ((x / y) + ((-0.3333333333333333d0) / z))
else if ((z * 3.0d0) <= 2d+54) then
tmp = ((t / y) - y) * (0.3333333333333333d0 / z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + ((y * -0.3333333333333333) / z);
double tmp;
if ((z * 3.0) <= -2e+116) {
tmp = t_1;
} else if ((z * 3.0) <= -1e+75) {
tmp = (t / (y * z)) / 3.0;
} else if ((z * 3.0) <= -2e+57) {
tmp = y * ((x / y) + (-0.3333333333333333 / z));
} else if ((z * 3.0) <= 2e+54) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + ((y * -0.3333333333333333) / z) tmp = 0 if (z * 3.0) <= -2e+116: tmp = t_1 elif (z * 3.0) <= -1e+75: tmp = (t / (y * z)) / 3.0 elif (z * 3.0) <= -2e+57: tmp = y * ((x / y) + (-0.3333333333333333 / z)) elif (z * 3.0) <= 2e+54: tmp = ((t / y) - y) * (0.3333333333333333 / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)) tmp = 0.0 if (Float64(z * 3.0) <= -2e+116) tmp = t_1; elseif (Float64(z * 3.0) <= -1e+75) tmp = Float64(Float64(t / Float64(y * z)) / 3.0); elseif (Float64(z * 3.0) <= -2e+57) tmp = Float64(y * Float64(Float64(x / y) + Float64(-0.3333333333333333 / z))); elseif (Float64(z * 3.0) <= 2e+54) tmp = Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + ((y * -0.3333333333333333) / z); tmp = 0.0; if ((z * 3.0) <= -2e+116) tmp = t_1; elseif ((z * 3.0) <= -1e+75) tmp = (t / (y * z)) / 3.0; elseif ((z * 3.0) <= -2e+57) tmp = y * ((x / y) + (-0.3333333333333333 / z)); elseif ((z * 3.0) <= 2e+54) tmp = ((t / y) - y) * (0.3333333333333333 / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+116], t$95$1, If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+75], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+57], N[(y * N[(N[(x / y), $MachinePrecision] + N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e+54], N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot 3 \leq -1 \cdot 10^{+75}:\\
\;\;\;\;\frac{\frac{t}{y \cdot z}}{3}\\
\mathbf{elif}\;z \cdot 3 \leq -2 \cdot 10^{+57}:\\
\;\;\;\;y \cdot \left(\frac{x}{y} + \frac{-0.3333333333333333}{z}\right)\\
\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{+54}:\\
\;\;\;\;\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -2.00000000000000003e116 or 2.0000000000000002e54 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac91.1%
distribute-frac-neg91.1%
neg-mul-191.1%
*-commutative91.1%
associate-/l*91.0%
*-commutative91.0%
Simplified91.1%
Taylor expanded in x around 0 91.1%
+-commutative91.1%
associate-*r/91.1%
Simplified91.1%
Taylor expanded in t around 0 78.8%
if -2.00000000000000003e116 < (*.f64 z #s(literal 3 binary64)) < -9.99999999999999927e74Initial program 99.4%
+-commutative99.4%
associate-+r-99.4%
sub-neg99.4%
associate-*l*99.4%
*-commutative99.4%
distribute-frac-neg299.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
Simplified99.4%
*-un-lft-identity99.4%
times-frac99.4%
Applied egg-rr99.4%
associate-*l/99.4%
*-lft-identity99.4%
Simplified99.4%
Taylor expanded in t around inf 99.4%
associate-/r*44.4%
Simplified44.4%
metadata-eval44.4%
times-frac45.0%
*-un-lft-identity45.0%
*-commutative45.0%
associate-/r*45.0%
associate-/l/99.7%
*-commutative99.7%
Applied egg-rr99.7%
if -9.99999999999999927e74 < (*.f64 z #s(literal 3 binary64)) < -2.0000000000000001e57Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.7%
*-commutative99.7%
Simplified100.0%
Taylor expanded in y around inf 100.0%
sub-neg100.0%
associate-*r/100.0%
metadata-eval100.0%
distribute-neg-frac100.0%
metadata-eval100.0%
Simplified100.0%
if -2.0000000000000001e57 < (*.f64 z #s(literal 3 binary64)) < 2.0000000000000002e54Initial program 94.4%
+-commutative94.4%
associate-+r-94.4%
sub-neg94.4%
associate-*l*94.4%
*-commutative94.4%
distribute-frac-neg294.4%
distribute-rgt-neg-in94.4%
metadata-eval94.4%
Simplified94.4%
*-un-lft-identity94.4%
times-frac94.4%
Applied egg-rr94.4%
associate-*l/94.4%
*-lft-identity94.4%
Simplified94.4%
Taylor expanded in z around 0 89.7%
+-commutative89.7%
metadata-eval89.7%
associate-*r*89.7%
neg-mul-189.7%
distribute-lft-in89.7%
sub-neg89.7%
*-rgt-identity89.7%
times-frac89.8%
/-rgt-identity89.8%
Simplified89.8%
Final simplification85.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.6e+121)
(/ y (* z -3.0))
(if (<= y -3.6e+20)
(* y (/ x y))
(if (<= y 4e-147)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 3.7e+99) x (/ (* y -0.3333333333333333) z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+121) {
tmp = y / (z * -3.0);
} else if (y <= -3.6e+20) {
tmp = y * (x / y);
} else if (y <= 4e-147) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 3.7e+99) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.6d+121)) then
tmp = y / (z * (-3.0d0))
else if (y <= (-3.6d+20)) then
tmp = y * (x / y)
else if (y <= 4d-147) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 3.7d+99) then
tmp = x
else
tmp = (y * (-0.3333333333333333d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.6e+121) {
tmp = y / (z * -3.0);
} else if (y <= -3.6e+20) {
tmp = y * (x / y);
} else if (y <= 4e-147) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 3.7e+99) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.6e+121: tmp = y / (z * -3.0) elif y <= -3.6e+20: tmp = y * (x / y) elif y <= 4e-147: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 3.7e+99: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.6e+121) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= -3.6e+20) tmp = Float64(y * Float64(x / y)); elseif (y <= 4e-147) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 3.7e+99) tmp = x; else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.6e+121) tmp = y / (z * -3.0); elseif (y <= -3.6e+20) tmp = y * (x / y); elseif (y <= 4e-147) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 3.7e+99) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.6e+121], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.6e+20], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e-147], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.7e+99], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+121}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+20}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-147}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.6e121Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
+-commutative99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 97.4%
sub-neg97.4%
associate-*r/97.4%
metadata-eval97.4%
distribute-neg-frac97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in x around 0 73.9%
clear-num73.8%
un-div-inv74.0%
div-inv74.1%
metadata-eval74.1%
Applied egg-rr74.1%
if -7.6e121 < y < -3.6e20Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
+-commutative100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
sub-neg100.0%
neg-mul-1100.0%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 82.0%
sub-neg82.0%
associate-*r/82.0%
metadata-eval82.0%
distribute-neg-frac82.0%
metadata-eval82.0%
Simplified82.0%
Taylor expanded in x around inf 62.9%
if -3.6e20 < y < 3.9999999999999999e-147Initial program 94.9%
+-commutative94.9%
associate-+r-94.9%
sub-neg94.9%
associate-*l*94.9%
*-commutative94.9%
distribute-frac-neg294.9%
distribute-rgt-neg-in94.9%
metadata-eval94.9%
Simplified94.9%
*-un-lft-identity94.9%
times-frac95.0%
Applied egg-rr95.0%
associate-*l/95.0%
*-lft-identity95.0%
Simplified95.0%
Taylor expanded in t around inf 68.9%
if 3.9999999999999999e-147 < y < 3.7000000000000001e99Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
+-commutative94.8%
remove-double-neg94.8%
distribute-frac-neg94.8%
distribute-neg-in94.8%
remove-double-neg94.8%
sub-neg94.8%
neg-mul-194.8%
times-frac96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
associate-/l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in x around inf 46.8%
if 3.7000000000000001e99 < y Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
Taylor expanded in y around inf 99.5%
sub-neg99.5%
associate-*r/99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 86.4%
associate-*r/86.5%
Applied egg-rr86.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.3e+54)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 7.5e+39)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.3e+54) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 7.5e+39) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} 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 <= (-2.3d+54)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 7.5d+39) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
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 <= -2.3e+54) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 7.5e+39) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.3e+54: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 7.5e+39: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.3e+54) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 7.5e+39) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.3e+54) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 7.5e+39) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.3e+54], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+39], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+54}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+39}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.29999999999999994e54Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
+-commutative99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 96.3%
+-commutative96.3%
Simplified96.3%
if -2.29999999999999994e54 < y < 7.5000000000000005e39Initial program 94.7%
sub-neg94.7%
associate-+l+94.7%
+-commutative94.7%
remove-double-neg94.7%
distribute-frac-neg94.7%
distribute-neg-in94.7%
remove-double-neg94.7%
sub-neg94.7%
neg-mul-194.7%
times-frac91.7%
distribute-frac-neg91.7%
neg-mul-191.7%
*-commutative91.7%
associate-/l*91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in t around inf 87.0%
if 7.5000000000000005e39 < y Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.6%
+-commutative99.6%
associate-*r/99.7%
Simplified99.7%
Taylor expanded in t around 0 96.3%
Final simplification90.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.04e-51) (not (<= y 1.45e-146))) (+ x (/ (* y -0.3333333333333333) z)) (/ (/ t (* y z)) 3.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.04e-51) || !(y <= 1.45e-146)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (t / (y * z)) / 3.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.04d-51)) .or. (.not. (y <= 1.45d-146))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = (t / (y * z)) / 3.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.04e-51) || !(y <= 1.45e-146)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (t / (y * z)) / 3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.04e-51) or not (y <= 1.45e-146): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = (t / (y * z)) / 3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.04e-51) || !(y <= 1.45e-146)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(Float64(t / Float64(y * z)) / 3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.04e-51) || ~((y <= 1.45e-146))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = (t / (y * z)) / 3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.04e-51], N[Not[LessEqual[y, 1.45e-146]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.04 \cdot 10^{-51} \lor \neg \left(y \leq 1.45 \cdot 10^{-146}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{y \cdot z}}{3}\\
\end{array}
\end{array}
if y < -1.0399999999999999e-51 or 1.45000000000000005e-146 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
+-commutative98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
Simplified98.7%
Taylor expanded in x around 0 98.6%
+-commutative98.6%
associate-*r/98.7%
Simplified98.7%
Taylor expanded in t around 0 83.9%
if -1.0399999999999999e-51 < y < 1.45000000000000005e-146Initial program 94.3%
+-commutative94.3%
associate-+r-94.3%
sub-neg94.3%
associate-*l*94.3%
*-commutative94.3%
distribute-frac-neg294.3%
distribute-rgt-neg-in94.3%
metadata-eval94.3%
Simplified94.3%
*-un-lft-identity94.3%
times-frac94.4%
Applied egg-rr94.4%
associate-*l/94.4%
*-lft-identity94.4%
Simplified94.4%
Taylor expanded in t around inf 71.8%
associate-/r*64.4%
Simplified64.4%
metadata-eval64.4%
times-frac64.4%
*-un-lft-identity64.4%
*-commutative64.4%
associate-/r*64.4%
associate-/l/71.9%
*-commutative71.9%
Applied egg-rr71.9%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.7e-34) (not (<= y 6.3e-146))) (+ x (/ (* y -0.3333333333333333) z)) (/ t (* y (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e-34) || !(y <= 6.3e-146)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = t / (y * (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2.7d-34)) .or. (.not. (y <= 6.3d-146))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = t / (y * (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.7e-34) || !(y <= 6.3e-146)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = t / (y * (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.7e-34) or not (y <= 6.3e-146): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = t / (y * (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.7e-34) || !(y <= 6.3e-146)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(t / Float64(y * Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.7e-34) || ~((y <= 6.3e-146))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = t / (y * (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.7e-34], N[Not[LessEqual[y, 6.3e-146]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-34} \lor \neg \left(y \leq 6.3 \cdot 10^{-146}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}
\end{array}
if y < -2.70000000000000017e-34 or 6.2999999999999997e-146 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
+-commutative98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around 0 98.6%
+-commutative98.6%
associate-*r/98.7%
Simplified98.7%
Taylor expanded in t around 0 84.3%
if -2.70000000000000017e-34 < y < 6.2999999999999997e-146Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
sub-neg94.5%
associate-*l*94.5%
*-commutative94.5%
distribute-frac-neg294.5%
distribute-rgt-neg-in94.5%
metadata-eval94.5%
Simplified94.5%
*-un-lft-identity94.5%
times-frac94.5%
Applied egg-rr94.5%
associate-*l/94.5%
*-lft-identity94.5%
Simplified94.5%
Taylor expanded in t around inf 71.3%
associate-/r*64.0%
Simplified64.0%
metadata-eval64.0%
times-frac64.1%
*-un-lft-identity64.1%
*-commutative64.1%
associate-/l/71.4%
Applied egg-rr71.4%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.5e-34) (not (<= y 1.45e-146))) (+ 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.5e-34) || !(y <= 1.45e-146)) {
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.5d-34)) .or. (.not. (y <= 1.45d-146))) 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.5e-34) || !(y <= 1.45e-146)) {
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.5e-34) or not (y <= 1.45e-146): 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.5e-34) || !(y <= 1.45e-146)) tmp = Float64(x + Float64(Float64(y * -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.5e-34) || ~((y <= 1.45e-146))) 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.5e-34], N[Not[LessEqual[y, 1.45e-146]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-34} \lor \neg \left(y \leq 1.45 \cdot 10^{-146}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.5e-34 or 1.45000000000000005e-146 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
+-commutative98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around 0 98.6%
+-commutative98.6%
associate-*r/98.7%
Simplified98.7%
Taylor expanded in t around 0 84.3%
if -1.5e-34 < y < 1.45000000000000005e-146Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
sub-neg94.5%
associate-*l*94.5%
*-commutative94.5%
distribute-frac-neg294.5%
distribute-rgt-neg-in94.5%
metadata-eval94.5%
Simplified94.5%
*-un-lft-identity94.5%
times-frac94.5%
Applied egg-rr94.5%
associate-*l/94.5%
*-lft-identity94.5%
Simplified94.5%
Taylor expanded in t around inf 71.3%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.3e-35) (not (<= y 4.5e-146))) (+ x (* -0.3333333333333333 (/ y z))) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.3e-35) || !(y <= 4.5e-146)) {
tmp = x + (-0.3333333333333333 * (y / 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 <= (-2.3d-35)) .or. (.not. (y <= 4.5d-146))) then
tmp = x + ((-0.3333333333333333d0) * (y / 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 <= -2.3e-35) || !(y <= 4.5e-146)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.3e-35) or not (y <= 4.5e-146): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.3e-35) || !(y <= 4.5e-146)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / 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 <= -2.3e-35) || ~((y <= 4.5e-146))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.3e-35], N[Not[LessEqual[y, 4.5e-146]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / 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 -2.3 \cdot 10^{-35} \lor \neg \left(y \leq 4.5 \cdot 10^{-146}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -2.2999999999999999e-35 or 4.5000000000000001e-146 < y Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
+-commutative98.1%
remove-double-neg98.1%
distribute-frac-neg98.1%
distribute-neg-in98.1%
remove-double-neg98.1%
sub-neg98.1%
neg-mul-198.1%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in t around 0 84.2%
+-commutative84.2%
Simplified84.2%
if -2.2999999999999999e-35 < y < 4.5000000000000001e-146Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
sub-neg94.5%
associate-*l*94.5%
*-commutative94.5%
distribute-frac-neg294.5%
distribute-rgt-neg-in94.5%
metadata-eval94.5%
Simplified94.5%
*-un-lft-identity94.5%
times-frac94.5%
Applied egg-rr94.5%
associate-*l/94.5%
*-lft-identity94.5%
Simplified94.5%
Taylor expanded in t around inf 71.3%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -7.5e+121) (not (<= y 5e+99))) (/ y (* z -3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -7.5e+121) || !(y <= 5e+99)) {
tmp = y / (z * -3.0);
} 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 <= (-7.5d+121)) .or. (.not. (y <= 5d+99))) then
tmp = y / (z * (-3.0d0))
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 <= -7.5e+121) || !(y <= 5e+99)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -7.5e+121) or not (y <= 5e+99): tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -7.5e+121) || !(y <= 5e+99)) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -7.5e+121) || ~((y <= 5e+99))) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -7.5e+121], N[Not[LessEqual[y, 5e+99]], $MachinePrecision]], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+121} \lor \neg \left(y \leq 5 \cdot 10^{+99}\right):\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.49999999999999965e121 or 5.00000000000000008e99 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 98.5%
sub-neg98.5%
associate-*r/98.6%
metadata-eval98.6%
distribute-neg-frac98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 80.7%
clear-num80.7%
un-div-inv80.8%
div-inv80.8%
metadata-eval80.8%
Applied egg-rr80.8%
if -7.49999999999999965e121 < y < 5.00000000000000008e99Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
+-commutative95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
Simplified93.0%
Taylor expanded in x around inf 36.5%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.5e+122) (not (<= y 1.1e+115))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.5e+122) || !(y <= 1.1e+115)) {
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.5d+122)) .or. (.not. (y <= 1.1d+115))) 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.5e+122) || !(y <= 1.1e+115)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.5e+122) or not (y <= 1.1e+115): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.5e+122) || !(y <= 1.1e+115)) 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.5e+122) || ~((y <= 1.1e+115))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.5e+122], N[Not[LessEqual[y, 1.1e+115]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+122} \lor \neg \left(y \leq 1.1 \cdot 10^{+115}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.49999999999999993e122 or 1.1e115 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 98.5%
sub-neg98.5%
associate-*r/98.6%
metadata-eval98.6%
distribute-neg-frac98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 81.5%
if -1.49999999999999993e122 < y < 1.1e115Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
+-commutative95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac93.0%
distribute-frac-neg93.0%
neg-mul-193.0%
*-commutative93.0%
associate-/l*93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in x around inf 36.7%
Final simplification50.5%
(FPCore (x y z t) :precision binary64 (if (<= y -7.7e+121) (/ y (* z -3.0)) (if (<= y 4.8e+99) x (/ (* y -0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.7e+121) {
tmp = y / (z * -3.0);
} else if (y <= 4.8e+99) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.7d+121)) then
tmp = y / (z * (-3.0d0))
else if (y <= 4.8d+99) then
tmp = x
else
tmp = (y * (-0.3333333333333333d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.7e+121) {
tmp = y / (z * -3.0);
} else if (y <= 4.8e+99) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.7e+121: tmp = y / (z * -3.0) elif y <= 4.8e+99: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.7e+121) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 4.8e+99) tmp = x; else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.7e+121) tmp = y / (z * -3.0); elseif (y <= 4.8e+99) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.7e+121], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+99], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.7 \cdot 10^{+121}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -7.70000000000000028e121Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
+-commutative99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 97.4%
sub-neg97.4%
associate-*r/97.4%
metadata-eval97.4%
distribute-neg-frac97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in x around 0 73.9%
clear-num73.8%
un-div-inv74.0%
div-inv74.1%
metadata-eval74.1%
Applied egg-rr74.1%
if -7.70000000000000028e121 < y < 4.8000000000000002e99Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
+-commutative95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac92.9%
distribute-frac-neg92.9%
neg-mul-192.9%
*-commutative92.9%
associate-/l*92.9%
*-commutative92.9%
Simplified93.0%
Taylor expanded in x around inf 36.5%
if 4.8000000000000002e99 < y Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.6%
Taylor expanded in y around inf 99.5%
sub-neg99.5%
associate-*r/99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 86.4%
associate-*r/86.5%
Applied egg-rr86.5%
(FPCore (x y z t) :precision binary64 (+ (+ x (/ t (* z (* y 3.0)))) (/ (/ y -3.0) z)))
double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / 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 + (t / (z * (y * 3.0d0)))) + ((y / (-3.0d0)) / z)
end function
public static double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z);
}
def code(x, y, z, t): return (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z)
function code(x, y, z, t) return Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(Float64(y / -3.0) / z)) end
function tmp = code(x, y, z, t) tmp = (x + (t / (z * (y * 3.0)))) + ((y / -3.0) / z); end
code[x_, y_, z_, t_] := N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{\frac{y}{-3}}{z}
\end{array}
Initial program 96.9%
+-commutative96.9%
associate-+r-96.9%
sub-neg96.9%
associate-*l*96.8%
*-commutative96.8%
distribute-frac-neg296.8%
distribute-rgt-neg-in96.8%
metadata-eval96.8%
Simplified96.8%
*-un-lft-identity96.8%
times-frac96.8%
Applied egg-rr96.8%
associate-*l/96.9%
*-lft-identity96.9%
Simplified96.9%
Final simplification96.9%
(FPCore (x y z t) :precision binary64 (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x + (t / (z * (y * 3.0d0)))) + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
def code(x, y, z, t): return (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0))
function code(x, y, z, t) return Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}
\end{array}
Initial program 96.9%
+-commutative96.9%
associate-+r-96.9%
sub-neg96.9%
associate-*l*96.8%
*-commutative96.8%
distribute-frac-neg296.8%
distribute-rgt-neg-in96.8%
metadata-eval96.8%
Simplified96.8%
Final simplification96.8%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
+-commutative96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
distribute-neg-in96.9%
remove-double-neg96.9%
sub-neg96.9%
neg-mul-196.9%
times-frac95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
associate-/l*95.1%
*-commutative95.1%
Simplified95.1%
*-commutative95.1%
clear-num95.0%
div-inv95.1%
metadata-eval95.1%
un-div-inv95.2%
Applied egg-rr95.2%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
+-commutative96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
distribute-neg-in96.9%
remove-double-neg96.9%
sub-neg96.9%
neg-mul-196.9%
times-frac95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
associate-/l*95.1%
*-commutative95.1%
Simplified95.1%
Final simplification95.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
+-commutative96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
distribute-neg-in96.9%
remove-double-neg96.9%
sub-neg96.9%
neg-mul-196.9%
times-frac95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
associate-/l*95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in x around inf 30.4%
(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 2024103
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))