
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= (* z 3.0) -2e+75)
(+ (+ (/ (/ t z) (* 3.0 y)) x) t_1)
(if (<= (* z 3.0) 1e-22)
(+ x (* 0.3333333333333333 (/ (- (/ t y) y) z)))
(+ t_1 (+ x (/ t (* z (* 3.0 y)))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if ((z * 3.0) <= -2e+75) {
tmp = (((t / z) / (3.0 * y)) + x) + t_1;
} else if ((z * 3.0) <= 1e-22) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = t_1 + (x + (t / (z * (3.0 * y))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / (z * (-3.0d0))
if ((z * 3.0d0) <= (-2d+75)) then
tmp = (((t / z) / (3.0d0 * y)) + x) + t_1
else if ((z * 3.0d0) <= 1d-22) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = t_1 + (x + (t / (z * (3.0d0 * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if ((z * 3.0) <= -2e+75) {
tmp = (((t / z) / (3.0 * y)) + x) + t_1;
} else if ((z * 3.0) <= 1e-22) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = t_1 + (x + (t / (z * (3.0 * y))));
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if (z * 3.0) <= -2e+75: tmp = (((t / z) / (3.0 * y)) + x) + t_1 elif (z * 3.0) <= 1e-22: tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = t_1 + (x + (t / (z * (3.0 * y)))) return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (Float64(z * 3.0) <= -2e+75) tmp = Float64(Float64(Float64(Float64(t / z) / Float64(3.0 * y)) + x) + t_1); elseif (Float64(z * 3.0) <= 1e-22) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(t_1 + Float64(x + Float64(t / Float64(z * Float64(3.0 * y))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if ((z * 3.0) <= -2e+75) tmp = (((t / z) / (3.0 * y)) + x) + t_1; elseif ((z * 3.0) <= 1e-22) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = t_1 + (x + (t / (z * (3.0 * y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+75], N[(N[(N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-22], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+75}:\\
\;\;\;\;\left(\frac{\frac{t}{z}}{3 \cdot y} + x\right) + t\_1\\
\mathbf{elif}\;z \cdot 3 \leq 10^{-22}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right)\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -1.99999999999999985e75Initial program 97.6%
+-commutative97.6%
associate-+r-97.6%
sub-neg97.6%
associate-*l*97.7%
*-commutative97.7%
distribute-frac-neg297.7%
distribute-rgt-neg-in97.7%
metadata-eval97.7%
Simplified97.7%
*-un-lft-identity97.7%
*-commutative97.7%
times-frac99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
Applied egg-rr99.8%
if -1.99999999999999985e75 < (*.f64 z #s(literal 3 binary64)) < 1e-22Initial program 92.6%
sub-neg92.6%
associate-+l+92.6%
+-commutative92.6%
remove-double-neg92.6%
distribute-frac-neg92.6%
distribute-neg-in92.6%
remove-double-neg92.6%
sub-neg92.6%
neg-mul-192.6%
times-frac99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*99.0%
*-commutative99.0%
Simplified99.7%
Taylor expanded in z around 0 99.8%
if 1e-22 < (*.f64 z #s(literal 3 binary64)) Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
sub-neg98.7%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 1e-22) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ (/ y (* z -3.0)) (+ x (/ t (* z (* 3.0 y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e-22) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (y / (z * -3.0)) + (x + (t / (z * (3.0 * y))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 1d-22) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = (y / (z * (-3.0d0))) + (x + (t / (z * (3.0d0 * y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e-22) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (y / (z * -3.0)) + (x + (t / (z * (3.0 * y))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 1e-22: tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = (y / (z * -3.0)) + (x + (t / (z * (3.0 * y)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 1e-22) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(Float64(y / Float64(z * -3.0)) + Float64(x + Float64(t / Float64(z * Float64(3.0 * y))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 1e-22) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = (y / (z * -3.0)) + (x + (t / (z * (3.0 * y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-22], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 10^{-22}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3} + \left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right)\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 1e-22Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
+-commutative93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac96.6%
distribute-frac-neg96.6%
neg-mul-196.6%
*-commutative96.6%
associate-/l*96.6%
*-commutative96.6%
Simplified97.1%
Taylor expanded in z around 0 97.1%
if 1e-22 < (*.f64 z #s(literal 3 binary64)) Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
sub-neg98.7%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification97.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.35e-70) (not (<= y 2e-143))) (+ x (/ 0.3333333333333333 (/ z (- (/ t y) y)))) (/ (+ (* (/ t z) 0.3333333333333333) (* y x)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.35e-70) || !(y <= 2e-143)) {
tmp = x + (0.3333333333333333 / (z / ((t / y) - y)));
} else {
tmp = (((t / z) * 0.3333333333333333) + (y * x)) / 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 <= (-1.35d-70)) .or. (.not. (y <= 2d-143))) then
tmp = x + (0.3333333333333333d0 / (z / ((t / y) - y)))
else
tmp = (((t / z) * 0.3333333333333333d0) + (y * x)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.35e-70) || !(y <= 2e-143)) {
tmp = x + (0.3333333333333333 / (z / ((t / y) - y)));
} else {
tmp = (((t / z) * 0.3333333333333333) + (y * x)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.35e-70) or not (y <= 2e-143): tmp = x + (0.3333333333333333 / (z / ((t / y) - y))) else: tmp = (((t / z) * 0.3333333333333333) + (y * x)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.35e-70) || !(y <= 2e-143)) tmp = Float64(x + Float64(0.3333333333333333 / Float64(z / Float64(Float64(t / y) - y)))); else tmp = Float64(Float64(Float64(Float64(t / z) * 0.3333333333333333) + Float64(y * x)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.35e-70) || ~((y <= 2e-143))) tmp = x + (0.3333333333333333 / (z / ((t / y) - y))); else tmp = (((t / z) * 0.3333333333333333) + (y * x)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.35e-70], N[Not[LessEqual[y, 2e-143]], $MachinePrecision]], N[(x + N[(0.3333333333333333 / N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-70} \lor \neg \left(y \leq 2 \cdot 10^{-143}\right):\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t}{z} \cdot 0.3333333333333333 + y \cdot x}{y}\\
\end{array}
\end{array}
if y < -1.3500000000000001e-70 or 1.9999999999999999e-143 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.2%
*-commutative98.2%
Simplified98.6%
Taylor expanded in z around 0 98.6%
clear-num98.6%
un-div-inv98.7%
Applied egg-rr98.7%
if -1.3500000000000001e-70 < y < 1.9999999999999999e-143Initial program 88.6%
sub-neg88.6%
associate-+l+88.6%
+-commutative88.6%
remove-double-neg88.6%
distribute-frac-neg88.6%
distribute-neg-in88.6%
remove-double-neg88.6%
sub-neg88.6%
neg-mul-188.6%
times-frac80.4%
distribute-frac-neg80.4%
neg-mul-180.4%
*-commutative80.4%
associate-/l*80.4%
*-commutative80.4%
Simplified81.5%
Taylor expanded in y around 0 94.8%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -35.0) (not (<= y 2.9e+85))) (- x (/ (/ y 3.0) z)) (+ x (/ t (* z (* 3.0 y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -35.0) || !(y <= 2.9e+85)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + (t / (z * (3.0 * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-35.0d0)) .or. (.not. (y <= 2.9d+85))) then
tmp = x - ((y / 3.0d0) / z)
else
tmp = x + (t / (z * (3.0d0 * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -35.0) || !(y <= 2.9e+85)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + (t / (z * (3.0 * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -35.0) or not (y <= 2.9e+85): tmp = x - ((y / 3.0) / z) else: tmp = x + (t / (z * (3.0 * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -35.0) || !(y <= 2.9e+85)) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); else tmp = Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -35.0) || ~((y <= 2.9e+85))) tmp = x - ((y / 3.0) / z); else tmp = x + (t / (z * (3.0 * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -35.0], N[Not[LessEqual[y, 2.9e+85]], $MachinePrecision]], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -35 \lor \neg \left(y \leq 2.9 \cdot 10^{+85}\right):\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z \cdot \left(3 \cdot y\right)}\\
\end{array}
\end{array}
if y < -35 or 2.89999999999999997e85 < y Initial program 98.0%
Taylor expanded in t around 0 94.2%
metadata-eval94.2%
times-frac94.4%
*-un-lft-identity94.4%
associate-/r*94.4%
Applied egg-rr94.4%
if -35 < y < 2.89999999999999997e85Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
+-commutative93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac88.4%
distribute-frac-neg88.4%
neg-mul-188.4%
*-commutative88.4%
associate-/l*88.4%
*-commutative88.4%
Simplified88.9%
Taylor expanded in t around inf 89.4%
associate-*r/89.3%
*-commutative89.3%
times-frac83.8%
clear-num83.2%
frac-times88.8%
*-un-lft-identity88.8%
div-inv88.8%
metadata-eval88.8%
associate-*l*89.4%
*-commutative89.4%
Applied egg-rr89.4%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -35.0) (not (<= y 2.9e+85))) (- x (/ (/ y 3.0) z)) (+ x (/ 0.3333333333333333 (/ (* z y) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -35.0) || !(y <= 2.9e+85)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + (0.3333333333333333 / ((z * y) / t));
}
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 <= (-35.0d0)) .or. (.not. (y <= 2.9d+85))) then
tmp = x - ((y / 3.0d0) / z)
else
tmp = x + (0.3333333333333333d0 / ((z * y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -35.0) || !(y <= 2.9e+85)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + (0.3333333333333333 / ((z * y) / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -35.0) or not (y <= 2.9e+85): tmp = x - ((y / 3.0) / z) else: tmp = x + (0.3333333333333333 / ((z * y) / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -35.0) || !(y <= 2.9e+85)) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(Float64(z * y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -35.0) || ~((y <= 2.9e+85))) tmp = x - ((y / 3.0) / z); else tmp = x + (0.3333333333333333 / ((z * y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -35.0], N[Not[LessEqual[y, 2.9e+85]], $MachinePrecision]], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -35 \lor \neg \left(y \leq 2.9 \cdot 10^{+85}\right):\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\
\end{array}
\end{array}
if y < -35 or 2.89999999999999997e85 < y Initial program 98.0%
Taylor expanded in t around 0 94.2%
metadata-eval94.2%
times-frac94.4%
*-un-lft-identity94.4%
associate-/r*94.4%
Applied egg-rr94.4%
if -35 < y < 2.89999999999999997e85Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
+-commutative93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac88.4%
distribute-frac-neg88.4%
neg-mul-188.4%
*-commutative88.4%
associate-/l*88.4%
*-commutative88.4%
Simplified88.9%
Taylor expanded in t around inf 89.4%
clear-num89.3%
un-div-inv89.4%
*-commutative89.4%
Applied egg-rr89.4%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -34.0) (not (<= y 2.9e+85))) (- x (/ (/ y 3.0) z)) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -34.0) || !(y <= 2.9e+85)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + (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 <= (-34.0d0)) .or. (.not. (y <= 2.9d+85))) then
tmp = x - ((y / 3.0d0) / z)
else
tmp = x + (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 <= -34.0) || !(y <= 2.9e+85)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -34.0) or not (y <= 2.9e+85): tmp = x - ((y / 3.0) / z) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -34.0) || !(y <= 2.9e+85)) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -34.0) || ~((y <= 2.9e+85))) tmp = x - ((y / 3.0) / z); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -34.0], N[Not[LessEqual[y, 2.9e+85]], $MachinePrecision]], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -34 \lor \neg \left(y \leq 2.9 \cdot 10^{+85}\right):\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -34 or 2.89999999999999997e85 < y Initial program 98.0%
Taylor expanded in t around 0 94.2%
metadata-eval94.2%
times-frac94.4%
*-un-lft-identity94.4%
associate-/r*94.4%
Applied egg-rr94.4%
if -34 < y < 2.89999999999999997e85Initial program 93.3%
sub-neg93.3%
associate-+l+93.3%
+-commutative93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac88.4%
distribute-frac-neg88.4%
neg-mul-188.4%
*-commutative88.4%
associate-/l*88.4%
*-commutative88.4%
Simplified88.9%
Taylor expanded in t around inf 89.4%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= x -3e+26)
(- x (/ (/ y 3.0) z))
(if (<= x 2.45e+92)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3e+26) {
tmp = x - ((y / 3.0) / z);
} else if (x <= 2.45e+92) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3d+26)) then
tmp = x - ((y / 3.0d0) / z)
else if (x <= 2.45d+92) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3e+26) {
tmp = x - ((y / 3.0) / z);
} else if (x <= 2.45e+92) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3e+26: tmp = x - ((y / 3.0) / z) elif x <= 2.45e+92: tmp = 0.3333333333333333 * (((t / y) - y) / z) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3e+26) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); elseif (x <= 2.45e+92) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3e+26) tmp = x - ((y / 3.0) / z); elseif (x <= 2.45e+92) tmp = 0.3333333333333333 * (((t / y) - y) / z); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3e+26], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.45e+92], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+26}:\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{+92}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if x < -2.99999999999999997e26Initial program 96.7%
Taylor expanded in t around 0 87.4%
metadata-eval87.4%
times-frac87.4%
*-un-lft-identity87.4%
associate-/r*87.4%
Applied egg-rr87.4%
if -2.99999999999999997e26 < x < 2.4500000000000001e92Initial program 95.6%
sub-neg95.6%
associate-+l+95.6%
+-commutative95.6%
remove-double-neg95.6%
distribute-frac-neg95.6%
distribute-neg-in95.6%
remove-double-neg95.6%
sub-neg95.6%
neg-mul-195.6%
times-frac93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
associate-/l*93.8%
*-commutative93.8%
Simplified94.2%
Taylor expanded in z around 0 94.3%
Taylor expanded in x around 0 82.6%
if 2.4500000000000001e92 < x Initial program 93.2%
Taylor expanded in t around 0 77.5%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 1e+176) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e+176) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + (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 ((z * 3.0d0) <= 1d+176) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = x + (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 ((z * 3.0) <= 1e+176) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 1e+176: tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 1e+176) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 1e+176) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+176], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 10^{+176}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 1e176Initial program 95.1%
sub-neg95.1%
associate-+l+95.1%
+-commutative95.1%
remove-double-neg95.1%
distribute-frac-neg95.1%
distribute-neg-in95.1%
remove-double-neg95.1%
sub-neg95.1%
neg-mul-195.1%
times-frac95.2%
distribute-frac-neg95.2%
neg-mul-195.2%
*-commutative95.2%
associate-/l*95.2%
*-commutative95.2%
Simplified95.6%
Taylor expanded in z around 0 95.6%
if 1e176 < (*.f64 z #s(literal 3 binary64)) Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
+-commutative96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac73.1%
distribute-frac-neg73.1%
neg-mul-173.1%
*-commutative73.1%
associate-/l*73.1%
*-commutative73.1%
Simplified76.0%
Taylor expanded in t around inf 96.7%
Final simplification95.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.049) (not (<= y 2.9e+98))) (/ y (* z -3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.049) || !(y <= 2.9e+98)) {
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 <= (-0.049d0)) .or. (.not. (y <= 2.9d+98))) 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 <= -0.049) || !(y <= 2.9e+98)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.049) or not (y <= 2.9e+98): tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.049) || !(y <= 2.9e+98)) 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 <= -0.049) || ~((y <= 2.9e+98))) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.049], N[Not[LessEqual[y, 2.9e+98]], $MachinePrecision]], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.049 \lor \neg \left(y \leq 2.9 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.049000000000000002 or 2.9000000000000001e98 < y Initial program 98.0%
Taylor expanded in t around 0 93.3%
Taylor expanded in x around 0 68.8%
associate-*r/68.9%
associate-*l/68.9%
metadata-eval68.9%
associate-/r*69.0%
*-commutative69.0%
associate-*l/69.0%
*-lft-identity69.0%
Simplified69.0%
if -0.049000000000000002 < y < 2.9000000000000001e98Initial program 93.4%
sub-neg93.4%
associate-+l+93.4%
+-commutative93.4%
remove-double-neg93.4%
distribute-frac-neg93.4%
distribute-neg-in93.4%
remove-double-neg93.4%
sub-neg93.4%
neg-mul-193.4%
times-frac88.5%
distribute-frac-neg88.5%
neg-mul-188.5%
*-commutative88.5%
associate-/l*88.5%
*-commutative88.5%
Simplified89.0%
Taylor expanded in x around inf 41.1%
Final simplification52.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.235) (not (<= y 1.9e+98))) (/ -0.3333333333333333 (/ z y)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.235) || !(y <= 1.9e+98)) {
tmp = -0.3333333333333333 / (z / y);
} 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 <= (-0.235d0)) .or. (.not. (y <= 1.9d+98))) then
tmp = (-0.3333333333333333d0) / (z / y)
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 <= -0.235) || !(y <= 1.9e+98)) {
tmp = -0.3333333333333333 / (z / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.235) or not (y <= 1.9e+98): tmp = -0.3333333333333333 / (z / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.235) || !(y <= 1.9e+98)) tmp = Float64(-0.3333333333333333 / Float64(z / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -0.235) || ~((y <= 1.9e+98))) tmp = -0.3333333333333333 / (z / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.235], N[Not[LessEqual[y, 1.9e+98]], $MachinePrecision]], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.235 \lor \neg \left(y \leq 1.9 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.23499999999999999 or 1.89999999999999995e98 < y Initial program 98.0%
+-commutative98.0%
associate-+r-98.0%
sub-neg98.0%
associate-*l*98.0%
*-commutative98.0%
distribute-frac-neg298.0%
distribute-rgt-neg-in98.0%
metadata-eval98.0%
Simplified98.0%
*-un-lft-identity98.0%
*-commutative98.0%
times-frac94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 68.8%
clear-num68.8%
un-div-inv68.9%
Applied egg-rr68.9%
if -0.23499999999999999 < y < 1.89999999999999995e98Initial program 93.4%
sub-neg93.4%
associate-+l+93.4%
+-commutative93.4%
remove-double-neg93.4%
distribute-frac-neg93.4%
distribute-neg-in93.4%
remove-double-neg93.4%
sub-neg93.4%
neg-mul-193.4%
times-frac88.5%
distribute-frac-neg88.5%
neg-mul-188.5%
*-commutative88.5%
associate-/l*88.5%
*-commutative88.5%
Simplified89.0%
Taylor expanded in x around inf 41.1%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.86e-6) (not (<= y 1.35e+98))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.86e-6) || !(y <= 1.35e+98)) {
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.86d-6)) .or. (.not. (y <= 1.35d+98))) 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.86e-6) || !(y <= 1.35e+98)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.86e-6) or not (y <= 1.35e+98): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.86e-6) || !(y <= 1.35e+98)) 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.86e-6) || ~((y <= 1.35e+98))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.86e-6], N[Not[LessEqual[y, 1.35e+98]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.86 \cdot 10^{-6} \lor \neg \left(y \leq 1.35 \cdot 10^{+98}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.86e-6 or 1.35e98 < y Initial program 98.0%
sub-neg98.0%
associate-+l+98.0%
+-commutative98.0%
remove-double-neg98.0%
distribute-frac-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
sub-neg98.0%
neg-mul-198.0%
times-frac98.9%
distribute-frac-neg98.9%
neg-mul-198.9%
*-commutative98.9%
associate-/l*98.9%
*-commutative98.9%
Simplified99.7%
Taylor expanded in y around inf 93.4%
associate-*r/93.3%
metadata-eval93.3%
Simplified93.3%
Taylor expanded in x around 0 68.9%
if -1.86e-6 < y < 1.35e98Initial program 93.4%
sub-neg93.4%
associate-+l+93.4%
+-commutative93.4%
remove-double-neg93.4%
distribute-frac-neg93.4%
distribute-neg-in93.4%
remove-double-neg93.4%
sub-neg93.4%
neg-mul-193.4%
times-frac88.5%
distribute-frac-neg88.5%
neg-mul-188.5%
*-commutative88.5%
associate-/l*88.5%
*-commutative88.5%
Simplified89.0%
Taylor expanded in x around inf 41.1%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.2) (not (<= y 1.65e+98))) (* (/ y z) -0.3333333333333333) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.2) || !(y <= 1.65e+98)) {
tmp = (y / z) * -0.3333333333333333;
} 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 <= (-0.2d0)) .or. (.not. (y <= 1.65d+98))) then
tmp = (y / z) * (-0.3333333333333333d0)
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 <= -0.2) || !(y <= 1.65e+98)) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.2) or not (y <= 1.65e+98): tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.2) || !(y <= 1.65e+98)) tmp = Float64(Float64(y / z) * -0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -0.2) || ~((y <= 1.65e+98))) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.2], N[Not[LessEqual[y, 1.65e+98]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.2 \lor \neg \left(y \leq 1.65 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -0.20000000000000001 or 1.65000000000000014e98 < y Initial program 98.0%
+-commutative98.0%
associate-+r-98.0%
sub-neg98.0%
associate-*l*98.0%
*-commutative98.0%
distribute-frac-neg298.0%
distribute-rgt-neg-in98.0%
metadata-eval98.0%
Simplified98.0%
*-un-lft-identity98.0%
*-commutative98.0%
times-frac94.4%
Applied egg-rr94.4%
Taylor expanded in y around inf 68.8%
if -0.20000000000000001 < y < 1.65000000000000014e98Initial program 93.4%
sub-neg93.4%
associate-+l+93.4%
+-commutative93.4%
remove-double-neg93.4%
distribute-frac-neg93.4%
distribute-neg-in93.4%
remove-double-neg93.4%
sub-neg93.4%
neg-mul-193.4%
times-frac88.5%
distribute-frac-neg88.5%
neg-mul-188.5%
*-commutative88.5%
associate-/l*88.5%
*-commutative88.5%
Simplified89.0%
Taylor expanded in x around inf 41.1%
Final simplification52.6%
(FPCore (x y z t) :precision binary64 (- x (/ (/ y 3.0) z)))
double code(double x, double y, double z, double t) {
return x - ((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 - ((y / 3.0d0) / z)
end function
public static double code(double x, double y, double z, double t) {
return x - ((y / 3.0) / z);
}
def code(x, y, z, t): return x - ((y / 3.0) / z)
function code(x, y, z, t) return Float64(x - Float64(Float64(y / 3.0) / z)) end
function tmp = code(x, y, z, t) tmp = x - ((y / 3.0) / z); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{\frac{y}{3}}{z}
\end{array}
Initial program 95.3%
Taylor expanded in t around 0 65.9%
metadata-eval65.9%
times-frac66.0%
*-un-lft-identity66.0%
associate-/r*66.0%
Applied egg-rr66.0%
(FPCore (x y z t) :precision binary64 (- x (* 0.3333333333333333 (/ y z))))
double code(double x, double y, double z, double t) {
return x - (0.3333333333333333 * (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 / z))
end function
public static double code(double x, double y, double z, double t) {
return x - (0.3333333333333333 * (y / z));
}
def code(x, y, z, t): return x - (0.3333333333333333 * (y / z))
function code(x, y, z, t) return Float64(x - Float64(0.3333333333333333 * Float64(y / z))) end
function tmp = code(x, y, z, t) tmp = x - (0.3333333333333333 * (y / z)); end
code[x_, y_, z_, t_] := N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - 0.3333333333333333 \cdot \frac{y}{z}
\end{array}
Initial program 95.3%
Taylor expanded in t around 0 65.9%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.3%
sub-neg95.3%
associate-+l+95.3%
+-commutative95.3%
remove-double-neg95.3%
distribute-frac-neg95.3%
distribute-neg-in95.3%
remove-double-neg95.3%
sub-neg95.3%
neg-mul-195.3%
times-frac92.8%
distribute-frac-neg92.8%
neg-mul-192.8%
*-commutative92.8%
associate-/l*92.8%
*-commutative92.8%
Simplified93.4%
Taylor expanded in x around inf 35.1%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024087
(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))))