
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ -1.0 (/ 1.0 z))))))
(if (<= t -3.5e-5)
(- x (* y (/ a t)))
(if (<= t -1.2e-301)
t_1
(if (<= t 5.7e-263)
(- x (* y a))
(if (<= t 3.9e-212)
t_1
(if (<= t 1.15e-185)
(/ (* a (- y)) (- 1.0 z))
(if (<= t 0.00013)
t_1
(if (<= t 2e+110)
(- x (/ (* y a) t))
(if (<= t 4e+156) t_1 (+ x (/ a (/ t z)))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (-1.0 + (1.0 / z)));
double tmp;
if (t <= -3.5e-5) {
tmp = x - (y * (a / t));
} else if (t <= -1.2e-301) {
tmp = t_1;
} else if (t <= 5.7e-263) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = (a * -y) / (1.0 - z);
} else if (t <= 0.00013) {
tmp = t_1;
} else if (t <= 2e+110) {
tmp = x - ((y * a) / t);
} else if (t <= 4e+156) {
tmp = t_1;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a / ((-1.0d0) + (1.0d0 / z)))
if (t <= (-3.5d-5)) then
tmp = x - (y * (a / t))
else if (t <= (-1.2d-301)) then
tmp = t_1
else if (t <= 5.7d-263) then
tmp = x - (y * a)
else if (t <= 3.9d-212) then
tmp = t_1
else if (t <= 1.15d-185) then
tmp = (a * -y) / (1.0d0 - z)
else if (t <= 0.00013d0) then
tmp = t_1
else if (t <= 2d+110) then
tmp = x - ((y * a) / t)
else if (t <= 4d+156) then
tmp = t_1
else
tmp = x + (a / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (-1.0 + (1.0 / z)));
double tmp;
if (t <= -3.5e-5) {
tmp = x - (y * (a / t));
} else if (t <= -1.2e-301) {
tmp = t_1;
} else if (t <= 5.7e-263) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = (a * -y) / (1.0 - z);
} else if (t <= 0.00013) {
tmp = t_1;
} else if (t <= 2e+110) {
tmp = x - ((y * a) / t);
} else if (t <= 4e+156) {
tmp = t_1;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (-1.0 + (1.0 / z))) tmp = 0 if t <= -3.5e-5: tmp = x - (y * (a / t)) elif t <= -1.2e-301: tmp = t_1 elif t <= 5.7e-263: tmp = x - (y * a) elif t <= 3.9e-212: tmp = t_1 elif t <= 1.15e-185: tmp = (a * -y) / (1.0 - z) elif t <= 0.00013: tmp = t_1 elif t <= 2e+110: tmp = x - ((y * a) / t) elif t <= 4e+156: tmp = t_1 else: tmp = x + (a / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(-1.0 + Float64(1.0 / z)))) tmp = 0.0 if (t <= -3.5e-5) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (t <= -1.2e-301) tmp = t_1; elseif (t <= 5.7e-263) tmp = Float64(x - Float64(y * a)); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 1.15e-185) tmp = Float64(Float64(a * Float64(-y)) / Float64(1.0 - z)); elseif (t <= 0.00013) tmp = t_1; elseif (t <= 2e+110) tmp = Float64(x - Float64(Float64(y * a) / t)); elseif (t <= 4e+156) tmp = t_1; else tmp = Float64(x + Float64(a / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (-1.0 + (1.0 / z))); tmp = 0.0; if (t <= -3.5e-5) tmp = x - (y * (a / t)); elseif (t <= -1.2e-301) tmp = t_1; elseif (t <= 5.7e-263) tmp = x - (y * a); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 1.15e-185) tmp = (a * -y) / (1.0 - z); elseif (t <= 0.00013) tmp = t_1; elseif (t <= 2e+110) tmp = x - ((y * a) / t); elseif (t <= 4e+156) tmp = t_1; else tmp = x + (a / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-5], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.2e-301], t$95$1, If[LessEqual[t, 5.7e-263], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-212], t$95$1, If[LessEqual[t, 1.15e-185], N[(N[(a * (-y)), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00013], t$95$1, If[LessEqual[t, 2e+110], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+156], t$95$1, N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{-1 + \frac{1}{z}}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-301}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{-263}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\
\mathbf{elif}\;t \leq 0.00013:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+110}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -3.4999999999999997e-5Initial program 98.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 70.6%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around inf 70.1%
Taylor expanded in x around 0 70.1%
mul-1-neg70.1%
sub-neg70.1%
*-commutative70.1%
associate-*r/83.4%
Simplified83.4%
if -3.4999999999999997e-5 < t < -1.19999999999999996e-301 or 5.6999999999999997e-263 < t < 3.9e-212 or 1.15e-185 < t < 1.29999999999999989e-4 or 2e110 < t < 3.9999999999999999e156Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 97.2%
Taylor expanded in y around 0 68.5%
sub-neg68.5%
mul-1-neg68.5%
remove-double-neg68.5%
associate-/l*81.4%
div-sub81.4%
*-inverses81.4%
Simplified81.4%
if -1.19999999999999996e-301 < t < 5.6999999999999997e-263Initial program 99.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 92.8%
if 3.9e-212 < t < 1.15e-185Initial program 99.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around inf 100.0%
associate-*r/100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
if 1.29999999999999989e-4 < t < 2e110Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 89.1%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around inf 88.1%
if 3.9999999999999999e156 < t Initial program 96.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 92.9%
Taylor expanded in y around 0 79.1%
cancel-sign-sub-inv79.1%
metadata-eval79.1%
*-lft-identity79.1%
+-commutative79.1%
associate-/l*89.5%
Simplified89.5%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ -1.0 (/ 1.0 z))))))
(if (<= t -3.5e-5)
(- x (* y (/ a t)))
(if (<= t -1.7e-302)
t_1
(if (<= t 5.8e-263)
(- x (* y a))
(if (<= t 3.9e-212)
t_1
(if (<= t 1.15e-185)
(/ (* a (- y)) (- 1.0 z))
(if (<= t 2.3e-5)
t_1
(if (<= t 3.5e+121)
(- x (/ (* y a) t))
(+ x (/ a (+ (/ t z) -1.0))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (-1.0 + (1.0 / z)));
double tmp;
if (t <= -3.5e-5) {
tmp = x - (y * (a / t));
} else if (t <= -1.7e-302) {
tmp = t_1;
} else if (t <= 5.8e-263) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = (a * -y) / (1.0 - z);
} else if (t <= 2.3e-5) {
tmp = t_1;
} else if (t <= 3.5e+121) {
tmp = x - ((y * a) / t);
} else {
tmp = x + (a / ((t / z) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a / ((-1.0d0) + (1.0d0 / z)))
if (t <= (-3.5d-5)) then
tmp = x - (y * (a / t))
else if (t <= (-1.7d-302)) then
tmp = t_1
else if (t <= 5.8d-263) then
tmp = x - (y * a)
else if (t <= 3.9d-212) then
tmp = t_1
else if (t <= 1.15d-185) then
tmp = (a * -y) / (1.0d0 - z)
else if (t <= 2.3d-5) then
tmp = t_1
else if (t <= 3.5d+121) then
tmp = x - ((y * a) / t)
else
tmp = x + (a / ((t / z) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (-1.0 + (1.0 / z)));
double tmp;
if (t <= -3.5e-5) {
tmp = x - (y * (a / t));
} else if (t <= -1.7e-302) {
tmp = t_1;
} else if (t <= 5.8e-263) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = (a * -y) / (1.0 - z);
} else if (t <= 2.3e-5) {
tmp = t_1;
} else if (t <= 3.5e+121) {
tmp = x - ((y * a) / t);
} else {
tmp = x + (a / ((t / z) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (-1.0 + (1.0 / z))) tmp = 0 if t <= -3.5e-5: tmp = x - (y * (a / t)) elif t <= -1.7e-302: tmp = t_1 elif t <= 5.8e-263: tmp = x - (y * a) elif t <= 3.9e-212: tmp = t_1 elif t <= 1.15e-185: tmp = (a * -y) / (1.0 - z) elif t <= 2.3e-5: tmp = t_1 elif t <= 3.5e+121: tmp = x - ((y * a) / t) else: tmp = x + (a / ((t / z) + -1.0)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(-1.0 + Float64(1.0 / z)))) tmp = 0.0 if (t <= -3.5e-5) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (t <= -1.7e-302) tmp = t_1; elseif (t <= 5.8e-263) tmp = Float64(x - Float64(y * a)); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 1.15e-185) tmp = Float64(Float64(a * Float64(-y)) / Float64(1.0 - z)); elseif (t <= 2.3e-5) tmp = t_1; elseif (t <= 3.5e+121) tmp = Float64(x - Float64(Float64(y * a) / t)); else tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (-1.0 + (1.0 / z))); tmp = 0.0; if (t <= -3.5e-5) tmp = x - (y * (a / t)); elseif (t <= -1.7e-302) tmp = t_1; elseif (t <= 5.8e-263) tmp = x - (y * a); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 1.15e-185) tmp = (a * -y) / (1.0 - z); elseif (t <= 2.3e-5) tmp = t_1; elseif (t <= 3.5e+121) tmp = x - ((y * a) / t); else tmp = x + (a / ((t / z) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-5], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-302], t$95$1, If[LessEqual[t, 5.8e-263], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-212], t$95$1, If[LessEqual[t, 1.15e-185], N[(N[(a * (-y)), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-5], t$95$1, If[LessEqual[t, 3.5e+121], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{-1 + \frac{1}{z}}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-302}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-263}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{a \cdot \left(-y\right)}{1 - z}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+121}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\end{array}
\end{array}
if t < -3.4999999999999997e-5Initial program 98.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 70.6%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around inf 70.1%
Taylor expanded in x around 0 70.1%
mul-1-neg70.1%
sub-neg70.1%
*-commutative70.1%
associate-*r/83.4%
Simplified83.4%
if -3.4999999999999997e-5 < t < -1.7e-302 or 5.80000000000000007e-263 < t < 3.9e-212 or 1.15e-185 < t < 2.3e-5Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
Taylor expanded in y around 0 68.2%
sub-neg68.2%
mul-1-neg68.2%
remove-double-neg68.2%
associate-/l*80.9%
div-sub80.9%
*-inverses80.9%
Simplified80.9%
if -1.7e-302 < t < 5.80000000000000007e-263Initial program 99.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 92.8%
if 3.9e-212 < t < 1.15e-185Initial program 99.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around inf 100.0%
associate-*r/100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
if 2.3e-5 < t < 3.5e121Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.1%
associate-/l*87.0%
Simplified87.0%
Taylor expanded in t around inf 86.3%
if 3.5e121 < t Initial program 97.0%
associate-/r/99.9%
Simplified99.9%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 79.1%
sub-neg79.1%
mul-1-neg79.1%
remove-double-neg79.1%
associate-/l*94.3%
div-sub94.3%
*-inverses94.3%
Simplified94.3%
Taylor expanded in t around inf 94.3%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ a t)))))
(if (<= t -2.6e-14)
t_1
(if (<= t -4e-277)
(- x a)
(if (<= t 1.8e-134)
(- x (* y a))
(if (<= t 0.000106)
(- x a)
(if (<= t 3.8e+162) t_1 (+ x (/ a (/ t z))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (a / t));
double tmp;
if (t <= -2.6e-14) {
tmp = t_1;
} else if (t <= -4e-277) {
tmp = x - a;
} else if (t <= 1.8e-134) {
tmp = x - (y * a);
} else if (t <= 0.000106) {
tmp = x - a;
} else if (t <= 3.8e+162) {
tmp = t_1;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (a / t))
if (t <= (-2.6d-14)) then
tmp = t_1
else if (t <= (-4d-277)) then
tmp = x - a
else if (t <= 1.8d-134) then
tmp = x - (y * a)
else if (t <= 0.000106d0) then
tmp = x - a
else if (t <= 3.8d+162) then
tmp = t_1
else
tmp = x + (a / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (a / t));
double tmp;
if (t <= -2.6e-14) {
tmp = t_1;
} else if (t <= -4e-277) {
tmp = x - a;
} else if (t <= 1.8e-134) {
tmp = x - (y * a);
} else if (t <= 0.000106) {
tmp = x - a;
} else if (t <= 3.8e+162) {
tmp = t_1;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (a / t)) tmp = 0 if t <= -2.6e-14: tmp = t_1 elif t <= -4e-277: tmp = x - a elif t <= 1.8e-134: tmp = x - (y * a) elif t <= 0.000106: tmp = x - a elif t <= 3.8e+162: tmp = t_1 else: tmp = x + (a / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(a / t))) tmp = 0.0 if (t <= -2.6e-14) tmp = t_1; elseif (t <= -4e-277) tmp = Float64(x - a); elseif (t <= 1.8e-134) tmp = Float64(x - Float64(y * a)); elseif (t <= 0.000106) tmp = Float64(x - a); elseif (t <= 3.8e+162) tmp = t_1; else tmp = Float64(x + Float64(a / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (a / t)); tmp = 0.0; if (t <= -2.6e-14) tmp = t_1; elseif (t <= -4e-277) tmp = x - a; elseif (t <= 1.8e-134) tmp = x - (y * a); elseif (t <= 0.000106) tmp = x - a; elseif (t <= 3.8e+162) tmp = t_1; else tmp = x + (a / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e-14], t$95$1, If[LessEqual[t, -4e-277], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.8e-134], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.000106], N[(x - a), $MachinePrecision], If[LessEqual[t, 3.8e+162], t$95$1, N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a}{t}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{-14}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-277}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-134}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 0.000106:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{+162}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -2.59999999999999997e-14 or 1.06e-4 < t < 3.80000000000000024e162Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 75.8%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around inf 74.9%
Taylor expanded in x around 0 74.9%
mul-1-neg74.9%
sub-neg74.9%
*-commutative74.9%
associate-*r/82.9%
Simplified82.9%
if -2.59999999999999997e-14 < t < -3.99999999999999988e-277 or 1.79999999999999995e-134 < t < 1.06e-4Initial program 97.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 70.8%
if -3.99999999999999988e-277 < t < 1.79999999999999995e-134Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 77.8%
if 3.80000000000000024e162 < t Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 92.4%
Taylor expanded in y around 0 81.2%
cancel-sign-sub-inv81.2%
metadata-eval81.2%
*-lft-identity81.2%
+-commutative81.2%
associate-/l*92.4%
Simplified92.4%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.6e-14)
(- x (* y (/ a t)))
(if (<= t -7.8e-278)
(- x a)
(if (<= t 2.1e-134)
(- x (* y a))
(if (<= t 0.000106)
(- x a)
(if (<= t 4.2e+162) (- x (/ (* y a) t)) (+ x (/ a (/ t z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.6e-14) {
tmp = x - (y * (a / t));
} else if (t <= -7.8e-278) {
tmp = x - a;
} else if (t <= 2.1e-134) {
tmp = x - (y * a);
} else if (t <= 0.000106) {
tmp = x - a;
} else if (t <= 4.2e+162) {
tmp = x - ((y * a) / t);
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.6d-14)) then
tmp = x - (y * (a / t))
else if (t <= (-7.8d-278)) then
tmp = x - a
else if (t <= 2.1d-134) then
tmp = x - (y * a)
else if (t <= 0.000106d0) then
tmp = x - a
else if (t <= 4.2d+162) then
tmp = x - ((y * a) / t)
else
tmp = x + (a / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.6e-14) {
tmp = x - (y * (a / t));
} else if (t <= -7.8e-278) {
tmp = x - a;
} else if (t <= 2.1e-134) {
tmp = x - (y * a);
} else if (t <= 0.000106) {
tmp = x - a;
} else if (t <= 4.2e+162) {
tmp = x - ((y * a) / t);
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.6e-14: tmp = x - (y * (a / t)) elif t <= -7.8e-278: tmp = x - a elif t <= 2.1e-134: tmp = x - (y * a) elif t <= 0.000106: tmp = x - a elif t <= 4.2e+162: tmp = x - ((y * a) / t) else: tmp = x + (a / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.6e-14) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (t <= -7.8e-278) tmp = Float64(x - a); elseif (t <= 2.1e-134) tmp = Float64(x - Float64(y * a)); elseif (t <= 0.000106) tmp = Float64(x - a); elseif (t <= 4.2e+162) tmp = Float64(x - Float64(Float64(y * a) / t)); else tmp = Float64(x + Float64(a / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.6e-14) tmp = x - (y * (a / t)); elseif (t <= -7.8e-278) tmp = x - a; elseif (t <= 2.1e-134) tmp = x - (y * a); elseif (t <= 0.000106) tmp = x - a; elseif (t <= 4.2e+162) tmp = x - ((y * a) / t); else tmp = x + (a / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.6e-14], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.8e-278], N[(x - a), $MachinePrecision], If[LessEqual[t, 2.1e-134], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.000106], N[(x - a), $MachinePrecision], If[LessEqual[t, 4.2e+162], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-14}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-278}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-134}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 0.000106:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+162}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -2.59999999999999997e-14Initial program 98.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 71.6%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in t around inf 70.4%
Taylor expanded in x around 0 70.4%
mul-1-neg70.4%
sub-neg70.4%
*-commutative70.4%
associate-*r/83.3%
Simplified83.3%
if -2.59999999999999997e-14 < t < -7.8000000000000002e-278 or 2.0999999999999999e-134 < t < 1.06e-4Initial program 97.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 70.8%
if -7.8000000000000002e-278 < t < 2.0999999999999999e-134Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 77.8%
if 1.06e-4 < t < 4.2000000000000001e162Initial program 99.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 82.9%
associate-/l*82.8%
Simplified82.8%
Taylor expanded in t around inf 82.3%
if 4.2000000000000001e162 < t Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 92.4%
Taylor expanded in y around 0 81.2%
cancel-sign-sub-inv81.2%
metadata-eval81.2%
*-lft-identity81.2%
+-commutative81.2%
associate-/l*92.4%
Simplified92.4%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (* (- y z) (/ -1.0 z))))))
(if (<= z -1.12e+167)
(+ x (/ a (+ (/ t z) -1.0)))
(if (<= z -7.5e+64)
t_1
(if (<= z -2700.0)
(+ x (/ a (+ -1.0 (/ (+ t 1.0) z))))
(if (<= z 105.0) (- x (* a (/ y (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * ((y - z) * (-1.0 / z)));
double tmp;
if (z <= -1.12e+167) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= -7.5e+64) {
tmp = t_1;
} else if (z <= -2700.0) {
tmp = x + (a / (-1.0 + ((t + 1.0) / z)));
} else if (z <= 105.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (a * ((y - z) * ((-1.0d0) / z)))
if (z <= (-1.12d+167)) then
tmp = x + (a / ((t / z) + (-1.0d0)))
else if (z <= (-7.5d+64)) then
tmp = t_1
else if (z <= (-2700.0d0)) then
tmp = x + (a / ((-1.0d0) + ((t + 1.0d0) / z)))
else if (z <= 105.0d0) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * ((y - z) * (-1.0 / z)));
double tmp;
if (z <= -1.12e+167) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= -7.5e+64) {
tmp = t_1;
} else if (z <= -2700.0) {
tmp = x + (a / (-1.0 + ((t + 1.0) / z)));
} else if (z <= 105.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * ((y - z) * (-1.0 / z))) tmp = 0 if z <= -1.12e+167: tmp = x + (a / ((t / z) + -1.0)) elif z <= -7.5e+64: tmp = t_1 elif z <= -2700.0: tmp = x + (a / (-1.0 + ((t + 1.0) / z))) elif z <= 105.0: tmp = x - (a * (y / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(Float64(y - z) * Float64(-1.0 / z)))) tmp = 0.0 if (z <= -1.12e+167) tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); elseif (z <= -7.5e+64) tmp = t_1; elseif (z <= -2700.0) tmp = Float64(x + Float64(a / Float64(-1.0 + Float64(Float64(t + 1.0) / z)))); elseif (z <= 105.0) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * ((y - z) * (-1.0 / z))); tmp = 0.0; if (z <= -1.12e+167) tmp = x + (a / ((t / z) + -1.0)); elseif (z <= -7.5e+64) tmp = t_1; elseif (z <= -2700.0) tmp = x + (a / (-1.0 + ((t + 1.0) / z))); elseif (z <= 105.0) tmp = x - (a * (y / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(N[(y - z), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e+167], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7.5e+64], t$95$1, If[LessEqual[z, -2700.0], N[(x + N[(a / N[(-1.0 + N[(N[(t + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 105.0], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \left(\left(y - z\right) \cdot \frac{-1}{z}\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+167}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2700:\\
\;\;\;\;x + \frac{a}{-1 + \frac{t + 1}{z}}\\
\mathbf{elif}\;z \leq 105:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.11999999999999999e167Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 61.1%
sub-neg61.1%
mul-1-neg61.1%
remove-double-neg61.1%
associate-/l*100.0%
div-sub100.0%
*-inverses100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
if -1.11999999999999999e167 < z < -7.5000000000000005e64 or 105 < z Initial program 96.6%
associate-/r/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 86.2%
if -7.5000000000000005e64 < z < -2700Initial program 99.5%
associate-/r/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 89.2%
sub-neg89.2%
mul-1-neg89.2%
remove-double-neg89.2%
associate-/l*99.8%
div-sub99.8%
*-inverses99.8%
Simplified99.8%
if -2700 < z < 105Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- y z) (/ (- z) a)))) (t_2 (+ x (/ a (+ (/ t z) -1.0)))))
(if (<= z -4.1e+193)
t_2
(if (<= z -4.5e+64)
t_1
(if (<= z -1820000.0)
t_2
(if (<= z 1550.0) (- x (* a (/ y (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) / (-z / a));
double t_2 = x + (a / ((t / z) + -1.0));
double tmp;
if (z <= -4.1e+193) {
tmp = t_2;
} else if (z <= -4.5e+64) {
tmp = t_1;
} else if (z <= -1820000.0) {
tmp = t_2;
} else if (z <= 1550.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - ((y - z) / (-z / a))
t_2 = x + (a / ((t / z) + (-1.0d0)))
if (z <= (-4.1d+193)) then
tmp = t_2
else if (z <= (-4.5d+64)) then
tmp = t_1
else if (z <= (-1820000.0d0)) then
tmp = t_2
else if (z <= 1550.0d0) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) / (-z / a));
double t_2 = x + (a / ((t / z) + -1.0));
double tmp;
if (z <= -4.1e+193) {
tmp = t_2;
} else if (z <= -4.5e+64) {
tmp = t_1;
} else if (z <= -1820000.0) {
tmp = t_2;
} else if (z <= 1550.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y - z) / (-z / a)) t_2 = x + (a / ((t / z) + -1.0)) tmp = 0 if z <= -4.1e+193: tmp = t_2 elif z <= -4.5e+64: tmp = t_1 elif z <= -1820000.0: tmp = t_2 elif z <= 1550.0: tmp = x - (a * (y / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y - z) / Float64(Float64(-z) / a))) t_2 = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))) tmp = 0.0 if (z <= -4.1e+193) tmp = t_2; elseif (z <= -4.5e+64) tmp = t_1; elseif (z <= -1820000.0) tmp = t_2; elseif (z <= 1550.0) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y - z) / (-z / a)); t_2 = x + (a / ((t / z) + -1.0)); tmp = 0.0; if (z <= -4.1e+193) tmp = t_2; elseif (z <= -4.5e+64) tmp = t_1; elseif (z <= -1820000.0) tmp = t_2; elseif (z <= 1550.0) tmp = x - (a * (y / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+193], t$95$2, If[LessEqual[z, -4.5e+64], t$95$1, If[LessEqual[z, -1820000.0], t$95$2, If[LessEqual[z, 1550.0], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y - z}{\frac{-z}{a}}\\
t_2 := x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+193}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1820000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1550:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.0999999999999997e193 or -4.49999999999999973e64 < z < -1.82e6Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 63.0%
sub-neg63.0%
mul-1-neg63.0%
remove-double-neg63.0%
associate-/l*99.9%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in t around inf 98.1%
if -4.0999999999999997e193 < z < -4.49999999999999973e64 or 1550 < z Initial program 96.9%
Taylor expanded in z around inf 84.3%
mul-1-neg84.3%
distribute-neg-frac84.3%
Simplified84.3%
if -1.82e6 < z < 1550Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Final simplification90.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- y z) (/ (- z) a)))))
(if (<= z -1e+194)
(+ x (/ a (+ (/ t z) -1.0)))
(if (<= z -1.95e+65)
t_1
(if (<= z -7500.0)
(+ x (/ a (+ -1.0 (/ (+ t 1.0) z))))
(if (<= z 1450.0) (- x (* a (/ y (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) / (-z / a));
double tmp;
if (z <= -1e+194) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= -1.95e+65) {
tmp = t_1;
} else if (z <= -7500.0) {
tmp = x + (a / (-1.0 + ((t + 1.0) / z)));
} else if (z <= 1450.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - ((y - z) / (-z / a))
if (z <= (-1d+194)) then
tmp = x + (a / ((t / z) + (-1.0d0)))
else if (z <= (-1.95d+65)) then
tmp = t_1
else if (z <= (-7500.0d0)) then
tmp = x + (a / ((-1.0d0) + ((t + 1.0d0) / z)))
else if (z <= 1450.0d0) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) / (-z / a));
double tmp;
if (z <= -1e+194) {
tmp = x + (a / ((t / z) + -1.0));
} else if (z <= -1.95e+65) {
tmp = t_1;
} else if (z <= -7500.0) {
tmp = x + (a / (-1.0 + ((t + 1.0) / z)));
} else if (z <= 1450.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y - z) / (-z / a)) tmp = 0 if z <= -1e+194: tmp = x + (a / ((t / z) + -1.0)) elif z <= -1.95e+65: tmp = t_1 elif z <= -7500.0: tmp = x + (a / (-1.0 + ((t + 1.0) / z))) elif z <= 1450.0: tmp = x - (a * (y / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y - z) / Float64(Float64(-z) / a))) tmp = 0.0 if (z <= -1e+194) tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); elseif (z <= -1.95e+65) tmp = t_1; elseif (z <= -7500.0) tmp = Float64(x + Float64(a / Float64(-1.0 + Float64(Float64(t + 1.0) / z)))); elseif (z <= 1450.0) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y - z) / (-z / a)); tmp = 0.0; if (z <= -1e+194) tmp = x + (a / ((t / z) + -1.0)); elseif (z <= -1.95e+65) tmp = t_1; elseif (z <= -7500.0) tmp = x + (a / (-1.0 + ((t + 1.0) / z))); elseif (z <= 1450.0) tmp = x - (a * (y / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e+194], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e+65], t$95$1, If[LessEqual[z, -7500.0], N[(x + N[(a / N[(-1.0 + N[(N[(t + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1450.0], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y - z}{\frac{-z}{a}}\\
\mathbf{if}\;z \leq -1 \cdot 10^{+194}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{+65}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7500:\\
\;\;\;\;x + \frac{a}{-1 + \frac{t + 1}{z}}\\
\mathbf{elif}\;z \leq 1450:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.99999999999999945e193Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 54.3%
sub-neg54.3%
mul-1-neg54.3%
remove-double-neg54.3%
associate-/l*99.9%
div-sub99.9%
*-inverses99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
if -9.99999999999999945e193 < z < -1.9499999999999999e65 or 1450 < z Initial program 96.9%
Taylor expanded in z around inf 84.3%
mul-1-neg84.3%
distribute-neg-frac84.3%
Simplified84.3%
if -1.9499999999999999e65 < z < -7500Initial program 99.5%
associate-/r/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 89.2%
sub-neg89.2%
mul-1-neg89.2%
remove-double-neg89.2%
associate-/l*99.8%
div-sub99.8%
*-inverses99.8%
Simplified99.8%
if -7500 < z < 1450Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ (/ t z) -1.0)))))
(if (<= z -1550000.0)
t_1
(if (<= z 1.05)
(- x (* a (/ y (+ t 1.0))))
(if (or (<= z 7.8e+67) (not (<= z 2.8e+153)))
t_1
(+ x (* y (/ a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((t / z) + -1.0));
double tmp;
if (z <= -1550000.0) {
tmp = t_1;
} else if (z <= 1.05) {
tmp = x - (a * (y / (t + 1.0)));
} else if ((z <= 7.8e+67) || !(z <= 2.8e+153)) {
tmp = t_1;
} else {
tmp = x + (y * (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a / ((t / z) + (-1.0d0)))
if (z <= (-1550000.0d0)) then
tmp = t_1
else if (z <= 1.05d0) then
tmp = x - (a * (y / (t + 1.0d0)))
else if ((z <= 7.8d+67) .or. (.not. (z <= 2.8d+153))) then
tmp = t_1
else
tmp = x + (y * (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((t / z) + -1.0));
double tmp;
if (z <= -1550000.0) {
tmp = t_1;
} else if (z <= 1.05) {
tmp = x - (a * (y / (t + 1.0)));
} else if ((z <= 7.8e+67) || !(z <= 2.8e+153)) {
tmp = t_1;
} else {
tmp = x + (y * (a / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / ((t / z) + -1.0)) tmp = 0 if z <= -1550000.0: tmp = t_1 elif z <= 1.05: tmp = x - (a * (y / (t + 1.0))) elif (z <= 7.8e+67) or not (z <= 2.8e+153): tmp = t_1 else: tmp = x + (y * (a / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))) tmp = 0.0 if (z <= -1550000.0) tmp = t_1; elseif (z <= 1.05) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif ((z <= 7.8e+67) || !(z <= 2.8e+153)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / ((t / z) + -1.0)); tmp = 0.0; if (z <= -1550000.0) tmp = t_1; elseif (z <= 1.05) tmp = x - (a * (y / (t + 1.0))); elseif ((z <= 7.8e+67) || ~((z <= 2.8e+153))) tmp = t_1; else tmp = x + (y * (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1550000.0], t$95$1, If[LessEqual[z, 1.05], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 7.8e+67], N[Not[LessEqual[z, 2.8e+153]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{if}\;z \leq -1550000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.05:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+67} \lor \neg \left(z \leq 2.8 \cdot 10^{+153}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\end{array}
\end{array}
if z < -1.55e6 or 1.05000000000000004 < z < 7.80000000000000013e67 or 2.79999999999999985e153 < z Initial program 96.4%
associate-/r/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 66.1%
sub-neg66.1%
mul-1-neg66.1%
remove-double-neg66.1%
associate-/l*87.5%
div-sub87.5%
*-inverses87.5%
Simplified87.5%
Taylor expanded in t around inf 86.9%
if -1.55e6 < z < 1.05000000000000004Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
if 7.80000000000000013e67 < z < 2.79999999999999985e153Initial program 99.9%
Taylor expanded in z around inf 86.4%
mul-1-neg86.4%
distribute-neg-frac86.4%
Simplified86.4%
Taylor expanded in y around inf 68.7%
associate-*r/68.7%
associate-*r*68.7%
neg-mul-168.7%
Simplified68.7%
Taylor expanded in a around 0 68.7%
mul-1-neg68.7%
*-commutative68.7%
associate-*r/82.0%
distribute-rgt-neg-in82.0%
Simplified82.0%
Final simplification89.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ (/ t z) -1.0)))))
(if (<= z -16500.0)
t_1
(if (<= z 110.0)
(- x (* a (/ y (+ t 1.0))))
(if (or (<= z 1e+68) (not (<= z 2.9e+153)))
t_1
(- x (* a (/ y (- 1.0 z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((t / z) + -1.0));
double tmp;
if (z <= -16500.0) {
tmp = t_1;
} else if (z <= 110.0) {
tmp = x - (a * (y / (t + 1.0)));
} else if ((z <= 1e+68) || !(z <= 2.9e+153)) {
tmp = t_1;
} else {
tmp = x - (a * (y / (1.0 - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a / ((t / z) + (-1.0d0)))
if (z <= (-16500.0d0)) then
tmp = t_1
else if (z <= 110.0d0) then
tmp = x - (a * (y / (t + 1.0d0)))
else if ((z <= 1d+68) .or. (.not. (z <= 2.9d+153))) then
tmp = t_1
else
tmp = x - (a * (y / (1.0d0 - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((t / z) + -1.0));
double tmp;
if (z <= -16500.0) {
tmp = t_1;
} else if (z <= 110.0) {
tmp = x - (a * (y / (t + 1.0)));
} else if ((z <= 1e+68) || !(z <= 2.9e+153)) {
tmp = t_1;
} else {
tmp = x - (a * (y / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / ((t / z) + -1.0)) tmp = 0 if z <= -16500.0: tmp = t_1 elif z <= 110.0: tmp = x - (a * (y / (t + 1.0))) elif (z <= 1e+68) or not (z <= 2.9e+153): tmp = t_1 else: tmp = x - (a * (y / (1.0 - z))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))) tmp = 0.0 if (z <= -16500.0) tmp = t_1; elseif (z <= 110.0) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif ((z <= 1e+68) || !(z <= 2.9e+153)) tmp = t_1; else tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / ((t / z) + -1.0)); tmp = 0.0; if (z <= -16500.0) tmp = t_1; elseif (z <= 110.0) tmp = x - (a * (y / (t + 1.0))); elseif ((z <= 1e+68) || ~((z <= 2.9e+153))) tmp = t_1; else tmp = x - (a * (y / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -16500.0], t$95$1, If[LessEqual[z, 110.0], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 1e+68], N[Not[LessEqual[z, 2.9e+153]], $MachinePrecision]], t$95$1, N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{t}{z} + -1}\\
\mathbf{if}\;z \leq -16500:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 110:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 10^{+68} \lor \neg \left(z \leq 2.9 \cdot 10^{+153}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{1 - z}\\
\end{array}
\end{array}
if z < -16500 or 110 < z < 9.99999999999999953e67 or 2.90000000000000002e153 < z Initial program 96.4%
associate-/r/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 66.1%
sub-neg66.1%
mul-1-neg66.1%
remove-double-neg66.1%
associate-/l*87.5%
div-sub87.5%
*-inverses87.5%
Simplified87.5%
Taylor expanded in t around inf 86.9%
if -16500 < z < 110Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
if 9.99999999999999953e67 < z < 2.90000000000000002e153Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 86.4%
Taylor expanded in y around inf 82.0%
Final simplification89.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -75000000.0)
(+ x (/ (- z y) (/ t a)))
(if (<= t 0.00013)
(+ x (* a (/ (- z y) (- 1.0 z))))
(if (<= t 2.8e+112)
(- x (/ a (/ (+ (- t z) 1.0) y)))
(+ x (/ a (+ (/ t z) -1.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -75000000.0) {
tmp = x + ((z - y) / (t / a));
} else if (t <= 0.00013) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else if (t <= 2.8e+112) {
tmp = x - (a / (((t - z) + 1.0) / y));
} else {
tmp = x + (a / ((t / z) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-75000000.0d0)) then
tmp = x + ((z - y) / (t / a))
else if (t <= 0.00013d0) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else if (t <= 2.8d+112) then
tmp = x - (a / (((t - z) + 1.0d0) / y))
else
tmp = x + (a / ((t / z) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -75000000.0) {
tmp = x + ((z - y) / (t / a));
} else if (t <= 0.00013) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else if (t <= 2.8e+112) {
tmp = x - (a / (((t - z) + 1.0) / y));
} else {
tmp = x + (a / ((t / z) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -75000000.0: tmp = x + ((z - y) / (t / a)) elif t <= 0.00013: tmp = x + (a * ((z - y) / (1.0 - z))) elif t <= 2.8e+112: tmp = x - (a / (((t - z) + 1.0) / y)) else: tmp = x + (a / ((t / z) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -75000000.0) tmp = Float64(x + Float64(Float64(z - y) / Float64(t / a))); elseif (t <= 0.00013) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); elseif (t <= 2.8e+112) tmp = Float64(x - Float64(a / Float64(Float64(Float64(t - z) + 1.0) / y))); else tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -75000000.0) tmp = x + ((z - y) / (t / a)); elseif (t <= 0.00013) tmp = x + (a * ((z - y) / (1.0 - z))); elseif (t <= 2.8e+112) tmp = x - (a / (((t - z) + 1.0) / y)); else tmp = x + (a / ((t / z) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -75000000.0], N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00013], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+112], N[(x - N[(a / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -75000000:\\
\;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{elif}\;t \leq 0.00013:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+112}:\\
\;\;\;\;x - \frac{a}{\frac{\left(t - z\right) + 1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\end{array}
\end{array}
if t < -7.5e7Initial program 98.2%
Taylor expanded in t around inf 92.4%
if -7.5e7 < t < 1.29999999999999989e-4Initial program 98.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 99.6%
if 1.29999999999999989e-4 < t < 2.8000000000000001e112Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 95.4%
associate-/l*99.8%
associate--l+99.8%
Simplified99.8%
if 2.8000000000000001e112 < t Initial program 97.3%
associate-/r/99.9%
Simplified99.9%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 76.6%
sub-neg76.6%
mul-1-neg76.6%
remove-double-neg76.6%
associate-/l*92.6%
div-sub92.6%
*-inverses92.6%
Simplified92.6%
Taylor expanded in t around inf 92.6%
Final simplification97.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -3.5e-33)
(- x a)
(if (<= z 8e-169)
t_1
(if (<= z 6.2e-65) (+ x (* z a)) (if (<= z 13.0) t_1 (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -3.5e-33) {
tmp = x - a;
} else if (z <= 8e-169) {
tmp = t_1;
} else if (z <= 6.2e-65) {
tmp = x + (z * a);
} else if (z <= 13.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * a)
if (z <= (-3.5d-33)) then
tmp = x - a
else if (z <= 8d-169) then
tmp = t_1
else if (z <= 6.2d-65) then
tmp = x + (z * a)
else if (z <= 13.0d0) then
tmp = t_1
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -3.5e-33) {
tmp = x - a;
} else if (z <= 8e-169) {
tmp = t_1;
} else if (z <= 6.2e-65) {
tmp = x + (z * a);
} else if (z <= 13.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -3.5e-33: tmp = x - a elif z <= 8e-169: tmp = t_1 elif z <= 6.2e-65: tmp = x + (z * a) elif z <= 13.0: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -3.5e-33) tmp = Float64(x - a); elseif (z <= 8e-169) tmp = t_1; elseif (z <= 6.2e-65) tmp = Float64(x + Float64(z * a)); elseif (z <= 13.0) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -3.5e-33) tmp = x - a; elseif (z <= 8e-169) tmp = t_1; elseif (z <= 6.2e-65) tmp = x + (z * a); elseif (z <= 13.0) tmp = t_1; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-33], N[(x - a), $MachinePrecision], If[LessEqual[z, 8e-169], t$95$1, If[LessEqual[z, 6.2e-65], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 13.0], t$95$1, N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-33}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-65}:\\
\;\;\;\;x + z \cdot a\\
\mathbf{elif}\;z \leq 13:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.4999999999999999e-33 or 13 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 72.8%
if -3.4999999999999999e-33 < z < 8.00000000000000016e-169 or 6.20000000000000032e-65 < z < 13Initial program 99.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 75.0%
Taylor expanded in z around 0 73.5%
if 8.00000000000000016e-169 < z < 6.20000000000000032e-65Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
clear-num100.0%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 89.2%
sub-neg89.2%
mul-1-neg89.2%
remove-double-neg89.2%
associate-/l*89.2%
div-sub89.2%
*-inverses89.2%
Simplified89.2%
Taylor expanded in z around 0 89.2%
Taylor expanded in t around 0 89.2%
Final simplification74.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -460000.0)
(+ x (/ (- z y) (/ t a)))
(if (<= t 1.5e+47)
(+ x (* a (/ (- z y) (- 1.0 z))))
(+ x (/ a (+ (/ t z) -1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -460000.0) {
tmp = x + ((z - y) / (t / a));
} else if (t <= 1.5e+47) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a / ((t / z) + -1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-460000.0d0)) then
tmp = x + ((z - y) / (t / a))
else if (t <= 1.5d+47) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else
tmp = x + (a / ((t / z) + (-1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -460000.0) {
tmp = x + ((z - y) / (t / a));
} else if (t <= 1.5e+47) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x + (a / ((t / z) + -1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -460000.0: tmp = x + ((z - y) / (t / a)) elif t <= 1.5e+47: tmp = x + (a * ((z - y) / (1.0 - z))) else: tmp = x + (a / ((t / z) + -1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -460000.0) tmp = Float64(x + Float64(Float64(z - y) / Float64(t / a))); elseif (t <= 1.5e+47) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); else tmp = Float64(x + Float64(a / Float64(Float64(t / z) + -1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -460000.0) tmp = x + ((z - y) / (t / a)); elseif (t <= 1.5e+47) tmp = x + (a * ((z - y) / (1.0 - z))); else tmp = x + (a / ((t / z) + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -460000.0], N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+47], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(N[(t / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -460000:\\
\;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+47}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z} + -1}\\
\end{array}
\end{array}
if t < -4.6e5Initial program 98.2%
Taylor expanded in t around inf 92.4%
if -4.6e5 < t < 1.5000000000000001e47Initial program 98.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 98.4%
if 1.5000000000000001e47 < t Initial program 97.8%
associate-/r/99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 74.2%
sub-neg74.2%
mul-1-neg74.2%
remove-double-neg74.2%
associate-/l*86.8%
div-sub86.8%
*-inverses86.8%
Simplified86.8%
Taylor expanded in t around inf 86.8%
Final simplification94.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.0) (not (<= z 1.12e-33))) (- x a) (+ x (* z a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.0) || !(z <= 1.12e-33)) {
tmp = x - a;
} else {
tmp = x + (z * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= 1.12d-33))) then
tmp = x - a
else
tmp = x + (z * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.0) || !(z <= 1.12e-33)) {
tmp = x - a;
} else {
tmp = x + (z * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.0) or not (z <= 1.12e-33): tmp = x - a else: tmp = x + (z * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.12e-33)) tmp = Float64(x - a); else tmp = Float64(x + Float64(z * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.0) || ~((z <= 1.12e-33))) tmp = x - a; else tmp = x + (z * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.12e-33]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1.12 \cdot 10^{-33}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot a\\
\end{array}
\end{array}
if z < -1 or 1.11999999999999999e-33 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 71.5%
if -1 < z < 1.11999999999999999e-33Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
clear-num99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 70.1%
sub-neg70.1%
mul-1-neg70.1%
remove-double-neg70.1%
associate-/l*70.1%
div-sub70.1%
*-inverses70.1%
Simplified70.1%
Taylor expanded in z around 0 70.1%
Taylor expanded in t around 0 66.2%
Final simplification69.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -26000.0) (not (<= z 1.05e-33))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -26000.0) || !(z <= 1.05e-33)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-26000.0d0)) .or. (.not. (z <= 1.05d-33))) then
tmp = x - a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -26000.0) || !(z <= 1.05e-33)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -26000.0) or not (z <= 1.05e-33): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -26000.0) || !(z <= 1.05e-33)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -26000.0) || ~((z <= 1.05e-33))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -26000.0], N[Not[LessEqual[z, 1.05e-33]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -26000 \lor \neg \left(z \leq 1.05 \cdot 10^{-33}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -26000 or 1.05e-33 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 72.0%
if -26000 < z < 1.05e-33Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around inf 63.8%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 56.7%
Final simplification56.7%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))