
(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
(if (<= (* z 3.0) -5e-78)
(+ x (fma -0.3333333333333333 (/ y z) (/ (/ (/ t z) y) 3.0)))
(if (<= (* z 3.0) 1e-42)
(+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -5e-78) {
tmp = x + fma(-0.3333333333333333, (y / z), (((t / z) / y) / 3.0));
} else if ((z * 3.0) <= 1e-42) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -5e-78) tmp = Float64(x + fma(-0.3333333333333333, Float64(y / z), Float64(Float64(Float64(t / z) / y) / 3.0))); elseif (Float64(z * 3.0) <= 1e-42) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z)); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -5e-78], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision] + N[(N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-42], N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{-78}:\\
\;\;\;\;x + \mathsf{fma}\left(-0.3333333333333333, \frac{y}{z}, \frac{\frac{\frac{t}{z}}{y}}{3}\right)\\
\mathbf{elif}\;z \cdot 3 \leq 10^{-42}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < -4.9999999999999996e-78Initial program 98.3%
associate-+l-98.3%
sub-neg98.3%
sub-neg98.3%
distribute-neg-in98.3%
distribute-neg-frac98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.4%
remove-double-neg98.4%
fma-def98.4%
metadata-eval98.4%
associate-*l*98.4%
associate-/r*98.4%
associate-/l/98.6%
Simplified98.6%
if -4.9999999999999996e-78 < (*.f64 z 3) < 1.00000000000000004e-42Initial program 89.6%
associate-+l-89.6%
sub-neg89.6%
sub-neg89.6%
distribute-neg-in89.6%
unsub-neg89.6%
neg-mul-189.6%
associate-*r/89.6%
associate-*l/89.7%
distribute-neg-frac89.7%
neg-mul-189.7%
times-frac97.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 89.6%
+-commutative89.6%
metadata-eval89.6%
cancel-sign-sub-inv89.6%
associate-/r*97.8%
associate-*r/97.9%
associate-*r/97.9%
div-sub99.9%
distribute-lft-out--99.9%
Simplified99.9%
if 1.00000000000000004e-42 < (*.f64 z 3) Initial program 99.9%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -2e-12) (not (<= (* z 3.0) 1e-42))) (+ (- x (/ y (* z 3.0))) (/ t (* 3.0 (* z y)))) (+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -2e-12) || !((z * 3.0) <= 1e-42)) {
tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (z * y)));
} else {
tmp = x + ((0.3333333333333333 * ((t / y) - 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 (((z * 3.0d0) <= (-2d-12)) .or. (.not. ((z * 3.0d0) <= 1d-42))) then
tmp = (x - (y / (z * 3.0d0))) + (t / (3.0d0 * (z * y)))
else
tmp = x + ((0.3333333333333333d0 * ((t / y) - y)) / 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) <= -2e-12) || !((z * 3.0) <= 1e-42)) {
tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (z * y)));
} else {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -2e-12) or not ((z * 3.0) <= 1e-42): tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (z * y))) else: tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -2e-12) || !(Float64(z * 3.0) <= 1e-42)) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(3.0 * Float64(z * y)))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -2e-12) || ~(((z * 3.0) <= 1e-42))) tmp = (x - (y / (z * 3.0))) + (t / (3.0 * (z * y))); else tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -2e-12], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-42]], $MachinePrecision]], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-12} \lor \neg \left(z \cdot 3 \leq 10^{-42}\right):\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{3 \cdot \left(z \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.99999999999999996e-12 or 1.00000000000000004e-42 < (*.f64 z 3) Initial program 99.1%
Taylor expanded in z around 0 99.1%
if -1.99999999999999996e-12 < (*.f64 z 3) < 1.00000000000000004e-42Initial program 90.7%
associate-+l-90.7%
sub-neg90.7%
sub-neg90.7%
distribute-neg-in90.7%
unsub-neg90.7%
neg-mul-190.7%
associate-*r/90.7%
associate-*l/90.7%
distribute-neg-frac90.7%
neg-mul-190.7%
times-frac98.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 90.7%
+-commutative90.7%
metadata-eval90.7%
cancel-sign-sub-inv90.7%
associate-/r*98.0%
associate-*r/98.1%
associate-*r/98.1%
div-sub99.9%
distribute-lft-out--99.9%
Simplified99.9%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= (* z 3.0) -2e-12)
(+ t_1 (/ t (* 3.0 (* z y))))
(if (<= (* z 3.0) 1e-42)
(+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z))
(+ t_1 (/ t (* (* z 3.0) y)))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -2e-12) {
tmp = t_1 + (t / (3.0 * (z * y)));
} else if ((z * 3.0) <= 1e-42) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
} else {
tmp = t_1 + (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 = x - (y / (z * 3.0d0))
if ((z * 3.0d0) <= (-2d-12)) then
tmp = t_1 + (t / (3.0d0 * (z * y)))
else if ((z * 3.0d0) <= 1d-42) then
tmp = x + ((0.3333333333333333d0 * ((t / y) - y)) / z)
else
tmp = t_1 + (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 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -2e-12) {
tmp = t_1 + (t / (3.0 * (z * y)));
} else if ((z * 3.0) <= 1e-42) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
} else {
tmp = t_1 + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if (z * 3.0) <= -2e-12: tmp = t_1 + (t / (3.0 * (z * y))) elif (z * 3.0) <= 1e-42: tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z) else: tmp = t_1 + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (Float64(z * 3.0) <= -2e-12) tmp = Float64(t_1 + Float64(t / Float64(3.0 * Float64(z * y)))); elseif (Float64(z * 3.0) <= 1e-42) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z)); else tmp = Float64(t_1 + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if ((z * 3.0) <= -2e-12) tmp = t_1 + (t / (3.0 * (z * y))); elseif ((z * 3.0) <= 1e-42) tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); else tmp = t_1 + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e-12], N[(t$95$1 + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-42], N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-12}:\\
\;\;\;\;t_1 + \frac{t}{3 \cdot \left(z \cdot y\right)}\\
\mathbf{elif}\;z \cdot 3 \leq 10^{-42}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1.99999999999999996e-12Initial program 98.1%
Taylor expanded in z around 0 98.2%
if -1.99999999999999996e-12 < (*.f64 z 3) < 1.00000000000000004e-42Initial program 90.7%
associate-+l-90.7%
sub-neg90.7%
sub-neg90.7%
distribute-neg-in90.7%
unsub-neg90.7%
neg-mul-190.7%
associate-*r/90.7%
associate-*l/90.7%
distribute-neg-frac90.7%
neg-mul-190.7%
times-frac98.0%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 90.7%
+-commutative90.7%
metadata-eval90.7%
cancel-sign-sub-inv90.7%
associate-/r*98.0%
associate-*r/98.1%
associate-*r/98.1%
div-sub99.9%
distribute-lft-out--99.9%
Simplified99.9%
if 1.00000000000000004e-42 < (*.f64 z 3) Initial program 99.9%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= (* z 3.0) -4e+49)
(+ t_1 (/ (/ t (* z 3.0)) y))
(if (<= (* z 3.0) 1e-42)
(+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z))
(+ t_1 (/ t (* (* z 3.0) y)))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -4e+49) {
tmp = t_1 + ((t / (z * 3.0)) / y);
} else if ((z * 3.0) <= 1e-42) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
} else {
tmp = t_1 + (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 = x - (y / (z * 3.0d0))
if ((z * 3.0d0) <= (-4d+49)) then
tmp = t_1 + ((t / (z * 3.0d0)) / y)
else if ((z * 3.0d0) <= 1d-42) then
tmp = x + ((0.3333333333333333d0 * ((t / y) - y)) / z)
else
tmp = t_1 + (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 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -4e+49) {
tmp = t_1 + ((t / (z * 3.0)) / y);
} else if ((z * 3.0) <= 1e-42) {
tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z);
} else {
tmp = t_1 + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if (z * 3.0) <= -4e+49: tmp = t_1 + ((t / (z * 3.0)) / y) elif (z * 3.0) <= 1e-42: tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z) else: tmp = t_1 + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (Float64(z * 3.0) <= -4e+49) tmp = Float64(t_1 + Float64(Float64(t / Float64(z * 3.0)) / y)); elseif (Float64(z * 3.0) <= 1e-42) tmp = Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z)); else tmp = Float64(t_1 + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if ((z * 3.0) <= -4e+49) tmp = t_1 + ((t / (z * 3.0)) / y); elseif ((z * 3.0) <= 1e-42) tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); else tmp = t_1 + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e+49], N[(t$95$1 + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e-42], N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{+49}:\\
\;\;\;\;t_1 + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{elif}\;z \cdot 3 \leq 10^{-42}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1 + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < -3.99999999999999979e49Initial program 97.8%
associate-/r*98.0%
Simplified98.0%
if -3.99999999999999979e49 < (*.f64 z 3) < 1.00000000000000004e-42Initial program 91.4%
associate-+l-91.4%
sub-neg91.4%
sub-neg91.4%
distribute-neg-in91.4%
unsub-neg91.4%
neg-mul-191.4%
associate-*r/91.4%
associate-*l/91.4%
distribute-neg-frac91.4%
neg-mul-191.4%
times-frac98.1%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 91.4%
+-commutative91.4%
metadata-eval91.4%
cancel-sign-sub-inv91.4%
associate-/r*98.2%
associate-*r/98.2%
associate-*r/98.2%
div-sub99.8%
distribute-lft-out--99.8%
Simplified99.8%
if 1.00000000000000004e-42 < (*.f64 z 3) Initial program 99.9%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y))))
(t_2 (+ x (* y (/ -0.3333333333333333 z)))))
(if (<= y -3.5e-6)
t_2
(if (<= y -5.4e-126)
t_1
(if (<= y -8.5e-168)
x
(if (<= y -3.8e-305)
(* 0.3333333333333333 (/ (/ t y) z))
(if (<= y 1.9e-68) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double t_2 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.5e-6) {
tmp = t_2;
} else if (y <= -5.4e-126) {
tmp = t_1;
} else if (y <= -8.5e-168) {
tmp = x;
} else if (y <= -3.8e-305) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 1.9e-68) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
t_2 = x + (y * ((-0.3333333333333333d0) / z))
if (y <= (-3.5d-6)) then
tmp = t_2
else if (y <= (-5.4d-126)) then
tmp = t_1
else if (y <= (-8.5d-168)) then
tmp = x
else if (y <= (-3.8d-305)) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else if (y <= 1.9d-68) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double t_2 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -3.5e-6) {
tmp = t_2;
} else if (y <= -5.4e-126) {
tmp = t_1;
} else if (y <= -8.5e-168) {
tmp = x;
} else if (y <= -3.8e-305) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 1.9e-68) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) t_2 = x + (y * (-0.3333333333333333 / z)) tmp = 0 if y <= -3.5e-6: tmp = t_2 elif y <= -5.4e-126: tmp = t_1 elif y <= -8.5e-168: tmp = x elif y <= -3.8e-305: tmp = 0.3333333333333333 * ((t / y) / z) elif y <= 1.9e-68: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) t_2 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) tmp = 0.0 if (y <= -3.5e-6) tmp = t_2; elseif (y <= -5.4e-126) tmp = t_1; elseif (y <= -8.5e-168) tmp = x; elseif (y <= -3.8e-305) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); elseif (y <= 1.9e-68) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); t_2 = x + (y * (-0.3333333333333333 / z)); tmp = 0.0; if (y <= -3.5e-6) tmp = t_2; elseif (y <= -5.4e-126) tmp = t_1; elseif (y <= -8.5e-168) tmp = x; elseif (y <= -3.8e-305) tmp = 0.3333333333333333 * ((t / y) / z); elseif (y <= 1.9e-68) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e-6], t$95$2, If[LessEqual[y, -5.4e-126], t$95$1, If[LessEqual[y, -8.5e-168], x, If[LessEqual[y, -3.8e-305], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-68], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
t_2 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.5 \cdot 10^{-168}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-305}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.49999999999999995e-6 or 1.90000000000000019e-68 < y Initial program 97.7%
associate-+l-97.7%
sub-neg97.7%
sub-neg97.7%
distribute-neg-in97.7%
unsub-neg97.7%
neg-mul-197.7%
associate-*r/97.7%
associate-*l/97.7%
distribute-neg-frac97.7%
neg-mul-197.7%
times-frac97.7%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around inf 86.9%
if -3.49999999999999995e-6 < y < -5.39999999999999991e-126 or -3.8e-305 < y < 1.90000000000000019e-68Initial program 96.8%
Taylor expanded in z around 0 63.3%
associate-*r/63.3%
Applied egg-rr63.3%
Taylor expanded in t around inf 68.1%
if -5.39999999999999991e-126 < y < -8.4999999999999994e-168Initial program 83.3%
associate-+l-83.3%
sub-neg83.3%
sub-neg83.3%
distribute-neg-in83.3%
unsub-neg83.3%
neg-mul-183.3%
associate-*r/83.3%
associate-*l/83.3%
distribute-neg-frac83.3%
neg-mul-183.3%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 83.4%
if -8.4999999999999994e-168 < y < -3.8e-305Initial program 82.4%
Taylor expanded in z around 0 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
Taylor expanded in t around inf 69.3%
associate-/r*81.2%
Simplified81.2%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y))))
(t_2 (+ x (/ (* -0.3333333333333333 y) z))))
(if (<= y -2.6e-6)
t_2
(if (<= y -5e-126)
t_1
(if (<= y -2.2e-167)
x
(if (<= y -8e-303)
(* 0.3333333333333333 (/ (/ t y) z))
(if (<= y 6.5e-65) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double t_2 = x + ((-0.3333333333333333 * y) / z);
double tmp;
if (y <= -2.6e-6) {
tmp = t_2;
} else if (y <= -5e-126) {
tmp = t_1;
} else if (y <= -2.2e-167) {
tmp = x;
} else if (y <= -8e-303) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 6.5e-65) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
t_2 = x + (((-0.3333333333333333d0) * y) / z)
if (y <= (-2.6d-6)) then
tmp = t_2
else if (y <= (-5d-126)) then
tmp = t_1
else if (y <= (-2.2d-167)) then
tmp = x
else if (y <= (-8d-303)) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else if (y <= 6.5d-65) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double t_2 = x + ((-0.3333333333333333 * y) / z);
double tmp;
if (y <= -2.6e-6) {
tmp = t_2;
} else if (y <= -5e-126) {
tmp = t_1;
} else if (y <= -2.2e-167) {
tmp = x;
} else if (y <= -8e-303) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 6.5e-65) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) t_2 = x + ((-0.3333333333333333 * y) / z) tmp = 0 if y <= -2.6e-6: tmp = t_2 elif y <= -5e-126: tmp = t_1 elif y <= -2.2e-167: tmp = x elif y <= -8e-303: tmp = 0.3333333333333333 * ((t / y) / z) elif y <= 6.5e-65: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) t_2 = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)) tmp = 0.0 if (y <= -2.6e-6) tmp = t_2; elseif (y <= -5e-126) tmp = t_1; elseif (y <= -2.2e-167) tmp = x; elseif (y <= -8e-303) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); elseif (y <= 6.5e-65) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); t_2 = x + ((-0.3333333333333333 * y) / z); tmp = 0.0; if (y <= -2.6e-6) tmp = t_2; elseif (y <= -5e-126) tmp = t_1; elseif (y <= -2.2e-167) tmp = x; elseif (y <= -8e-303) tmp = 0.3333333333333333 * ((t / y) / z); elseif (y <= 6.5e-65) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e-6], t$95$2, If[LessEqual[y, -5e-126], t$95$1, If[LessEqual[y, -2.2e-167], x, If[LessEqual[y, -8e-303], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e-65], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
t_2 := x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{-167}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-303}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.60000000000000009e-6 or 6.5e-65 < y Initial program 97.7%
associate-+l-97.7%
sub-neg97.7%
sub-neg97.7%
distribute-neg-in97.7%
unsub-neg97.7%
neg-mul-197.7%
associate-*r/97.7%
associate-*l/97.7%
distribute-neg-frac97.7%
neg-mul-197.7%
times-frac97.7%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around inf 86.9%
associate-*l/87.0%
metadata-eval87.0%
distribute-lft-neg-in87.0%
*-commutative87.0%
distribute-rgt-neg-in87.0%
metadata-eval87.0%
Applied egg-rr87.0%
if -2.60000000000000009e-6 < y < -5.00000000000000006e-126 or -7.99999999999999944e-303 < y < 6.5e-65Initial program 96.8%
Taylor expanded in z around 0 63.3%
associate-*r/63.3%
Applied egg-rr63.3%
Taylor expanded in t around inf 68.1%
if -5.00000000000000006e-126 < y < -2.2e-167Initial program 83.3%
associate-+l-83.3%
sub-neg83.3%
sub-neg83.3%
distribute-neg-in83.3%
unsub-neg83.3%
neg-mul-183.3%
associate-*r/83.3%
associate-*l/83.3%
distribute-neg-frac83.3%
neg-mul-183.3%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 83.4%
if -2.2e-167 < y < -7.99999999999999944e-303Initial program 82.4%
Taylor expanded in z around 0 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
Taylor expanded in t around inf 69.3%
associate-/r*81.2%
Simplified81.2%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -2.6e-6)
(+ x (/ (* -0.3333333333333333 y) z))
(if (<= y -1.08e-126)
t_1
(if (<= y -9e-168)
x
(if (<= y 2.6e-307)
(* 0.3333333333333333 (/ (/ t y) z))
(if (<= y 4.6e-67) t_1 (- x (* (/ y z) 0.3333333333333333)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -2.6e-6) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= -1.08e-126) {
tmp = t_1;
} else if (y <= -9e-168) {
tmp = x;
} else if (y <= 2.6e-307) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 4.6e-67) {
tmp = t_1;
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
if (y <= (-2.6d-6)) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else if (y <= (-1.08d-126)) then
tmp = t_1
else if (y <= (-9d-168)) then
tmp = x
else if (y <= 2.6d-307) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else if (y <= 4.6d-67) then
tmp = t_1
else
tmp = x - ((y / z) * 0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -2.6e-6) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= -1.08e-126) {
tmp = t_1;
} else if (y <= -9e-168) {
tmp = x;
} else if (y <= 2.6e-307) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 4.6e-67) {
tmp = t_1;
} else {
tmp = x - ((y / z) * 0.3333333333333333);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -2.6e-6: tmp = x + ((-0.3333333333333333 * y) / z) elif y <= -1.08e-126: tmp = t_1 elif y <= -9e-168: tmp = x elif y <= 2.6e-307: tmp = 0.3333333333333333 * ((t / y) / z) elif y <= 4.6e-67: tmp = t_1 else: tmp = x - ((y / z) * 0.3333333333333333) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -2.6e-6) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); elseif (y <= -1.08e-126) tmp = t_1; elseif (y <= -9e-168) tmp = x; elseif (y <= 2.6e-307) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); elseif (y <= 4.6e-67) tmp = t_1; else tmp = Float64(x - Float64(Float64(y / z) * 0.3333333333333333)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -2.6e-6) tmp = x + ((-0.3333333333333333 * y) / z); elseif (y <= -1.08e-126) tmp = t_1; elseif (y <= -9e-168) tmp = x; elseif (y <= 2.6e-307) tmp = 0.3333333333333333 * ((t / y) / z); elseif (y <= 4.6e-67) tmp = t_1; else tmp = x - ((y / z) * 0.3333333333333333); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e-6], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.08e-126], t$95$1, If[LessEqual[y, -9e-168], x, If[LessEqual[y, 2.6e-307], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-67], t$95$1, N[(x - N[(N[(y / z), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{elif}\;y \leq -1.08 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-168}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-307}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z} \cdot 0.3333333333333333\\
\end{array}
\end{array}
if y < -2.60000000000000009e-6Initial program 98.3%
associate-+l-98.3%
sub-neg98.3%
sub-neg98.3%
distribute-neg-in98.3%
unsub-neg98.3%
neg-mul-198.3%
associate-*r/98.3%
associate-*l/98.3%
distribute-neg-frac98.3%
neg-mul-198.3%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 84.1%
associate-*l/84.2%
metadata-eval84.2%
distribute-lft-neg-in84.2%
*-commutative84.2%
distribute-rgt-neg-in84.2%
metadata-eval84.2%
Applied egg-rr84.2%
if -2.60000000000000009e-6 < y < -1.08e-126 or 2.59999999999999996e-307 < y < 4.6000000000000001e-67Initial program 96.8%
Taylor expanded in z around 0 63.3%
associate-*r/63.3%
Applied egg-rr63.3%
Taylor expanded in t around inf 68.1%
if -1.08e-126 < y < -9.0000000000000002e-168Initial program 83.3%
associate-+l-83.3%
sub-neg83.3%
sub-neg83.3%
distribute-neg-in83.3%
unsub-neg83.3%
neg-mul-183.3%
associate-*r/83.3%
associate-*l/83.3%
distribute-neg-frac83.3%
neg-mul-183.3%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 83.4%
if -9.0000000000000002e-168 < y < 2.59999999999999996e-307Initial program 82.4%
Taylor expanded in z around 0 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
Taylor expanded in t around inf 69.3%
associate-/r*81.2%
Simplified81.2%
if 4.6000000000000001e-67 < y Initial program 97.1%
Taylor expanded in t around 0 89.4%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -2.9e-6)
(+ x (/ (* -0.3333333333333333 y) z))
(if (<= y -6e-125)
t_1
(if (<= y -9.5e-167)
x
(if (<= y -1.2e-306)
(* 0.3333333333333333 (/ (/ t y) z))
(if (<= y 8e-68) t_1 (- x (/ y (* z 3.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -2.9e-6) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= -6e-125) {
tmp = t_1;
} else if (y <= -9.5e-167) {
tmp = x;
} else if (y <= -1.2e-306) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 8e-68) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
if (y <= (-2.9d-6)) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else if (y <= (-6d-125)) then
tmp = t_1
else if (y <= (-9.5d-167)) then
tmp = x
else if (y <= (-1.2d-306)) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else if (y <= 8d-68) then
tmp = t_1
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 t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -2.9e-6) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= -6e-125) {
tmp = t_1;
} else if (y <= -9.5e-167) {
tmp = x;
} else if (y <= -1.2e-306) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 8e-68) {
tmp = t_1;
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -2.9e-6: tmp = x + ((-0.3333333333333333 * y) / z) elif y <= -6e-125: tmp = t_1 elif y <= -9.5e-167: tmp = x elif y <= -1.2e-306: tmp = 0.3333333333333333 * ((t / y) / z) elif y <= 8e-68: tmp = t_1 else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -2.9e-6) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); elseif (y <= -6e-125) tmp = t_1; elseif (y <= -9.5e-167) tmp = x; elseif (y <= -1.2e-306) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); elseif (y <= 8e-68) tmp = t_1; else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -2.9e-6) tmp = x + ((-0.3333333333333333 * y) / z); elseif (y <= -6e-125) tmp = t_1; elseif (y <= -9.5e-167) tmp = x; elseif (y <= -1.2e-306) tmp = 0.3333333333333333 * ((t / y) / z); elseif (y <= 8e-68) tmp = t_1; else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e-6], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6e-125], t$95$1, If[LessEqual[y, -9.5e-167], x, If[LessEqual[y, -1.2e-306], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-68], t$95$1, N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{-6}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-167}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-306}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -2.9000000000000002e-6Initial program 98.3%
associate-+l-98.3%
sub-neg98.3%
sub-neg98.3%
distribute-neg-in98.3%
unsub-neg98.3%
neg-mul-198.3%
associate-*r/98.3%
associate-*l/98.3%
distribute-neg-frac98.3%
neg-mul-198.3%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 84.1%
associate-*l/84.2%
metadata-eval84.2%
distribute-lft-neg-in84.2%
*-commutative84.2%
distribute-rgt-neg-in84.2%
metadata-eval84.2%
Applied egg-rr84.2%
if -2.9000000000000002e-6 < y < -5.99999999999999981e-125 or -1.2e-306 < y < 8.00000000000000053e-68Initial program 96.8%
Taylor expanded in z around 0 63.3%
associate-*r/63.3%
Applied egg-rr63.3%
Taylor expanded in t around inf 68.1%
if -5.99999999999999981e-125 < y < -9.49999999999999955e-167Initial program 83.3%
associate-+l-83.3%
sub-neg83.3%
sub-neg83.3%
distribute-neg-in83.3%
unsub-neg83.3%
neg-mul-183.3%
associate-*r/83.3%
associate-*l/83.3%
distribute-neg-frac83.3%
neg-mul-183.3%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 83.4%
if -9.49999999999999955e-167 < y < -1.2e-306Initial program 82.4%
Taylor expanded in z around 0 81.1%
associate-*r/81.2%
Applied egg-rr81.2%
Taylor expanded in t around inf 69.3%
associate-/r*81.2%
Simplified81.2%
if 8.00000000000000053e-68 < y Initial program 97.1%
associate-+l-97.1%
sub-neg97.1%
sub-neg97.1%
distribute-neg-in97.1%
unsub-neg97.1%
neg-mul-197.1%
associate-*r/97.1%
associate-*l/97.1%
distribute-neg-frac97.1%
neg-mul-197.1%
times-frac95.9%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.5%
metadata-eval98.5%
Simplified98.5%
clear-num98.4%
inv-pow98.4%
Applied egg-rr98.4%
unpow-198.4%
Simplified98.4%
associate-*l/98.5%
*-un-lft-identity98.5%
frac-2neg98.5%
div-inv98.6%
distribute-rgt-neg-in98.6%
metadata-eval98.6%
metadata-eval98.6%
Applied egg-rr98.6%
Taylor expanded in y around inf 89.4%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.1e+67)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -16000.0)
(/ (* 0.3333333333333333 (- (/ t y) y)) z)
(if (<= y 1e+74) (+ x (/ (/ t (* z 3.0)) y)) (- x (/ y (* z 3.0)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e+67) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -16000.0) {
tmp = (0.3333333333333333 * ((t / y) - y)) / z;
} else if (y <= 1e+74) {
tmp = x + ((t / (z * 3.0)) / 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 <= (-3.1d+67)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-16000.0d0)) then
tmp = (0.3333333333333333d0 * ((t / y) - y)) / z
else if (y <= 1d+74) then
tmp = x + ((t / (z * 3.0d0)) / 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 <= -3.1e+67) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -16000.0) {
tmp = (0.3333333333333333 * ((t / y) - y)) / z;
} else if (y <= 1e+74) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e+67: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -16000.0: tmp = (0.3333333333333333 * ((t / y) - y)) / z elif y <= 1e+74: tmp = x + ((t / (z * 3.0)) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e+67) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -16000.0) tmp = Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z); elseif (y <= 1e+74) tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / 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 <= -3.1e+67) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -16000.0) tmp = (0.3333333333333333 * ((t / y) - y)) / z; elseif (y <= 1e+74) tmp = x + ((t / (z * 3.0)) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e+67], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -16000.0], N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1e+74], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+67}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -16000:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{elif}\;y \leq 10^{+74}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -3.09999999999999996e67Initial program 97.7%
associate-+l-97.7%
sub-neg97.7%
sub-neg97.7%
distribute-neg-in97.7%
unsub-neg97.7%
neg-mul-197.7%
associate-*r/97.7%
associate-*l/97.7%
distribute-neg-frac97.7%
neg-mul-197.7%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.2%
if -3.09999999999999996e67 < y < -16000Initial program 99.7%
Taylor expanded in z around 0 99.7%
distribute-lft-out--99.7%
*-commutative99.7%
Applied egg-rr99.7%
if -16000 < y < 9.99999999999999952e73Initial program 94.1%
associate-+l-94.1%
sub-neg94.1%
sub-neg94.1%
distribute-neg-in94.1%
unsub-neg94.1%
neg-mul-194.1%
associate-*r/94.1%
associate-*l/94.1%
distribute-neg-frac94.1%
neg-mul-194.1%
times-frac92.0%
distribute-lft-out--92.0%
*-commutative92.0%
associate-/r*92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in y around 0 89.5%
*-commutative89.5%
associate-*l/89.5%
times-frac87.4%
Simplified87.4%
associate-*l/93.1%
Applied egg-rr93.1%
clear-num93.1%
un-div-inv93.1%
div-inv93.2%
metadata-eval93.2%
Applied egg-rr93.2%
if 9.99999999999999952e73 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
sub-neg95.9%
distribute-neg-in95.9%
unsub-neg95.9%
neg-mul-195.9%
associate-*r/95.9%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac95.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
frac-2neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 97.9%
Final simplification94.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -270000000000.0)
(+ x (/ (* -0.3333333333333333 y) z))
(if (<= y 1.1e+74)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -270000000000.0) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= 1.1e+74) {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-270000000000.0d0)) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else if (y <= 1.1d+74) then
tmp = x + ((t / z) * (0.3333333333333333d0 / 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 <= -270000000000.0) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= 1.1e+74) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -270000000000.0: tmp = x + ((-0.3333333333333333 * y) / z) elif y <= 1.1e+74: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -270000000000.0) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); elseif (y <= 1.1e+74) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / 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 <= -270000000000.0) tmp = x + ((-0.3333333333333333 * y) / z); elseif (y <= 1.1e+74) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -270000000000.0], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+74], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / 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 -270000000000:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+74}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -2.7e11Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.2%
distribute-neg-frac98.2%
neg-mul-198.2%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 87.3%
associate-*l/87.3%
metadata-eval87.3%
distribute-lft-neg-in87.3%
*-commutative87.3%
distribute-rgt-neg-in87.3%
metadata-eval87.3%
Applied egg-rr87.3%
if -2.7e11 < y < 1.1000000000000001e74Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac92.1%
distribute-lft-out--92.1%
*-commutative92.1%
associate-/r*92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in y around 0 94.2%
+-commutative94.2%
metadata-eval94.2%
cancel-sign-sub-inv94.2%
associate-/r*92.2%
associate-*r/92.1%
associate-*r/92.2%
div-sub92.2%
distribute-lft-out--92.2%
Simplified92.2%
Taylor expanded in t around inf 89.6%
associate-*r/89.6%
times-frac93.2%
Simplified93.2%
if 1.1000000000000001e74 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
sub-neg95.9%
distribute-neg-in95.9%
unsub-neg95.9%
neg-mul-195.9%
associate-*r/95.9%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac95.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
frac-2neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 97.9%
Final simplification92.7%
(FPCore (x y z t) :precision binary64 (if (<= y -480000000000.0) (+ x (/ (* -0.3333333333333333 y) z)) (if (<= y 1e+74) (+ x (/ (/ t (* z 3.0)) y)) (- x (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -480000000000.0) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= 1e+74) {
tmp = x + ((t / (z * 3.0)) / 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 <= (-480000000000.0d0)) then
tmp = x + (((-0.3333333333333333d0) * y) / z)
else if (y <= 1d+74) then
tmp = x + ((t / (z * 3.0d0)) / 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 <= -480000000000.0) {
tmp = x + ((-0.3333333333333333 * y) / z);
} else if (y <= 1e+74) {
tmp = x + ((t / (z * 3.0)) / y);
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -480000000000.0: tmp = x + ((-0.3333333333333333 * y) / z) elif y <= 1e+74: tmp = x + ((t / (z * 3.0)) / y) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -480000000000.0) tmp = Float64(x + Float64(Float64(-0.3333333333333333 * y) / z)); elseif (y <= 1e+74) tmp = Float64(x + Float64(Float64(t / Float64(z * 3.0)) / 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 <= -480000000000.0) tmp = x + ((-0.3333333333333333 * y) / z); elseif (y <= 1e+74) tmp = x + ((t / (z * 3.0)) / y); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -480000000000.0], N[(x + N[(N[(-0.3333333333333333 * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+74], N[(x + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -480000000000:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot y}{z}\\
\mathbf{elif}\;y \leq 10^{+74}:\\
\;\;\;\;x + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -4.8e11Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.2%
distribute-neg-frac98.2%
neg-mul-198.2%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 87.3%
associate-*l/87.3%
metadata-eval87.3%
distribute-lft-neg-in87.3%
*-commutative87.3%
distribute-rgt-neg-in87.3%
metadata-eval87.3%
Applied egg-rr87.3%
if -4.8e11 < y < 9.99999999999999952e73Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac92.1%
distribute-lft-out--92.1%
*-commutative92.1%
associate-/r*92.1%
metadata-eval92.1%
Simplified92.1%
Taylor expanded in y around 0 89.6%
*-commutative89.6%
associate-*l/89.6%
times-frac87.6%
Simplified87.6%
associate-*l/93.1%
Applied egg-rr93.1%
clear-num93.1%
un-div-inv93.2%
div-inv93.2%
metadata-eval93.2%
Applied egg-rr93.2%
if 9.99999999999999952e73 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
sub-neg95.9%
distribute-neg-in95.9%
unsub-neg95.9%
neg-mul-195.9%
associate-*r/95.9%
associate-*l/95.8%
distribute-neg-frac95.8%
neg-mul-195.8%
times-frac95.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*l/99.8%
*-un-lft-identity99.8%
frac-2neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 97.9%
Final simplification92.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z))))
(if (<= y -21000000000.0)
t_1
(if (<= y 4.8e-67)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 3e+134) x t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -21000000000.0) {
tmp = t_1;
} else if (y <= 4.8e-67) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 3e+134) {
tmp = x;
} 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 = (-0.3333333333333333d0) * (y / z)
if (y <= (-21000000000.0d0)) then
tmp = t_1
else if (y <= 4.8d-67) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 3d+134) then
tmp = x
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 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -21000000000.0) {
tmp = t_1;
} else if (y <= 4.8e-67) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 3e+134) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) tmp = 0 if y <= -21000000000.0: tmp = t_1 elif y <= 4.8e-67: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 3e+134: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) tmp = 0.0 if (y <= -21000000000.0) tmp = t_1; elseif (y <= 4.8e-67) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 3e+134) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); tmp = 0.0; if (y <= -21000000000.0) tmp = t_1; elseif (y <= 4.8e-67) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 3e+134) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -21000000000.0], t$95$1, If[LessEqual[y, 4.8e-67], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+134], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -21000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-67}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+134}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.1e10 or 2.99999999999999997e134 < y Initial program 96.8%
Taylor expanded in z around 0 76.9%
associate-*r/77.0%
Applied egg-rr77.0%
Taylor expanded in t around 0 68.4%
if -2.1e10 < y < 4.8e-67Initial program 93.1%
Taylor expanded in z around 0 65.3%
associate-*r/65.3%
Applied egg-rr65.3%
Taylor expanded in t around inf 65.0%
if 4.8e-67 < y < 2.99999999999999997e134Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac97.2%
distribute-lft-out--97.2%
*-commutative97.2%
associate-/r*97.0%
metadata-eval97.0%
Simplified97.0%
Taylor expanded in x around inf 51.4%
Final simplification64.5%
(FPCore (x y z t) :precision binary64 (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y - (t / 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 + (((-0.3333333333333333d0) / z) * (y - (t / y)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
def code(x, y, z, t): return x + ((-0.3333333333333333 / z) * (y - (t / y)))
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)
\end{array}
Initial program 95.4%
associate-+l-95.4%
sub-neg95.4%
sub-neg95.4%
distribute-neg-in95.4%
unsub-neg95.4%
neg-mul-195.4%
associate-*r/95.4%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.6%
distribute-lft-out--95.4%
*-commutative95.4%
associate-/r*95.4%
metadata-eval95.4%
Simplified95.4%
Final simplification95.4%
(FPCore (x y z t) :precision binary64 (+ x (/ (* 0.3333333333333333 (- (/ t y) y)) z)))
double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 * ((t / y) - 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 * ((t / y) - y)) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + ((0.3333333333333333 * ((t / y) - y)) / z);
}
def code(x, y, z, t): return x + ((0.3333333333333333 * ((t / y) - y)) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z)) end
function tmp = code(x, y, z, t) tmp = x + ((0.3333333333333333 * ((t / y) - y)) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}
\end{array}
Initial program 95.4%
associate-+l-95.4%
sub-neg95.4%
sub-neg95.4%
distribute-neg-in95.4%
unsub-neg95.4%
neg-mul-195.4%
associate-*r/95.4%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.6%
distribute-lft-out--95.4%
*-commutative95.4%
associate-/r*95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in y around 0 95.4%
+-commutative95.4%
metadata-eval95.4%
cancel-sign-sub-inv95.4%
associate-/r*94.6%
associate-*r/94.6%
associate-*r/94.6%
div-sub95.4%
distribute-lft-out--95.4%
Simplified95.4%
Final simplification95.4%
(FPCore (x y z t) :precision binary64 (if (<= x -7.2e+109) x (if (<= x 1.5e+40) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -7.2e+109) {
tmp = x;
} else if (x <= 1.5e+40) {
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 (x <= (-7.2d+109)) then
tmp = x
else if (x <= 1.5d+40) 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 (x <= -7.2e+109) {
tmp = x;
} else if (x <= 1.5e+40) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -7.2e+109: tmp = x elif x <= 1.5e+40: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -7.2e+109) tmp = x; elseif (x <= 1.5e+40) 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 (x <= -7.2e+109) tmp = x; elseif (x <= 1.5e+40) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -7.2e+109], x, If[LessEqual[x, 1.5e+40], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+40}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7.2e109 or 1.5000000000000001e40 < x Initial program 95.1%
associate-+l-95.1%
sub-neg95.1%
sub-neg95.1%
distribute-neg-in95.1%
unsub-neg95.1%
neg-mul-195.1%
associate-*r/95.1%
associate-*l/95.1%
distribute-neg-frac95.1%
neg-mul-195.1%
times-frac96.1%
distribute-lft-out--97.1%
*-commutative97.1%
associate-/r*97.1%
metadata-eval97.1%
Simplified97.1%
Taylor expanded in x around inf 61.2%
if -7.2e109 < x < 1.5000000000000001e40Initial program 95.6%
Taylor expanded in z around 0 84.7%
associate-*r/84.7%
Applied egg-rr84.7%
Taylor expanded in t around 0 41.2%
Final simplification49.0%
(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.4%
associate-+l-95.4%
sub-neg95.4%
sub-neg95.4%
distribute-neg-in95.4%
unsub-neg95.4%
neg-mul-195.4%
associate-*r/95.4%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac94.6%
distribute-lft-out--95.4%
*-commutative95.4%
associate-/r*95.4%
metadata-eval95.4%
Simplified95.4%
Taylor expanded in x around inf 30.1%
Final simplification30.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 2023224
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))