
(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 14 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 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))
(t_2 (- y (/ t y))))
(if (<= t_1 (- INFINITY))
(+ x (* (/ -0.3333333333333333 z) t_2))
(if (<= t_1 5e+307)
(+ (+ x (/ t (* z (* y 3.0)))) (* (/ 1.0 z) (/ y -3.0)))
(+ x (* t_2 (/ 1.0 (/ z -0.3333333333333333))))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double t_2 = y - (t / y);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + ((-0.3333333333333333 / z) * t_2);
} else if (t_1 <= 5e+307) {
tmp = (x + (t / (z * (y * 3.0)))) + ((1.0 / z) * (y / -3.0));
} else {
tmp = x + (t_2 * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double t_2 = y - (t / y);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((-0.3333333333333333 / z) * t_2);
} else if (t_1 <= 5e+307) {
tmp = (x + (t / (z * (y * 3.0)))) + ((1.0 / z) * (y / -3.0));
} else {
tmp = x + (t_2 * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) t_2 = y - (t / y) tmp = 0 if t_1 <= -math.inf: tmp = x + ((-0.3333333333333333 / z) * t_2) elif t_1 <= 5e+307: tmp = (x + (t / (z * (y * 3.0)))) + ((1.0 / z) * (y / -3.0)) else: tmp = x + (t_2 * (1.0 / (z / -0.3333333333333333))) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) t_2 = Float64(y - Float64(t / y)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * t_2)); elseif (t_1 <= 5e+307) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(Float64(1.0 / z) * Float64(y / -3.0))); else tmp = Float64(x + Float64(t_2 * Float64(1.0 / Float64(z / -0.3333333333333333)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); t_2 = y - (t / y); tmp = 0.0; if (t_1 <= -Inf) tmp = x + ((-0.3333333333333333 / z) * t_2); elseif (t_1 <= 5e+307) tmp = (x + (t / (z * (y * 3.0)))) + ((1.0 / z) * (y / -3.0)); else tmp = x + (t_2 * (1.0 / (z / -0.3333333333333333))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(1.0 / z), $MachinePrecision] * N[(y / -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$2 * N[(1.0 / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
t_2 := y - \frac{t}{y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{1}{z} \cdot \frac{y}{-3}\\
\mathbf{else}:\\
\;\;\;\;x + t\_2 \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < -inf.0Initial program 85.4%
sub-neg85.4%
associate-+l+85.4%
remove-double-neg85.4%
distribute-frac-neg85.4%
sub-neg85.4%
distribute-frac-neg85.4%
neg-mul-185.4%
*-commutative85.4%
associate-/l*85.4%
*-commutative85.4%
neg-mul-185.4%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
if -inf.0 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < 5e307Initial program 99.6%
+-commutative99.6%
associate-+r-99.6%
sub-neg99.6%
associate-*l*99.7%
*-commutative99.7%
distribute-frac-neg299.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
*-un-lft-identity99.7%
times-frac99.7%
Applied egg-rr99.7%
if 5e307 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 89.1%
sub-neg89.1%
associate-+l+89.1%
remove-double-neg89.1%
distribute-frac-neg89.1%
sub-neg89.1%
distribute-frac-neg89.1%
neg-mul-189.1%
*-commutative89.1%
associate-/l*89.1%
*-commutative89.1%
neg-mul-189.1%
times-frac97.7%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*99.9%
metadata-eval99.9%
Simplified99.9%
clear-num100.0%
inv-pow100.0%
Applied egg-rr100.0%
unpow-1100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0))))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+301)))
(+ x (* (/ -0.3333333333333333 z) (- y (/ t y))))
(+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+301)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+301)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+301): tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))) else: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+301)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+301))) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); else tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+301]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+301}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < -inf.0 or 2.00000000000000011e301 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 88.0%
sub-neg88.0%
associate-+l+88.0%
remove-double-neg88.0%
distribute-frac-neg88.0%
sub-neg88.0%
distribute-frac-neg88.0%
neg-mul-188.0%
*-commutative88.0%
associate-/l*88.0%
*-commutative88.0%
neg-mul-188.0%
times-frac98.7%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
if -inf.0 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < 2.00000000000000011e301Initial program 99.6%
+-commutative99.6%
associate-+r-99.6%
sub-neg99.6%
associate-*l*99.7%
*-commutative99.7%
distribute-frac-neg299.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(if (<= (* z 3.0) -5e-69)
(+ x (/ y (* z -3.0)))
(if (<= (* z 3.0) 5e+153)
(* (- (/ t y) y) (/ 0.3333333333333333 z))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -5e-69) {
tmp = x + (y / (z * -3.0));
} else if ((z * 3.0) <= 5e+153) {
tmp = ((t / y) - y) * (0.3333333333333333 / 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 ((z * 3.0d0) <= (-5d-69)) then
tmp = x + (y / (z * (-3.0d0)))
else if ((z * 3.0d0) <= 5d+153) then
tmp = ((t / y) - y) * (0.3333333333333333d0 / 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 ((z * 3.0) <= -5e-69) {
tmp = x + (y / (z * -3.0));
} else if ((z * 3.0) <= 5e+153) {
tmp = ((t / y) - y) * (0.3333333333333333 / z);
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -5e-69: tmp = x + (y / (z * -3.0)) elif (z * 3.0) <= 5e+153: tmp = ((t / y) - y) * (0.3333333333333333 / z) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -5e-69) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (Float64(z * 3.0) <= 5e+153) tmp = Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / 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 ((z * 3.0) <= -5e-69) tmp = x + (y / (z * -3.0)); elseif ((z * 3.0) <= 5e+153) tmp = ((t / y) - y) * (0.3333333333333333 / z); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -5e-69], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 5e+153], N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;z \cdot 3 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -5.00000000000000033e-69Initial program 98.5%
sub-neg98.5%
associate-+l+98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
sub-neg98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
neg-mul-198.4%
times-frac90.3%
distribute-lft-out--90.3%
*-commutative90.3%
associate-/r*90.3%
metadata-eval90.3%
Simplified90.3%
Taylor expanded in y around inf 76.1%
*-commutative76.1%
metadata-eval76.1%
times-frac76.2%
*-rgt-identity76.2%
Simplified76.2%
if -5.00000000000000033e-69 < (*.f64 z #s(literal 3 binary64)) < 5.00000000000000018e153Initial program 93.9%
Taylor expanded in z around 0 90.4%
Taylor expanded in t around 0 85.7%
+-commutative85.7%
*-commutative85.7%
*-commutative85.7%
metadata-eval85.7%
distribute-rgt-neg-in85.7%
distribute-lft-neg-in85.7%
distribute-rgt-out85.7%
sub-neg85.7%
associate-/r*89.7%
div-sub90.4%
associate-*r/90.4%
*-commutative90.4%
associate-/l*90.4%
Simplified90.4%
if 5.00000000000000018e153 < (*.f64 z #s(literal 3 binary64)) Initial 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 84.5%
metadata-eval84.5%
cancel-sign-sub-inv84.5%
associate-*r/84.7%
*-commutative84.7%
Simplified84.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.8e-118) (not (<= y 1.36e-73))) (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))) (+ x (* 0.3333333333333333 (/ (/ t z) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.8e-118) || !(y <= 1.36e-73)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} 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 <= (-3.8d-118)) .or. (.not. (y <= 1.36d-73))) then
tmp = x + (((-0.3333333333333333d0) / z) * (y - (t / y)))
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 <= -3.8e-118) || !(y <= 1.36e-73)) {
tmp = x + ((-0.3333333333333333 / z) * (y - (t / y)));
} else {
tmp = x + (0.3333333333333333 * ((t / z) / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.8e-118) or not (y <= 1.36e-73): tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))) else: tmp = x + (0.3333333333333333 * ((t / z) / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.8e-118) || !(y <= 1.36e-73)) tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))); else tmp = Float64(x + 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 <= -3.8e-118) || ~((y <= 1.36e-73))) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); else tmp = x + (0.3333333333333333 * ((t / z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.8e-118], N[Not[LessEqual[y, 1.36e-73]], $MachinePrecision]], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-118} \lor \neg \left(y \leq 1.36 \cdot 10^{-73}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -3.8000000000000001e-118 or 1.36e-73 < y Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
sub-neg98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
neg-mul-198.6%
times-frac98.5%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
if -3.8000000000000001e-118 < y < 1.36e-73Initial program 90.4%
sub-neg90.4%
associate-+l+90.4%
remove-double-neg90.4%
distribute-frac-neg90.4%
sub-neg90.4%
distribute-frac-neg90.4%
neg-mul-190.4%
*-commutative90.4%
associate-/l*90.4%
*-commutative90.4%
neg-mul-190.4%
times-frac83.8%
distribute-lft-out--83.8%
*-commutative83.8%
associate-/r*83.7%
metadata-eval83.7%
Simplified83.7%
Taylor expanded in y around 0 90.3%
*-un-lft-identity90.3%
*-commutative90.3%
Applied egg-rr90.3%
*-lft-identity90.3%
associate-/r*98.7%
Simplified98.7%
Final simplification99.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.222) (not (<= y 8.5e+50))) (+ x (/ y (* z -3.0))) (+ x (* 0.3333333333333333 (/ (/ t z) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.222) || !(y <= 8.5e+50)) {
tmp = x + (y / (z * -3.0));
} 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 <= (-0.222d0)) .or. (.not. (y <= 8.5d+50))) then
tmp = x + (y / (z * (-3.0d0)))
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 <= -0.222) || !(y <= 8.5e+50)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * ((t / z) / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.222) or not (y <= 8.5e+50): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 * ((t / z) / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.222) || !(y <= 8.5e+50)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + 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 <= -0.222) || ~((y <= 8.5e+50))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 * ((t / z) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.222], N[Not[LessEqual[y, 8.5e+50]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.222 \lor \neg \left(y \leq 8.5 \cdot 10^{+50}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -0.222000000000000003 or 8.49999999999999961e50 < y 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.6%
*-commutative99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 96.7%
*-commutative96.7%
metadata-eval96.7%
times-frac96.8%
*-rgt-identity96.8%
Simplified96.8%
if -0.222000000000000003 < y < 8.49999999999999961e50Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.2%
*-commutative92.2%
neg-mul-192.2%
times-frac87.9%
distribute-lft-out--88.7%
*-commutative88.7%
associate-/r*88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in y around 0 88.3%
*-un-lft-identity88.3%
*-commutative88.3%
Applied egg-rr88.3%
*-lft-identity88.3%
associate-/r*94.3%
Simplified94.3%
Final simplification95.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.5e-55) (not (<= y 1.36e+66))) (+ x (/ y (* z -3.0))) (+ x (* 0.3333333333333333 (/ t (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.5e-55) || !(y <= 1.36e+66)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (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.5d-55)) .or. (.not. (y <= 1.36d+66))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = x + (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.5e-55) || !(y <= 1.36e+66)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.5e-55) or not (y <= 1.36e+66): tmp = x + (y / (z * -3.0)) else: tmp = x + (0.3333333333333333 * (t / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.5e-55) || !(y <= 1.36e+66)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + 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.5e-55) || ~((y <= 1.36e+66))) tmp = x + (y / (z * -3.0)); else tmp = x + (0.3333333333333333 * (t / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.5e-55], N[Not[LessEqual[y, 1.36e+66]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{-55} \lor \neg \left(y \leq 1.36 \cdot 10^{+66}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -2.5000000000000001e-55 or 1.36e66 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
neg-mul-199.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 94.9%
*-commutative94.9%
metadata-eval94.9%
times-frac95.0%
*-rgt-identity95.0%
Simplified95.0%
if -2.5000000000000001e-55 < y < 1.36e66Initial program 92.3%
sub-neg92.3%
associate-+l+92.3%
remove-double-neg92.3%
distribute-frac-neg92.3%
sub-neg92.3%
distribute-frac-neg92.3%
neg-mul-192.3%
*-commutative92.3%
associate-/l*92.3%
*-commutative92.3%
neg-mul-192.3%
times-frac86.9%
distribute-lft-out--87.8%
*-commutative87.8%
associate-/r*87.7%
metadata-eval87.7%
Simplified87.7%
Taylor expanded in y around 0 90.1%
Final simplification92.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -0.0007)
(+ x (* (* y 0.3333333333333333) (/ -1.0 z)))
(if (<= y 2.5e+53)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.0007) {
tmp = x + ((y * 0.3333333333333333) * (-1.0 / z));
} else if (y <= 2.5e+53) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} 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 (y <= (-0.0007d0)) then
tmp = x + ((y * 0.3333333333333333d0) * ((-1.0d0) / z))
else if (y <= 2.5d+53) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
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 (y <= -0.0007) {
tmp = x + ((y * 0.3333333333333333) * (-1.0 / z));
} else if (y <= 2.5e+53) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.0007: tmp = x + ((y * 0.3333333333333333) * (-1.0 / z)) elif y <= 2.5e+53: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.0007) tmp = Float64(x + Float64(Float64(y * 0.3333333333333333) * Float64(-1.0 / z))); elseif (y <= 2.5e+53) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); 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 (y <= -0.0007) tmp = x + ((y * 0.3333333333333333) * (-1.0 / z)); elseif (y <= 2.5e+53) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.0007], N[(x + N[(N[(y * 0.3333333333333333), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+53], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0007:\\
\;\;\;\;x + \left(y \cdot 0.3333333333333333\right) \cdot \frac{-1}{z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+53}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -6.99999999999999993e-4Initial program 99.7%
Taylor expanded in t around 0 97.0%
associate-*r/97.1%
clear-num97.1%
Applied egg-rr97.1%
associate-/r/97.2%
*-commutative97.2%
Simplified97.2%
if -6.99999999999999993e-4 < y < 2.5000000000000002e53Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.2%
*-commutative92.2%
neg-mul-192.2%
times-frac87.9%
distribute-lft-out--88.7%
*-commutative88.7%
associate-/r*88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in y around 0 88.3%
*-un-lft-identity88.3%
*-commutative88.3%
Applied egg-rr88.3%
*-lft-identity88.3%
associate-/r*94.3%
Simplified94.3%
if 2.5000000000000002e53 < y 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.6%
*-commutative99.6%
neg-mul-199.6%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 96.2%
*-commutative96.2%
metadata-eval96.2%
times-frac96.4%
*-rgt-identity96.4%
Simplified96.4%
Final simplification95.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9e-58) (not (<= y 2.95e+48))) (+ x (/ y (* z -3.0))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e-58) || !(y <= 2.95e+48)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-9d-58)) .or. (.not. (y <= 2.95d+48))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9e-58) || !(y <= 2.95e+48)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9e-58) or not (y <= 2.95e+48): tmp = x + (y / (z * -3.0)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9e-58) || !(y <= 2.95e+48)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9e-58) || ~((y <= 2.95e+48))) tmp = x + (y / (z * -3.0)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9e-58], N[Not[LessEqual[y, 2.95e+48]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{-58} \lor \neg \left(y \leq 2.95 \cdot 10^{+48}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -9.0000000000000006e-58 or 2.95000000000000025e48 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
neg-mul-199.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 94.3%
*-commutative94.3%
metadata-eval94.3%
times-frac94.4%
*-rgt-identity94.4%
Simplified94.4%
if -9.0000000000000006e-58 < y < 2.95000000000000025e48Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.2%
*-commutative92.2%
neg-mul-192.2%
times-frac86.7%
distribute-lft-out--87.6%
*-commutative87.6%
associate-/r*87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in y around 0 90.8%
Taylor expanded in x around 0 59.3%
associate-*r/59.2%
*-commutative59.2%
*-commutative59.2%
times-frac64.4%
Simplified64.4%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.5e-56) (not (<= y 2.95e+48))) (+ x (* y (/ -0.3333333333333333 z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-56) || !(y <= 2.95e+48)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.5d-56)) .or. (.not. (y <= 2.95d+48))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-56) || !(y <= 2.95e+48)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.5e-56) or not (y <= 2.95e+48): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.5e-56) || !(y <= 2.95e+48)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.5e-56) || ~((y <= 2.95e+48))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.5e-56], N[Not[LessEqual[y, 2.95e+48]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-56} \lor \neg \left(y \leq 2.95 \cdot 10^{+48}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -3.4999999999999998e-56 or 2.95000000000000025e48 < y Initial program 99.1%
sub-neg99.1%
associate-+l+99.1%
remove-double-neg99.1%
distribute-frac-neg99.1%
sub-neg99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.0%
*-commutative99.0%
neg-mul-199.0%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 94.3%
if -3.4999999999999998e-56 < y < 2.95000000000000025e48Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.2%
*-commutative92.2%
neg-mul-192.2%
times-frac86.7%
distribute-lft-out--87.6%
*-commutative87.6%
associate-/r*87.5%
metadata-eval87.5%
Simplified87.5%
Taylor expanded in y around 0 90.8%
Taylor expanded in x around 0 59.3%
associate-*r/59.2%
*-commutative59.2%
*-commutative59.2%
times-frac64.4%
Simplified64.4%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.0002) (not (<= y 2.95e+48))) (/ (* y -0.3333333333333333) z) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.0002) || !(y <= 2.95e+48)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-0.0002d0)) .or. (.not. (y <= 2.95d+48))) then
tmp = (y * (-0.3333333333333333d0)) / z
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.0002) || !(y <= 2.95e+48)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.0002) or not (y <= 2.95e+48): tmp = (y * -0.3333333333333333) / z else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.0002) || !(y <= 2.95e+48)) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -0.0002) || ~((y <= 2.95e+48))) tmp = (y * -0.3333333333333333) / z; else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.0002], N[Not[LessEqual[y, 2.95e+48]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0002 \lor \neg \left(y \leq 2.95 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2.0000000000000001e-4 or 2.95000000000000025e48 < y Initial program 99.8%
Taylor expanded in z around 0 80.2%
Taylor expanded in t around 0 77.2%
if -2.0000000000000001e-4 < y < 2.95000000000000025e48Initial program 92.2%
sub-neg92.2%
associate-+l+92.2%
remove-double-neg92.2%
distribute-frac-neg92.2%
sub-neg92.2%
distribute-frac-neg92.2%
neg-mul-192.2%
*-commutative92.2%
associate-/l*92.2%
*-commutative92.2%
neg-mul-192.2%
times-frac87.9%
distribute-lft-out--88.7%
*-commutative88.7%
associate-/r*88.7%
metadata-eval88.7%
Simplified88.7%
Taylor expanded in y around 0 88.3%
Taylor expanded in x around 0 56.7%
associate-*r/56.6%
*-commutative56.6%
*-commutative56.6%
times-frac61.2%
Simplified61.2%
Final simplification69.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.52) (not (<= y 2.55e+64))) (/ (* y -0.3333333333333333) z) (* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.52) || !(y <= 2.55e+64)) {
tmp = (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 <= (-0.52d0)) .or. (.not. (y <= 2.55d+64))) then
tmp = (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 <= -0.52) || !(y <= 2.55e+64)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.52) or not (y <= 2.55e+64): tmp = (y * -0.3333333333333333) / z else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.52) || !(y <= 2.55e+64)) tmp = 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 <= -0.52) || ~((y <= 2.55e+64))) tmp = (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, -0.52], N[Not[LessEqual[y, 2.55e+64]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.52 \lor \neg \left(y \leq 2.55 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -0.52000000000000002 or 2.55000000000000012e64 < y Initial program 99.8%
Taylor expanded in z around 0 79.9%
Taylor expanded in t around 0 77.7%
if -0.52000000000000002 < y < 2.55000000000000012e64Initial program 92.3%
sub-neg92.3%
associate-+l+92.3%
remove-double-neg92.3%
distribute-frac-neg92.3%
sub-neg92.3%
distribute-frac-neg92.3%
neg-mul-192.3%
*-commutative92.3%
associate-/l*92.3%
*-commutative92.3%
neg-mul-192.3%
times-frac88.1%
distribute-lft-out--88.9%
*-commutative88.9%
associate-/r*88.9%
metadata-eval88.9%
Simplified88.9%
Taylor expanded in y around 0 87.7%
Taylor expanded in x around 0 56.6%
Final simplification67.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8.5e+40) (not (<= y 1.38e+41))) (/ (* y -0.3333333333333333) z) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8.5e+40) || !(y <= 1.38e+41)) {
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 <= (-8.5d+40)) .or. (.not. (y <= 1.38d+41))) 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 <= -8.5e+40) || !(y <= 1.38e+41)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8.5e+40) or not (y <= 1.38e+41): tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8.5e+40) || !(y <= 1.38e+41)) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8.5e+40) || ~((y <= 1.38e+41))) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8.5e+40], N[Not[LessEqual[y, 1.38e+41]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+40} \lor \neg \left(y \leq 1.38 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.49999999999999996e40 or 1.3800000000000001e41 < y Initial program 99.7%
Taylor expanded in z around 0 82.4%
Taylor expanded in t around 0 77.8%
if -8.49999999999999996e40 < y < 1.3800000000000001e41Initial program 92.6%
sub-neg92.6%
associate-+l+92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
times-frac92.5%
fma-define92.5%
metadata-eval92.5%
associate-*l*92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in x around inf 37.0%
Final simplification56.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2e+41) (not (<= y 1e+91))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e+41) || !(y <= 1e+91)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2d+41)) .or. (.not. (y <= 1d+91))) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e+41) || !(y <= 1e+91)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2e+41) or not (y <= 1e+91): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2e+41) || !(y <= 1e+91)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2e+41) || ~((y <= 1e+91))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2e+41], N[Not[LessEqual[y, 1e+91]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+41} \lor \neg \left(y \leq 10^{+91}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.00000000000000001e41 or 1.00000000000000008e91 < y Initial program 99.8%
Taylor expanded in z around 0 84.1%
Taylor expanded in t around 0 81.6%
if -2.00000000000000001e41 < y < 1.00000000000000008e91Initial program 93.1%
sub-neg93.1%
associate-+l+93.1%
distribute-frac-neg93.1%
neg-mul-193.1%
*-commutative93.1%
times-frac93.1%
fma-define93.1%
metadata-eval93.1%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in x around inf 37.1%
Final simplification56.7%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
distribute-frac-neg96.0%
neg-mul-196.0%
*-commutative96.0%
times-frac96.0%
fma-define96.0%
metadata-eval96.0%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in x around inf 28.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 2024191
(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))))