
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-149) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ (+ x (/ t (* z (* 3.0 y)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-149) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 2d-149) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = (x + (t / (z * (3.0d0 * y)))) + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-149) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-149: tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-149) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-149) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-149], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-149}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z 3) < 1.99999999999999996e-149Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified98.6%
Taylor expanded in z around 0 98.6%
if 1.99999999999999996e-149 < (*.f64 z 3) Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ y (* z 3.0)))) (t_2 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -1e+61)
(/ -0.3333333333333333 (/ z y))
(if (<= y -2.1e-283)
t_2
(if (<= y -3.6e-307)
x
(if (<= y 6.2e-153)
t_2
(if (<= y 7.5e-125)
t_1
(if (<= y 4.8e-98)
t_2
(if (<= y 8e-5) t_1 (* (/ y z) -0.3333333333333333))))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y / (z * 3.0));
double t_2 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= -2.1e-283) {
tmp = t_2;
} else if (y <= -3.6e-307) {
tmp = x;
} else if (y <= 6.2e-153) {
tmp = t_2;
} else if (y <= 7.5e-125) {
tmp = t_1;
} else if (y <= 4.8e-98) {
tmp = t_2;
} else if (y <= 8e-5) {
tmp = t_1;
} else {
tmp = (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) :: t_2
real(8) :: tmp
t_1 = x + (y / (z * 3.0d0))
t_2 = 0.3333333333333333d0 * (t / (z * y))
if (y <= (-1d+61)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= (-2.1d-283)) then
tmp = t_2
else if (y <= (-3.6d-307)) then
tmp = x
else if (y <= 6.2d-153) then
tmp = t_2
else if (y <= 7.5d-125) then
tmp = t_1
else if (y <= 4.8d-98) then
tmp = t_2
else if (y <= 8d-5) then
tmp = t_1
else
tmp = (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 = x + (y / (z * 3.0));
double t_2 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= -2.1e-283) {
tmp = t_2;
} else if (y <= -3.6e-307) {
tmp = x;
} else if (y <= 6.2e-153) {
tmp = t_2;
} else if (y <= 7.5e-125) {
tmp = t_1;
} else if (y <= 4.8e-98) {
tmp = t_2;
} else if (y <= 8e-5) {
tmp = t_1;
} else {
tmp = (y / z) * -0.3333333333333333;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y / (z * 3.0)) t_2 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -1e+61: tmp = -0.3333333333333333 / (z / y) elif y <= -2.1e-283: tmp = t_2 elif y <= -3.6e-307: tmp = x elif y <= 6.2e-153: tmp = t_2 elif y <= 7.5e-125: tmp = t_1 elif y <= 4.8e-98: tmp = t_2 elif y <= 8e-5: tmp = t_1 else: tmp = (y / z) * -0.3333333333333333 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y / Float64(z * 3.0))) t_2 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -1e+61) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= -2.1e-283) tmp = t_2; elseif (y <= -3.6e-307) tmp = x; elseif (y <= 6.2e-153) tmp = t_2; elseif (y <= 7.5e-125) tmp = t_1; elseif (y <= 4.8e-98) tmp = t_2; elseif (y <= 8e-5) tmp = t_1; else tmp = Float64(Float64(y / z) * -0.3333333333333333); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y / (z * 3.0)); t_2 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -1e+61) tmp = -0.3333333333333333 / (z / y); elseif (y <= -2.1e-283) tmp = t_2; elseif (y <= -3.6e-307) tmp = x; elseif (y <= 6.2e-153) tmp = t_2; elseif (y <= 7.5e-125) tmp = t_1; elseif (y <= 4.8e-98) tmp = t_2; elseif (y <= 8e-5) tmp = t_1; else tmp = (y / z) * -0.3333333333333333; 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]}, Block[{t$95$2 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+61], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-283], t$95$2, If[LessEqual[y, -3.6e-307], x, If[LessEqual[y, 6.2e-153], t$95$2, If[LessEqual[y, 7.5e-125], t$95$1, If[LessEqual[y, 4.8e-98], t$95$2, If[LessEqual[y, 8e-5], t$95$1, N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{z \cdot 3}\\
t_2 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-307}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-125}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-98}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 81.1%
clear-num81.1%
un-div-inv81.2%
Applied egg-rr81.2%
if -9.99999999999999949e60 < y < -2.09999999999999997e-283 or -3.60000000000000007e-307 < y < 6.1999999999999999e-153 or 7.5e-125 < y < 4.8000000000000001e-98Initial program 95.5%
+-commutative95.5%
associate-+r-95.5%
+-commutative95.5%
associate--l+95.5%
sub-neg95.5%
remove-double-neg95.5%
distribute-frac-neg95.5%
distribute-neg-in95.5%
remove-double-neg95.5%
sub-neg95.5%
neg-mul-195.5%
times-frac92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
associate-/l*92.0%
*-commutative92.0%
Simplified91.9%
Taylor expanded in z around 0 91.9%
Taylor expanded in x around 0 65.3%
Taylor expanded in t around inf 65.9%
if -2.09999999999999997e-283 < y < -3.60000000000000007e-307Initial program 59.5%
+-commutative59.5%
associate-+r-59.5%
+-commutative59.5%
associate--l+59.5%
sub-neg59.5%
remove-double-neg59.5%
distribute-frac-neg59.5%
distribute-neg-in59.5%
remove-double-neg59.5%
sub-neg59.5%
neg-mul-159.5%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
Simplified99.8%
Taylor expanded in x around inf 71.5%
if 6.1999999999999999e-153 < y < 7.5e-125 or 4.8000000000000001e-98 < y < 8.00000000000000065e-5Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
+-commutative92.8%
associate--l+92.8%
sub-neg92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in t around 0 67.6%
neg-mul-167.6%
Simplified67.6%
*-commutative67.6%
clear-num67.6%
un-div-inv67.6%
add-sqr-sqrt0.0%
sqrt-unprod60.9%
sqr-neg60.9%
sqrt-unprod60.9%
add-sqr-sqrt60.9%
div-inv60.9%
metadata-eval60.9%
Applied egg-rr60.9%
if 8.00000000000000065e-5 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 91.7%
metadata-eval91.7%
cancel-sign-sub-inv91.7%
associate-*r/91.6%
Simplified91.6%
Taylor expanded in x around 0 66.7%
Final simplification68.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -1.1e+61)
(/ -0.3333333333333333 (/ z y))
(if (<= y -2.1e-283)
t_1
(if (<= y -3.6e-307)
x
(if (<= y 1.6e-150)
t_1
(if (<= y 2.4e-125)
x
(if (<= y 1.02e-98)
t_1
(if (<= y 0.0005) 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 <= -1.1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.6e-307) {
tmp = x;
} else if (y <= 1.6e-150) {
tmp = t_1;
} else if (y <= 2.4e-125) {
tmp = x;
} else if (y <= 1.02e-98) {
tmp = t_1;
} else if (y <= 0.0005) {
tmp = x;
} else {
tmp = (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 <= (-1.1d+61)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= (-2.1d-283)) then
tmp = t_1
else if (y <= (-3.6d-307)) then
tmp = x
else if (y <= 1.6d-150) then
tmp = t_1
else if (y <= 2.4d-125) then
tmp = x
else if (y <= 1.02d-98) then
tmp = t_1
else if (y <= 0.0005d0) then
tmp = x
else
tmp = (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 <= -1.1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.6e-307) {
tmp = x;
} else if (y <= 1.6e-150) {
tmp = t_1;
} else if (y <= 2.4e-125) {
tmp = x;
} else if (y <= 1.02e-98) {
tmp = t_1;
} else if (y <= 0.0005) {
tmp = x;
} else {
tmp = (y / z) * -0.3333333333333333;
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -1.1e+61: tmp = -0.3333333333333333 / (z / y) elif y <= -2.1e-283: tmp = t_1 elif y <= -3.6e-307: tmp = x elif y <= 1.6e-150: tmp = t_1 elif y <= 2.4e-125: tmp = x elif y <= 1.02e-98: tmp = t_1 elif y <= 0.0005: tmp = x else: tmp = (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 <= -1.1e+61) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.6e-307) tmp = x; elseif (y <= 1.6e-150) tmp = t_1; elseif (y <= 2.4e-125) tmp = x; elseif (y <= 1.02e-98) tmp = t_1; elseif (y <= 0.0005) tmp = x; else tmp = 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 <= -1.1e+61) tmp = -0.3333333333333333 / (z / y); elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.6e-307) tmp = x; elseif (y <= 1.6e-150) tmp = t_1; elseif (y <= 2.4e-125) tmp = x; elseif (y <= 1.02e-98) tmp = t_1; elseif (y <= 0.0005) tmp = x; else tmp = (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, -1.1e+61], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-283], t$95$1, If[LessEqual[y, -3.6e-307], x, If[LessEqual[y, 1.6e-150], t$95$1, If[LessEqual[y, 2.4e-125], x, If[LessEqual[y, 1.02e-98], t$95$1, If[LessEqual[y, 0.0005], x, N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+61}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-307}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-125}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.0005:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if y < -1.1e61Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 81.1%
clear-num81.1%
un-div-inv81.2%
Applied egg-rr81.2%
if -1.1e61 < y < -2.09999999999999997e-283 or -3.60000000000000007e-307 < y < 1.5999999999999999e-150 or 2.4000000000000001e-125 < y < 1.02e-98Initial program 93.8%
+-commutative93.8%
associate-+r-93.8%
+-commutative93.8%
associate--l+93.8%
sub-neg93.8%
remove-double-neg93.8%
distribute-frac-neg93.8%
distribute-neg-in93.8%
remove-double-neg93.8%
sub-neg93.8%
neg-mul-193.8%
times-frac92.1%
distribute-frac-neg92.1%
neg-mul-192.1%
*-commutative92.1%
associate-/l*92.1%
*-commutative92.1%
Simplified92.0%
Taylor expanded in z around 0 92.0%
Taylor expanded in x around 0 65.6%
Taylor expanded in t around inf 65.4%
if -2.09999999999999997e-283 < y < -3.60000000000000007e-307 or 1.5999999999999999e-150 < y < 2.4000000000000001e-125 or 1.02e-98 < y < 5.0000000000000001e-4Initial program 91.2%
+-commutative91.2%
associate-+r-91.2%
+-commutative91.2%
associate--l+91.2%
sub-neg91.2%
remove-double-neg91.2%
distribute-frac-neg91.2%
distribute-neg-in91.2%
remove-double-neg91.2%
sub-neg91.2%
neg-mul-191.2%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 64.6%
if 5.0000000000000001e-4 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 91.7%
metadata-eval91.7%
cancel-sign-sub-inv91.7%
associate-*r/91.6%
Simplified91.6%
Taylor expanded in x around 0 66.7%
Final simplification68.6%
(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.8e-73)
t_2
(if (<= y -2.1e-283)
t_1
(if (<= y -3.6e-307)
t_2
(if (<= y 1.85e-153)
t_1
(if (<= y 1.6e-125)
(+ x (/ y (* z 3.0)))
(if (<= y 4.2e-99) 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.8e-73) {
tmp = t_2;
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.6e-307) {
tmp = t_2;
} else if (y <= 1.85e-153) {
tmp = t_1;
} else if (y <= 1.6e-125) {
tmp = x + (y / (z * 3.0));
} else if (y <= 4.2e-99) {
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.8d-73)) then
tmp = t_2
else if (y <= (-2.1d-283)) then
tmp = t_1
else if (y <= (-3.6d-307)) then
tmp = t_2
else if (y <= 1.85d-153) then
tmp = t_1
else if (y <= 1.6d-125) then
tmp = x + (y / (z * 3.0d0))
else if (y <= 4.2d-99) 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.8e-73) {
tmp = t_2;
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.6e-307) {
tmp = t_2;
} else if (y <= 1.85e-153) {
tmp = t_1;
} else if (y <= 1.6e-125) {
tmp = x + (y / (z * 3.0));
} else if (y <= 4.2e-99) {
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.8e-73: tmp = t_2 elif y <= -2.1e-283: tmp = t_1 elif y <= -3.6e-307: tmp = t_2 elif y <= 1.85e-153: tmp = t_1 elif y <= 1.6e-125: tmp = x + (y / (z * 3.0)) elif y <= 4.2e-99: 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(0.3333333333333333 * Float64(y / z))) tmp = 0.0 if (y <= -2.8e-73) tmp = t_2; elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.6e-307) tmp = t_2; elseif (y <= 1.85e-153) tmp = t_1; elseif (y <= 1.6e-125) tmp = Float64(x + Float64(y / Float64(z * 3.0))); elseif (y <= 4.2e-99) 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.8e-73) tmp = t_2; elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.6e-307) tmp = t_2; elseif (y <= 1.85e-153) tmp = t_1; elseif (y <= 1.6e-125) tmp = x + (y / (z * 3.0)); elseif (y <= 4.2e-99) 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[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-73], t$95$2, If[LessEqual[y, -2.1e-283], t$95$1, If[LessEqual[y, -3.6e-307], t$95$2, If[LessEqual[y, 1.85e-153], t$95$1, If[LessEqual[y, 1.6e-125], N[(x + N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-99], 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 - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-73}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-125}:\\
\;\;\;\;x + \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -2.80000000000000012e-73 or -2.09999999999999997e-283 < y < -3.60000000000000007e-307 or 4.19999999999999968e-99 < y Initial program 97.5%
Taylor expanded in t around 0 85.0%
if -2.80000000000000012e-73 < y < -2.09999999999999997e-283 or -3.60000000000000007e-307 < y < 1.8500000000000001e-153 or 1.5999999999999999e-125 < y < 4.19999999999999968e-99Initial program 94.0%
+-commutative94.0%
associate-+r-94.0%
+-commutative94.0%
associate--l+94.0%
sub-neg94.0%
remove-double-neg94.0%
distribute-frac-neg94.0%
distribute-neg-in94.0%
remove-double-neg94.0%
sub-neg94.0%
neg-mul-194.0%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.6%
Taylor expanded in z around 0 90.7%
Taylor expanded in x around 0 70.6%
Taylor expanded in t around inf 74.4%
if 1.8500000000000001e-153 < y < 1.5999999999999999e-125Initial program 79.0%
+-commutative79.0%
associate-+r-79.0%
+-commutative79.0%
associate--l+79.0%
sub-neg79.0%
remove-double-neg79.0%
distribute-frac-neg79.0%
distribute-neg-in79.0%
remove-double-neg79.0%
sub-neg79.0%
neg-mul-179.0%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 67.6%
neg-mul-167.6%
Simplified67.6%
*-commutative67.6%
clear-num67.6%
un-div-inv67.6%
add-sqr-sqrt0.0%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod68.4%
add-sqr-sqrt68.4%
div-inv68.4%
metadata-eval68.4%
Applied egg-rr68.4%
Final simplification81.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 -7e-73)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y -2.1e-283)
t_1
(if (<= y -3.1e-307)
t_2
(if (<= y 6.2e-153)
t_1
(if (<= y 9e-126)
(+ x (/ y (* z 3.0)))
(if (<= y 6.3e-99) 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 <= -7e-73) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.1e-307) {
tmp = t_2;
} else if (y <= 6.2e-153) {
tmp = t_1;
} else if (y <= 9e-126) {
tmp = x + (y / (z * 3.0));
} else if (y <= 6.3e-99) {
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 <= (-7d-73)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= (-2.1d-283)) then
tmp = t_1
else if (y <= (-3.1d-307)) then
tmp = t_2
else if (y <= 6.2d-153) then
tmp = t_1
else if (y <= 9d-126) then
tmp = x + (y / (z * 3.0d0))
else if (y <= 6.3d-99) 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 <= -7e-73) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.1e-307) {
tmp = t_2;
} else if (y <= 6.2e-153) {
tmp = t_1;
} else if (y <= 9e-126) {
tmp = x + (y / (z * 3.0));
} else if (y <= 6.3e-99) {
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 <= -7e-73: tmp = x - (y * (0.3333333333333333 / z)) elif y <= -2.1e-283: tmp = t_1 elif y <= -3.1e-307: tmp = t_2 elif y <= 6.2e-153: tmp = t_1 elif y <= 9e-126: tmp = x + (y / (z * 3.0)) elif y <= 6.3e-99: 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(0.3333333333333333 * Float64(y / z))) tmp = 0.0 if (y <= -7e-73) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.1e-307) tmp = t_2; elseif (y <= 6.2e-153) tmp = t_1; elseif (y <= 9e-126) tmp = Float64(x + Float64(y / Float64(z * 3.0))); elseif (y <= 6.3e-99) 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 <= -7e-73) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.1e-307) tmp = t_2; elseif (y <= 6.2e-153) tmp = t_1; elseif (y <= 9e-126) tmp = x + (y / (z * 3.0)); elseif (y <= 6.3e-99) 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[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e-73], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-283], t$95$1, If[LessEqual[y, -3.1e-307], t$95$2, If[LessEqual[y, 6.2e-153], t$95$1, If[LessEqual[y, 9e-126], N[(x + N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.3e-99], 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 - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -7 \cdot 10^{-73}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-153}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-126}:\\
\;\;\;\;x + \frac{y}{z \cdot 3}\\
\mathbf{elif}\;y \leq 6.3 \cdot 10^{-99}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -6.9999999999999995e-73Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac97.2%
distribute-frac-neg97.2%
neg-mul-197.2%
*-commutative97.2%
associate-/l*97.1%
*-commutative97.1%
Simplified98.4%
Taylor expanded in z around 0 98.4%
Taylor expanded in t around 0 84.5%
metadata-eval84.5%
cancel-sign-sub-inv84.5%
associate-*r/84.6%
*-commutative84.6%
associate-/l*84.6%
Simplified84.6%
if -6.9999999999999995e-73 < y < -2.09999999999999997e-283 or -3.0999999999999998e-307 < y < 6.1999999999999999e-153 or 9.0000000000000005e-126 < y < 6.29999999999999992e-99Initial program 94.0%
+-commutative94.0%
associate-+r-94.0%
+-commutative94.0%
associate--l+94.0%
sub-neg94.0%
remove-double-neg94.0%
distribute-frac-neg94.0%
distribute-neg-in94.0%
remove-double-neg94.0%
sub-neg94.0%
neg-mul-194.0%
times-frac90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
associate-/l*90.7%
*-commutative90.7%
Simplified90.6%
Taylor expanded in z around 0 90.7%
Taylor expanded in x around 0 70.6%
Taylor expanded in t around inf 74.4%
if -2.09999999999999997e-283 < y < -3.0999999999999998e-307 or 6.29999999999999992e-99 < y Initial program 96.6%
Taylor expanded in t around 0 85.4%
if 6.1999999999999999e-153 < y < 9.0000000000000005e-126Initial program 79.0%
+-commutative79.0%
associate-+r-79.0%
+-commutative79.0%
associate--l+79.0%
sub-neg79.0%
remove-double-neg79.0%
distribute-frac-neg79.0%
distribute-neg-in79.0%
remove-double-neg79.0%
sub-neg79.0%
neg-mul-179.0%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 67.6%
neg-mul-167.6%
Simplified67.6%
*-commutative67.6%
clear-num67.6%
un-div-inv67.6%
add-sqr-sqrt0.0%
sqrt-unprod68.4%
sqr-neg68.4%
sqrt-unprod68.4%
add-sqr-sqrt68.4%
div-inv68.4%
metadata-eval68.4%
Applied egg-rr68.4%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -8.6e-73)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y 2.5e-151)
(/ (/ (* 0.3333333333333333 t) z) y)
(if (<= y 8e-126)
x
(if (<= y 1.2e-98)
(* 0.3333333333333333 (/ t (* z y)))
(- x (* 0.3333333333333333 (/ y z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e-73) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 2.5e-151) {
tmp = ((0.3333333333333333 * t) / z) / y;
} else if (y <= 8e-126) {
tmp = x;
} else if (y <= 1.2e-98) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.6d-73)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= 2.5d-151) then
tmp = ((0.3333333333333333d0 * t) / z) / y
else if (y <= 8d-126) then
tmp = x
else if (y <= 1.2d-98) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.6e-73) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 2.5e-151) {
tmp = ((0.3333333333333333 * t) / z) / y;
} else if (y <= 8e-126) {
tmp = x;
} else if (y <= 1.2e-98) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.6e-73: tmp = x - (y * (0.3333333333333333 / z)) elif y <= 2.5e-151: tmp = ((0.3333333333333333 * t) / z) / y elif y <= 8e-126: tmp = x elif y <= 1.2e-98: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.6e-73) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 2.5e-151) tmp = Float64(Float64(Float64(0.3333333333333333 * t) / z) / y); elseif (y <= 8e-126) tmp = x; elseif (y <= 1.2e-98) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.6e-73) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= 2.5e-151) tmp = ((0.3333333333333333 * t) / z) / y; elseif (y <= 8e-126) tmp = x; elseif (y <= 1.2e-98) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.6e-73], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-151], N[(N[(N[(0.3333333333333333 * t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 8e-126], x, If[LessEqual[y, 1.2e-98], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-73}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-151}:\\
\;\;\;\;\frac{\frac{0.3333333333333333 \cdot t}{z}}{y}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-126}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-98}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -8.5999999999999998e-73Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac97.2%
distribute-frac-neg97.2%
neg-mul-197.2%
*-commutative97.2%
associate-/l*97.1%
*-commutative97.1%
Simplified98.4%
Taylor expanded in z around 0 98.4%
Taylor expanded in t around 0 84.5%
metadata-eval84.5%
cancel-sign-sub-inv84.5%
associate-*r/84.6%
*-commutative84.6%
associate-/l*84.6%
Simplified84.6%
if -8.5999999999999998e-73 < y < 2.50000000000000002e-151Initial program 88.8%
+-commutative88.8%
associate-+r-88.8%
+-commutative88.8%
associate--l+88.8%
sub-neg88.8%
remove-double-neg88.8%
distribute-frac-neg88.8%
distribute-neg-in88.8%
remove-double-neg88.8%
sub-neg88.8%
neg-mul-188.8%
times-frac91.0%
distribute-frac-neg91.0%
neg-mul-191.0%
*-commutative91.0%
associate-/l*91.0%
*-commutative91.0%
Simplified90.9%
Taylor expanded in z around 0 90.9%
Taylor expanded in x around 0 67.1%
Taylor expanded in t around inf 66.5%
associate-*r/66.4%
*-commutative66.4%
associate-/r*72.2%
*-commutative72.2%
Applied egg-rr72.2%
if 2.50000000000000002e-151 < y < 7.9999999999999996e-126Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 86.1%
if 7.9999999999999996e-126 < y < 1.20000000000000002e-98Initial program 99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate--l+99.5%
sub-neg99.5%
remove-double-neg99.5%
distribute-frac-neg99.5%
distribute-neg-in99.5%
remove-double-neg99.5%
sub-neg99.5%
neg-mul-199.5%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
Simplified99.7%
Taylor expanded in z around 0 100.0%
Taylor expanded in x around 0 83.5%
Taylor expanded in t around inf 83.5%
if 1.20000000000000002e-98 < y Initial program 99.8%
Taylor expanded in t around 0 86.5%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -1e+143) (not (<= (* z 3.0) 1e+109))) (- x (* y (/ 0.3333333333333333 z))) (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e+143) || !((z * 3.0) <= 1e+109)) {
tmp = x - (y * (0.3333333333333333 / z));
} else {
tmp = 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) <= (-1d+143)) .or. (.not. ((z * 3.0d0) <= 1d+109))) then
tmp = x - (y * (0.3333333333333333d0 / z))
else
tmp = 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) <= -1e+143) || !((z * 3.0) <= 1e+109)) {
tmp = x - (y * (0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -1e+143) or not ((z * 3.0) <= 1e+109): tmp = x - (y * (0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (((t / y) - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -1e+143) || !(Float64(z * 3.0) <= 1e+109)) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(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) <= -1e+143) || ~(((z * 3.0) <= 1e+109))) tmp = x - (y * (0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (((t / y) - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+143], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+109]], $MachinePrecision]], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+143} \lor \neg \left(z \cdot 3 \leq 10^{+109}\right):\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -1e143 or 9.99999999999999982e108 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac89.3%
distribute-frac-neg89.3%
neg-mul-189.3%
*-commutative89.3%
associate-/l*89.3%
*-commutative89.3%
Simplified89.2%
Taylor expanded in z around 0 89.2%
Taylor expanded in t around 0 80.8%
metadata-eval80.8%
cancel-sign-sub-inv80.8%
associate-*r/80.8%
*-commutative80.8%
associate-/l*80.8%
Simplified80.8%
if -1e143 < (*.f64 z 3) < 9.99999999999999982e108Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
+-commutative94.1%
associate--l+94.1%
sub-neg94.1%
remove-double-neg94.1%
distribute-frac-neg94.1%
distribute-neg-in94.1%
remove-double-neg94.1%
sub-neg94.1%
neg-mul-194.1%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
Taylor expanded in z around 0 99.3%
Taylor expanded in x around 0 84.2%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+61)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y 2.3e-18)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 2.3e-18) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1d+61)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= 2.3d-18) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 2.3e-18) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = x - (y * (0.3333333333333333 / z)) elif y <= 2.3e-18: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 2.3e-18) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+61) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= 2.3e-18) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-18], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-18}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.8%
*-commutative97.8%
associate-/l*97.8%
Simplified97.8%
if -9.99999999999999949e60 < y < 2.3000000000000001e-18Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.6%
Taylor expanded in t around inf 89.2%
if 2.3000000000000001e-18 < y Initial program 99.8%
Taylor expanded in t around 0 92.0%
Final simplification91.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+61)
(- x (* y (/ 0.3333333333333333 z)))
(if (<= y 8.8e-18)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 8.8e-18) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1d+61)) then
tmp = x - (y * (0.3333333333333333d0 / z))
else if (y <= 8.8d-18) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x - (y * (0.3333333333333333 / z));
} else if (y <= 8.8e-18) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = x - (y * (0.3333333333333333 / z)) elif y <= 8.8e-18: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); elseif (y <= 8.8e-18) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+61) tmp = x - (y * (0.3333333333333333 / z)); elseif (y <= 8.8e-18) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.8e-18], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in z around 0 99.6%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.8%
*-commutative97.8%
associate-/l*97.8%
Simplified97.8%
if -9.99999999999999949e60 < y < 8.7999999999999994e-18Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.6%
Taylor expanded in t around inf 89.2%
associate-*r/89.2%
Simplified89.2%
*-commutative89.2%
*-commutative89.2%
times-frac94.4%
Applied egg-rr94.4%
if 8.7999999999999994e-18 < y Initial program 99.8%
Taylor expanded in t around 0 92.0%
Final simplification94.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+61)
(+ x (* y (/ -1.0 (/ z 0.3333333333333333))))
(if (<= y 6.2e-18)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x + (y * (-1.0 / (z / 0.3333333333333333)));
} else if (y <= 6.2e-18) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1d+61)) then
tmp = x + (y * ((-1.0d0) / (z / 0.3333333333333333d0)))
else if (y <= 6.2d-18) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x + (y * (-1.0 / (z / 0.3333333333333333)));
} else if (y <= 6.2e-18) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = x + (y * (-1.0 / (z / 0.3333333333333333))) elif y <= 6.2e-18: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(x + Float64(y * Float64(-1.0 / Float64(z / 0.3333333333333333)))); elseif (y <= 6.2e-18) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+61) tmp = x + (y * (-1.0 / (z / 0.3333333333333333))); elseif (y <= 6.2e-18) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(x + N[(y * N[(-1.0 / N[(z / 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-18], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;x + y \cdot \frac{-1}{\frac{z}{0.3333333333333333}}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
clear-num99.7%
inv-pow99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
Taylor expanded in t around 0 97.8%
neg-mul-197.8%
Simplified97.8%
if -9.99999999999999949e60 < y < 6.20000000000000014e-18Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.6%
Taylor expanded in t around inf 89.2%
associate-*r/89.2%
Simplified89.2%
*-commutative89.2%
*-commutative89.2%
times-frac94.4%
Applied egg-rr94.4%
if 6.20000000000000014e-18 < y Initial program 99.8%
Taylor expanded in t around 0 92.0%
Final simplification94.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.02e+61) (not (<= y 0.00018))) (* (/ y z) -0.3333333333333333) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.02e+61) || !(y <= 0.00018)) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.02d+61)) .or. (.not. (y <= 0.00018d0))) then
tmp = (y / z) * (-0.3333333333333333d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.02e+61) || !(y <= 0.00018)) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.02e+61) or not (y <= 0.00018): tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.02e+61) || !(y <= 0.00018)) tmp = Float64(Float64(y / z) * -0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.02e+61) || ~((y <= 0.00018))) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.02e+61], N[Not[LessEqual[y, 0.00018]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+61} \lor \neg \left(y \leq 0.00018\right):\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.01999999999999999e61 or 1.80000000000000011e-4 < y Initial program 98.9%
+-commutative98.9%
associate-+r-98.9%
+-commutative98.9%
associate--l+98.9%
sub-neg98.9%
remove-double-neg98.9%
distribute-frac-neg98.9%
distribute-neg-in98.9%
remove-double-neg98.9%
sub-neg98.9%
neg-mul-198.9%
times-frac98.9%
distribute-frac-neg98.9%
neg-mul-198.9%
*-commutative98.9%
associate-/l*98.8%
*-commutative98.8%
Simplified99.7%
Taylor expanded in t around 0 94.3%
metadata-eval94.3%
cancel-sign-sub-inv94.3%
associate-*r/94.3%
Simplified94.3%
Taylor expanded in x around 0 72.9%
if -1.01999999999999999e61 < y < 1.80000000000000011e-4Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in x around inf 35.5%
Final simplification52.0%
(FPCore (x y z t) :precision binary64 (if (<= y -1.02e+61) (* y (/ -0.3333333333333333 z)) (if (<= y 0.00017) x (* (/ y z) -0.3333333333333333))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+61) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 0.00017) {
tmp = x;
} else {
tmp = (y / z) * -0.3333333333333333;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.02d+61)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 0.00017d0) then
tmp = x
else
tmp = (y / z) * (-0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+61) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 0.00017) {
tmp = x;
} else {
tmp = (y / z) * -0.3333333333333333;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e+61: tmp = y * (-0.3333333333333333 / z) elif y <= 0.00017: tmp = x else: tmp = (y / z) * -0.3333333333333333 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e+61) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 0.00017) tmp = x; else tmp = Float64(Float64(y / z) * -0.3333333333333333); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.02e+61) tmp = y * (-0.3333333333333333 / z); elseif (y <= 0.00017) tmp = x; else tmp = (y / z) * -0.3333333333333333; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e+61], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00017], x, N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+61}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 0.00017:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if y < -1.01999999999999999e61Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 81.1%
associate-*r/81.2%
*-commutative81.2%
associate-/l*81.2%
Simplified81.2%
if -1.01999999999999999e61 < y < 1.7e-4Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in x around inf 35.5%
if 1.7e-4 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 91.7%
metadata-eval91.7%
cancel-sign-sub-inv91.7%
associate-*r/91.6%
Simplified91.6%
Taylor expanded in x around 0 66.7%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 (if (<= y -1.05e+61) (/ -0.3333333333333333 (/ z y)) (if (<= y 0.00034) x (* (/ y z) -0.3333333333333333))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 0.00034) {
tmp = x;
} else {
tmp = (y / z) * -0.3333333333333333;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.05d+61)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 0.00034d0) then
tmp = x
else
tmp = (y / z) * (-0.3333333333333333d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 0.00034) {
tmp = x;
} else {
tmp = (y / z) * -0.3333333333333333;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.05e+61: tmp = -0.3333333333333333 / (z / y) elif y <= 0.00034: tmp = x else: tmp = (y / z) * -0.3333333333333333 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.05e+61) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 0.00034) tmp = x; else tmp = Float64(Float64(y / z) * -0.3333333333333333); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.05e+61) tmp = -0.3333333333333333 / (z / y); elseif (y <= 0.00034) tmp = x; else tmp = (y / z) * -0.3333333333333333; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.05e+61], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00034], x, N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+61}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 0.00034:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\end{array}
\end{array}
if y < -1.0500000000000001e61Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.7%
metadata-eval97.7%
cancel-sign-sub-inv97.7%
associate-*r/97.8%
Simplified97.8%
Taylor expanded in x around 0 81.1%
clear-num81.1%
un-div-inv81.2%
Applied egg-rr81.2%
if -1.0500000000000001e61 < y < 3.4e-4Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in x around inf 35.5%
if 3.4e-4 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 91.7%
metadata-eval91.7%
cancel-sign-sub-inv91.7%
associate-*r/91.6%
Simplified91.6%
Taylor expanded in x around 0 66.7%
Final simplification52.1%
(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(0.3333333333333333 * Float64(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[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}
\end{array}
Initial program 95.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified96.4%
Taylor expanded in z around 0 96.4%
Final simplification96.4%
(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.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified96.4%
Taylor expanded in x around inf 29.6%
Final simplification29.6%
(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 2024080
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))