
(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 18 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 (/ (- y z) (+ -1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
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 * ((y - z) / ((-1.0d0) + (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 + (z - t))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 + (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 + \left(z - t\right)}
\end{array}
Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* a (/ y z)) a))))
(if (<= z -1.95e+149)
t_1
(if (<= z -2e+24)
(- x (* a (/ (- y z) t)))
(if (or (<= z -3.3e-5) (not (<= z 7.7e+18)))
t_1
(+ x (* a (/ y (- -1.0 t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a * (y / z)) - a);
double tmp;
if (z <= -1.95e+149) {
tmp = t_1;
} else if (z <= -2e+24) {
tmp = x - (a * ((y - z) / t));
} else if ((z <= -3.3e-5) || !(z <= 7.7e+18)) {
tmp = t_1;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
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)) - a)
if (z <= (-1.95d+149)) then
tmp = t_1
else if (z <= (-2d+24)) then
tmp = x - (a * ((y - z) / t))
else if ((z <= (-3.3d-5)) .or. (.not. (z <= 7.7d+18))) then
tmp = t_1
else
tmp = x + (a * (y / ((-1.0d0) - t)))
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)) - a);
double tmp;
if (z <= -1.95e+149) {
tmp = t_1;
} else if (z <= -2e+24) {
tmp = x - (a * ((y - z) / t));
} else if ((z <= -3.3e-5) || !(z <= 7.7e+18)) {
tmp = t_1;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a * (y / z)) - a) tmp = 0 if z <= -1.95e+149: tmp = t_1 elif z <= -2e+24: tmp = x - (a * ((y - z) / t)) elif (z <= -3.3e-5) or not (z <= 7.7e+18): tmp = t_1 else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (z <= -1.95e+149) tmp = t_1; elseif (z <= -2e+24) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / t))); elseif ((z <= -3.3e-5) || !(z <= 7.7e+18)) tmp = t_1; else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a * (y / z)) - a); tmp = 0.0; if (z <= -1.95e+149) tmp = t_1; elseif (z <= -2e+24) tmp = x - (a * ((y - z) / t)); elseif ((z <= -3.3e-5) || ~((z <= 7.7e+18))) tmp = t_1; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+149], t$95$1, If[LessEqual[z, -2e+24], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.3e-5], N[Not[LessEqual[z, 7.7e+18]], $MachinePrecision]], t$95$1, N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+24}:\\
\;\;\;\;x - a \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-5} \lor \neg \left(z \leq 7.7 \cdot 10^{+18}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -1.95e149 or -2e24 < z < -3.3000000000000003e-5 or 7.7e18 < z Initial program 95.3%
Taylor expanded in z around inf 84.5%
mul-1-neg84.5%
distribute-neg-frac284.5%
Simplified84.5%
Taylor expanded in y around 0 78.6%
mul-1-neg78.6%
*-commutative78.6%
associate-*r/88.1%
unsub-neg88.1%
associate-*r/78.6%
*-commutative78.6%
associate-/l*88.1%
Simplified88.1%
if -1.95e149 < z < -2e24Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 84.0%
if -3.3000000000000003e-5 < z < 7.7e18Initial program 98.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 92.1%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* a (/ y z)) a))))
(if (<= z -1.95e+149)
t_1
(if (<= z -1.85e+24)
(+ x (/ a (/ t (- z y))))
(if (or (<= z -3.3e-5) (not (<= z 2.55e+19)))
t_1
(+ x (* a (/ y (- -1.0 t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a * (y / z)) - a);
double tmp;
if (z <= -1.95e+149) {
tmp = t_1;
} else if (z <= -1.85e+24) {
tmp = x + (a / (t / (z - y)));
} else if ((z <= -3.3e-5) || !(z <= 2.55e+19)) {
tmp = t_1;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
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)) - a)
if (z <= (-1.95d+149)) then
tmp = t_1
else if (z <= (-1.85d+24)) then
tmp = x + (a / (t / (z - y)))
else if ((z <= (-3.3d-5)) .or. (.not. (z <= 2.55d+19))) then
tmp = t_1
else
tmp = x + (a * (y / ((-1.0d0) - t)))
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)) - a);
double tmp;
if (z <= -1.95e+149) {
tmp = t_1;
} else if (z <= -1.85e+24) {
tmp = x + (a / (t / (z - y)));
} else if ((z <= -3.3e-5) || !(z <= 2.55e+19)) {
tmp = t_1;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a * (y / z)) - a) tmp = 0 if z <= -1.95e+149: tmp = t_1 elif z <= -1.85e+24: tmp = x + (a / (t / (z - y))) elif (z <= -3.3e-5) or not (z <= 2.55e+19): tmp = t_1 else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (z <= -1.95e+149) tmp = t_1; elseif (z <= -1.85e+24) tmp = Float64(x + Float64(a / Float64(t / Float64(z - y)))); elseif ((z <= -3.3e-5) || !(z <= 2.55e+19)) tmp = t_1; else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a * (y / z)) - a); tmp = 0.0; if (z <= -1.95e+149) tmp = t_1; elseif (z <= -1.85e+24) tmp = x + (a / (t / (z - y))); elseif ((z <= -3.3e-5) || ~((z <= 2.55e+19))) tmp = t_1; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+149], t$95$1, If[LessEqual[z, -1.85e+24], N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.3e-5], N[Not[LessEqual[z, 2.55e+19]], $MachinePrecision]], t$95$1, N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-5} \lor \neg \left(z \leq 2.55 \cdot 10^{+19}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -1.95e149 or -1.85e24 < z < -3.3000000000000003e-5 or 2.55e19 < z Initial program 95.3%
Taylor expanded in z around inf 84.5%
mul-1-neg84.5%
distribute-neg-frac284.5%
Simplified84.5%
Taylor expanded in y around 0 78.6%
mul-1-neg78.6%
*-commutative78.6%
associate-*r/88.1%
unsub-neg88.1%
associate-*r/78.6%
*-commutative78.6%
associate-/l*88.1%
Simplified88.1%
if -1.95e149 < z < -1.85e24Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 84.1%
if -3.3000000000000003e-5 < z < 2.55e19Initial program 98.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 92.1%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.95e+149)
(- x a)
(if (<= z -2.5e+24)
(- x (* a (/ (- y z) t)))
(if (<= z -4.3e-7)
(+ x (* a (/ y z)))
(if (<= z 2.3e+86) (+ x (* a (/ y (- -1.0 t)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+149) {
tmp = x - a;
} else if (z <= -2.5e+24) {
tmp = x - (a * ((y - z) / t));
} else if (z <= -4.3e-7) {
tmp = x + (a * (y / z));
} else if (z <= 2.3e+86) {
tmp = x + (a * (y / (-1.0 - t)));
} 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) :: tmp
if (z <= (-1.95d+149)) then
tmp = x - a
else if (z <= (-2.5d+24)) then
tmp = x - (a * ((y - z) / t))
else if (z <= (-4.3d-7)) then
tmp = x + (a * (y / z))
else if (z <= 2.3d+86) then
tmp = x + (a * (y / ((-1.0d0) - t)))
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 tmp;
if (z <= -1.95e+149) {
tmp = x - a;
} else if (z <= -2.5e+24) {
tmp = x - (a * ((y - z) / t));
} else if (z <= -4.3e-7) {
tmp = x + (a * (y / z));
} else if (z <= 2.3e+86) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e+149: tmp = x - a elif z <= -2.5e+24: tmp = x - (a * ((y - z) / t)) elif z <= -4.3e-7: tmp = x + (a * (y / z)) elif z <= 2.3e+86: tmp = x + (a * (y / (-1.0 - t))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e+149) tmp = Float64(x - a); elseif (z <= -2.5e+24) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / t))); elseif (z <= -4.3e-7) tmp = Float64(x + Float64(a * Float64(y / z))); elseif (z <= 2.3e+86) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e+149) tmp = x - a; elseif (z <= -2.5e+24) tmp = x - (a * ((y - z) / t)); elseif (z <= -4.3e-7) tmp = x + (a * (y / z)); elseif (z <= 2.3e+86) tmp = x + (a * (y / (-1.0 - t))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+149], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.5e+24], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.3e-7], N[(x + N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+86], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;x - a \cdot \frac{y - z}{t}\\
\mathbf{elif}\;z \leq -4.3 \cdot 10^{-7}:\\
\;\;\;\;x + a \cdot \frac{y}{z}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+86}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.95e149 or 2.2999999999999999e86 < z Initial program 94.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.1%
if -1.95e149 < z < -2.50000000000000023e24Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 84.0%
if -2.50000000000000023e24 < z < -4.3000000000000001e-7Initial program 99.8%
Taylor expanded in z around inf 71.0%
mul-1-neg71.0%
distribute-neg-frac271.0%
Simplified71.0%
Taylor expanded in y around inf 62.8%
mul-1-neg62.8%
associate-/l*62.8%
distribute-rgt-neg-in62.8%
distribute-frac-neg62.8%
Simplified62.8%
if -4.3000000000000001e-7 < z < 2.2999999999999999e86Initial program 98.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 89.6%
Final simplification86.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* a (/ y z)) a))))
(if (<= z -1.95e+149)
t_1
(if (<= z -2.5e+24)
(+ x (/ a (/ t (- z y))))
(if (<= z -2.1e-12)
(- x (/ (* y a) (- 1.0 z)))
(if (<= z 8.2e+18) (+ x (* a (/ y (- -1.0 t)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a * (y / z)) - a);
double tmp;
if (z <= -1.95e+149) {
tmp = t_1;
} else if (z <= -2.5e+24) {
tmp = x + (a / (t / (z - y)));
} else if (z <= -2.1e-12) {
tmp = x - ((y * a) / (1.0 - z));
} else if (z <= 8.2e+18) {
tmp = x + (a * (y / (-1.0 - t)));
} 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)) - a)
if (z <= (-1.95d+149)) then
tmp = t_1
else if (z <= (-2.5d+24)) then
tmp = x + (a / (t / (z - y)))
else if (z <= (-2.1d-12)) then
tmp = x - ((y * a) / (1.0d0 - z))
else if (z <= 8.2d+18) then
tmp = x + (a * (y / ((-1.0d0) - t)))
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)) - a);
double tmp;
if (z <= -1.95e+149) {
tmp = t_1;
} else if (z <= -2.5e+24) {
tmp = x + (a / (t / (z - y)));
} else if (z <= -2.1e-12) {
tmp = x - ((y * a) / (1.0 - z));
} else if (z <= 8.2e+18) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a * (y / z)) - a) tmp = 0 if z <= -1.95e+149: tmp = t_1 elif z <= -2.5e+24: tmp = x + (a / (t / (z - y))) elif z <= -2.1e-12: tmp = x - ((y * a) / (1.0 - z)) elif z <= 8.2e+18: tmp = x + (a * (y / (-1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (z <= -1.95e+149) tmp = t_1; elseif (z <= -2.5e+24) tmp = Float64(x + Float64(a / Float64(t / Float64(z - y)))); elseif (z <= -2.1e-12) tmp = Float64(x - Float64(Float64(y * a) / Float64(1.0 - z))); elseif (z <= 8.2e+18) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a * (y / z)) - a); tmp = 0.0; if (z <= -1.95e+149) tmp = t_1; elseif (z <= -2.5e+24) tmp = x + (a / (t / (z - y))); elseif (z <= -2.1e-12) tmp = x - ((y * a) / (1.0 - z)); elseif (z <= 8.2e+18) tmp = x + (a * (y / (-1.0 - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+149], t$95$1, If[LessEqual[z, -2.5e+24], N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-12], N[(x - N[(N[(y * a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e+18], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-12}:\\
\;\;\;\;x - \frac{y \cdot a}{1 - z}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+18}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.95e149 or 8.2e18 < z Initial program 94.9%
Taylor expanded in z around inf 86.1%
mul-1-neg86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
*-commutative79.6%
associate-*r/90.0%
unsub-neg90.0%
associate-*r/79.6%
*-commutative79.6%
associate-/l*90.0%
Simplified90.0%
if -1.95e149 < z < -2.50000000000000023e24Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in t around inf 84.1%
if -2.50000000000000023e24 < z < -2.09999999999999994e-12Initial program 99.8%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in y around inf 71.9%
Taylor expanded in t around 0 71.9%
if -2.09999999999999994e-12 < z < 8.2e18Initial program 98.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 92.3%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* a (/ y z)) a))))
(if (<= z -2e+149)
t_1
(if (<= z -350000.0)
(+ x (/ (- z y) (/ t a)))
(if (<= z 6.6e+19) (+ x (* a (/ y (- -1.0 t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a * (y / z)) - a);
double tmp;
if (z <= -2e+149) {
tmp = t_1;
} else if (z <= -350000.0) {
tmp = x + ((z - y) / (t / a));
} else if (z <= 6.6e+19) {
tmp = x + (a * (y / (-1.0 - t)));
} 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)) - a)
if (z <= (-2d+149)) then
tmp = t_1
else if (z <= (-350000.0d0)) then
tmp = x + ((z - y) / (t / a))
else if (z <= 6.6d+19) then
tmp = x + (a * (y / ((-1.0d0) - t)))
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)) - a);
double tmp;
if (z <= -2e+149) {
tmp = t_1;
} else if (z <= -350000.0) {
tmp = x + ((z - y) / (t / a));
} else if (z <= 6.6e+19) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a * (y / z)) - a) tmp = 0 if z <= -2e+149: tmp = t_1 elif z <= -350000.0: tmp = x + ((z - y) / (t / a)) elif z <= 6.6e+19: tmp = x + (a * (y / (-1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (z <= -2e+149) tmp = t_1; elseif (z <= -350000.0) tmp = Float64(x + Float64(Float64(z - y) / Float64(t / a))); elseif (z <= 6.6e+19) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a * (y / z)) - a); tmp = 0.0; if (z <= -2e+149) tmp = t_1; elseif (z <= -350000.0) tmp = x + ((z - y) / (t / a)); elseif (z <= 6.6e+19) tmp = x + (a * (y / (-1.0 - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+149], t$95$1, If[LessEqual[z, -350000.0], N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e+19], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -350000:\\
\;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+19}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.0000000000000001e149 or 6.6e19 < z Initial program 94.9%
Taylor expanded in z around inf 86.1%
mul-1-neg86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
*-commutative79.6%
associate-*r/90.0%
unsub-neg90.0%
associate-*r/79.6%
*-commutative79.6%
associate-/l*90.0%
Simplified90.0%
if -2.0000000000000001e149 < z < -3.5e5Initial program 99.7%
Taylor expanded in t around inf 80.3%
if -3.5e5 < z < 6.6e19Initial program 98.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 90.9%
Final simplification89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- (* a (/ y z)) a))))
(if (<= z -2e+160)
t_1
(if (<= z -1.3e-6)
(- x (* z (/ a (+ z (- -1.0 t)))))
(if (<= z 5.1e+19) (+ x (* a (/ y (- -1.0 t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((a * (y / z)) - a);
double tmp;
if (z <= -2e+160) {
tmp = t_1;
} else if (z <= -1.3e-6) {
tmp = x - (z * (a / (z + (-1.0 - t))));
} else if (z <= 5.1e+19) {
tmp = x + (a * (y / (-1.0 - t)));
} 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)) - a)
if (z <= (-2d+160)) then
tmp = t_1
else if (z <= (-1.3d-6)) then
tmp = x - (z * (a / (z + ((-1.0d0) - t))))
else if (z <= 5.1d+19) then
tmp = x + (a * (y / ((-1.0d0) - t)))
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)) - a);
double tmp;
if (z <= -2e+160) {
tmp = t_1;
} else if (z <= -1.3e-6) {
tmp = x - (z * (a / (z + (-1.0 - t))));
} else if (z <= 5.1e+19) {
tmp = x + (a * (y / (-1.0 - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((a * (y / z)) - a) tmp = 0 if z <= -2e+160: tmp = t_1 elif z <= -1.3e-6: tmp = x - (z * (a / (z + (-1.0 - t)))) elif z <= 5.1e+19: tmp = x + (a * (y / (-1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(a * Float64(y / z)) - a)) tmp = 0.0 if (z <= -2e+160) tmp = t_1; elseif (z <= -1.3e-6) tmp = Float64(x - Float64(z * Float64(a / Float64(z + Float64(-1.0 - t))))); elseif (z <= 5.1e+19) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((a * (y / z)) - a); tmp = 0.0; if (z <= -2e+160) tmp = t_1; elseif (z <= -1.3e-6) tmp = x - (z * (a / (z + (-1.0 - t)))); elseif (z <= 5.1e+19) tmp = x + (a * (y / (-1.0 - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+160], t$95$1, If[LessEqual[z, -1.3e-6], N[(x - N[(z * N[(a / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.1e+19], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-6}:\\
\;\;\;\;x - z \cdot \frac{a}{z + \left(-1 - t\right)}\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+19}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.00000000000000001e160 or 5.1e19 < z Initial program 94.7%
Taylor expanded in z around inf 86.4%
mul-1-neg86.4%
distribute-neg-frac286.4%
Simplified86.4%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
*-commutative79.6%
associate-*r/90.5%
unsub-neg90.5%
associate-*r/79.6%
*-commutative79.6%
associate-/l*90.5%
Simplified90.5%
if -2.00000000000000001e160 < z < -1.30000000000000005e-6Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around 0 65.7%
mul-1-neg65.7%
*-commutative65.7%
associate--l+65.7%
+-commutative65.7%
associate-*r/78.0%
distribute-rgt-neg-in78.0%
distribute-neg-frac278.0%
+-commutative78.0%
distribute-neg-in78.0%
metadata-eval78.0%
unsub-neg78.0%
associate--r-78.0%
Simplified78.0%
if -1.30000000000000005e-6 < z < 5.1e19Initial program 98.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 92.1%
Final simplification89.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ z (- -1.0 t))))
(if (or (<= y -4.2e-15) (not (<= y 0.000235)))
(+ x (* a (/ y t_1)))
(- x (* z (/ a t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z + (-1.0 - t);
double tmp;
if ((y <= -4.2e-15) || !(y <= 0.000235)) {
tmp = x + (a * (y / t_1));
} else {
tmp = x - (z * (a / 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 = z + ((-1.0d0) - t)
if ((y <= (-4.2d-15)) .or. (.not. (y <= 0.000235d0))) then
tmp = x + (a * (y / t_1))
else
tmp = x - (z * (a / 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 = z + (-1.0 - t);
double tmp;
if ((y <= -4.2e-15) || !(y <= 0.000235)) {
tmp = x + (a * (y / t_1));
} else {
tmp = x - (z * (a / t_1));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z + (-1.0 - t) tmp = 0 if (y <= -4.2e-15) or not (y <= 0.000235): tmp = x + (a * (y / t_1)) else: tmp = x - (z * (a / t_1)) return tmp
function code(x, y, z, t, a) t_1 = Float64(z + Float64(-1.0 - t)) tmp = 0.0 if ((y <= -4.2e-15) || !(y <= 0.000235)) tmp = Float64(x + Float64(a * Float64(y / t_1))); else tmp = Float64(x - Float64(z * Float64(a / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z + (-1.0 - t); tmp = 0.0; if ((y <= -4.2e-15) || ~((y <= 0.000235))) tmp = x + (a * (y / t_1)); else tmp = x - (z * (a / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -4.2e-15], N[Not[LessEqual[y, 0.000235]], $MachinePrecision]], N[(x + N[(a * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(-1 - t\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{-15} \lor \neg \left(y \leq 0.000235\right):\\
\;\;\;\;x + a \cdot \frac{y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{a}{t\_1}\\
\end{array}
\end{array}
if y < -4.19999999999999962e-15 or 2.34999999999999993e-4 < y Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 87.8%
if -4.19999999999999962e-15 < y < 2.34999999999999993e-4Initial program 98.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 81.8%
mul-1-neg81.8%
*-commutative81.8%
associate--l+81.8%
+-commutative81.8%
associate-*r/93.0%
distribute-rgt-neg-in93.0%
distribute-neg-frac293.0%
+-commutative93.0%
distribute-neg-in93.0%
metadata-eval93.0%
unsub-neg93.0%
associate--r-93.0%
Simplified93.0%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ z (- -1.0 t))))
(if (or (<= y -1.45e-13) (not (<= y 1.06e+49)))
(+ x (* a (/ y t_1)))
(- x (* a (/ z t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z + (-1.0 - t);
double tmp;
if ((y <= -1.45e-13) || !(y <= 1.06e+49)) {
tmp = x + (a * (y / t_1));
} else {
tmp = x - (a * (z / 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 = z + ((-1.0d0) - t)
if ((y <= (-1.45d-13)) .or. (.not. (y <= 1.06d+49))) then
tmp = x + (a * (y / t_1))
else
tmp = x - (a * (z / 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 = z + (-1.0 - t);
double tmp;
if ((y <= -1.45e-13) || !(y <= 1.06e+49)) {
tmp = x + (a * (y / t_1));
} else {
tmp = x - (a * (z / t_1));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z + (-1.0 - t) tmp = 0 if (y <= -1.45e-13) or not (y <= 1.06e+49): tmp = x + (a * (y / t_1)) else: tmp = x - (a * (z / t_1)) return tmp
function code(x, y, z, t, a) t_1 = Float64(z + Float64(-1.0 - t)) tmp = 0.0 if ((y <= -1.45e-13) || !(y <= 1.06e+49)) tmp = Float64(x + Float64(a * Float64(y / t_1))); else tmp = Float64(x - Float64(a * Float64(z / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z + (-1.0 - t); tmp = 0.0; if ((y <= -1.45e-13) || ~((y <= 1.06e+49))) tmp = x + (a * (y / t_1)); else tmp = x - (a * (z / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -1.45e-13], N[Not[LessEqual[y, 1.06e+49]], $MachinePrecision]], N[(x + N[(a * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \left(-1 - t\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-13} \lor \neg \left(y \leq 1.06 \cdot 10^{+49}\right):\\
\;\;\;\;x + a \cdot \frac{y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{z}{t\_1}\\
\end{array}
\end{array}
if y < -1.4499999999999999e-13 or 1.06e49 < y Initial program 98.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 88.4%
if -1.4499999999999999e-13 < y < 1.06e49Initial program 96.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 94.3%
mul-1-neg94.3%
associate--l+94.3%
+-commutative94.3%
distribute-neg-frac294.3%
+-commutative94.3%
distribute-neg-in94.3%
metadata-eval94.3%
unsub-neg94.3%
associate--r-94.3%
Simplified94.3%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.95e+149) (not (<= z 1.7e+18))) (+ x (- (* a (/ y z)) a)) (+ x (/ (- y z) (/ (- -1.0 t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e+149) || !(z <= 1.7e+18)) {
tmp = x + ((a * (y / z)) - a);
} else {
tmp = x + ((y - z) / ((-1.0 - t) / 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.95d+149)) .or. (.not. (z <= 1.7d+18))) then
tmp = x + ((a * (y / z)) - a)
else
tmp = x + ((y - z) / (((-1.0d0) - t) / 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.95e+149) || !(z <= 1.7e+18)) {
tmp = x + ((a * (y / z)) - a);
} else {
tmp = x + ((y - z) / ((-1.0 - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.95e+149) or not (z <= 1.7e+18): tmp = x + ((a * (y / z)) - a) else: tmp = x + ((y - z) / ((-1.0 - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.95e+149) || !(z <= 1.7e+18)) tmp = Float64(x + Float64(Float64(a * Float64(y / z)) - a)); else tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.95e+149) || ~((z <= 1.7e+18))) tmp = x + ((a * (y / z)) - a); else tmp = x + ((y - z) / ((-1.0 - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e+149], N[Not[LessEqual[z, 1.7e+18]], $MachinePrecision]], N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149} \lor \neg \left(z \leq 1.7 \cdot 10^{+18}\right):\\
\;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\end{array}
\end{array}
if z < -1.95e149 or 1.7e18 < z Initial program 94.9%
Taylor expanded in z around inf 86.1%
mul-1-neg86.1%
distribute-neg-frac286.1%
Simplified86.1%
Taylor expanded in y around 0 79.6%
mul-1-neg79.6%
*-commutative79.6%
associate-*r/90.0%
unsub-neg90.0%
associate-*r/79.6%
*-commutative79.6%
associate-/l*90.0%
Simplified90.0%
if -1.95e149 < z < 1.7e18Initial program 98.8%
Taylor expanded in z around 0 94.2%
Final simplification92.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.5e+149) (not (<= z 8.5e+86))) (- x a) (+ x (* y (/ a (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.5e+149) || !(z <= 8.5e+86)) {
tmp = x - a;
} else {
tmp = x + (y * (a / (-1.0 - t)));
}
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 <= (-2.5d+149)) .or. (.not. (z <= 8.5d+86))) then
tmp = x - a
else
tmp = x + (y * (a / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.5e+149) || !(z <= 8.5e+86)) {
tmp = x - a;
} else {
tmp = x + (y * (a / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.5e+149) or not (z <= 8.5e+86): tmp = x - a else: tmp = x + (y * (a / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.5e+149) || !(z <= 8.5e+86)) tmp = Float64(x - a); else tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.5e+149) || ~((z <= 8.5e+86))) tmp = x - a; else tmp = x + (y * (a / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.5e+149], N[Not[LessEqual[z, 8.5e+86]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(y * N[(a / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+149} \lor \neg \left(z \leq 8.5 \cdot 10^{+86}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{a}{-1 - t}\\
\end{array}
\end{array}
if z < -2.49999999999999995e149 or 8.5000000000000005e86 < z Initial program 94.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.1%
if -2.49999999999999995e149 < z < 8.5000000000000005e86Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 79.8%
*-commutative79.8%
associate-/l*83.8%
Simplified83.8%
Final simplification84.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.95e+149) (not (<= z 2.6e+88))) (- x a) (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e+149) || !(z <= 2.6e+88)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
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.95d+149)) .or. (.not. (z <= 2.6d+88))) then
tmp = x - a
else
tmp = x + (a * (y / ((-1.0d0) - t)))
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.95e+149) || !(z <= 2.6e+88)) {
tmp = x - a;
} else {
tmp = x + (a * (y / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.95e+149) or not (z <= 2.6e+88): tmp = x - a else: tmp = x + (a * (y / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.95e+149) || !(z <= 2.6e+88)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.95e+149) || ~((z <= 2.6e+88))) tmp = x - a; else tmp = x + (a * (y / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e+149], N[Not[LessEqual[z, 2.6e+88]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149} \lor \neg \left(z \leq 2.6 \cdot 10^{+88}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\end{array}
\end{array}
if z < -1.95e149 or 2.6000000000000001e88 < z Initial program 94.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.1%
if -1.95e149 < z < 2.6000000000000001e88Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 84.6%
Final simplification84.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2e+16) (not (<= t 5.7e-5))) (- x (* y (/ a t))) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e+16) || !(t <= 5.7e-5)) {
tmp = x - (y * (a / t));
} else {
tmp = x - (y * 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 ((t <= (-2d+16)) .or. (.not. (t <= 5.7d-5))) then
tmp = x - (y * (a / t))
else
tmp = x - (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e+16) || !(t <= 5.7e-5)) {
tmp = x - (y * (a / t));
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2e+16) or not (t <= 5.7e-5): tmp = x - (y * (a / t)) else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2e+16) || !(t <= 5.7e-5)) tmp = Float64(x - Float64(y * Float64(a / t))); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2e+16) || ~((t <= 5.7e-5))) tmp = x - (y * (a / t)); else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2e+16], N[Not[LessEqual[t, 5.7e-5]], $MachinePrecision]], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+16} \lor \neg \left(t \leq 5.7 \cdot 10^{-5}\right):\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if t < -2e16 or 5.7000000000000003e-5 < t Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 83.4%
Taylor expanded in y around inf 77.0%
*-commutative77.0%
clear-num77.0%
un-div-inv77.0%
Applied egg-rr77.0%
associate-/r/76.2%
Simplified76.2%
if -2e16 < t < 5.7000000000000003e-5Initial program 97.5%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 71.8%
Taylor expanded in t around 0 71.4%
Final simplification74.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2e+16) (not (<= t 5.7e-5))) (- x (* a (/ y t))) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e+16) || !(t <= 5.7e-5)) {
tmp = x - (a * (y / t));
} else {
tmp = x - (y * 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 ((t <= (-2d+16)) .or. (.not. (t <= 5.7d-5))) then
tmp = x - (a * (y / t))
else
tmp = x - (y * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2e+16) || !(t <= 5.7e-5)) {
tmp = x - (a * (y / t));
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2e+16) or not (t <= 5.7e-5): tmp = x - (a * (y / t)) else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2e+16) || !(t <= 5.7e-5)) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2e+16) || ~((t <= 5.7e-5))) tmp = x - (a * (y / t)); else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2e+16], N[Not[LessEqual[t, 5.7e-5]], $MachinePrecision]], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+16} \lor \neg \left(t \leq 5.7 \cdot 10^{-5}\right):\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if t < -2e16 or 5.7000000000000003e-5 < t Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 83.4%
Taylor expanded in y around inf 77.0%
if -2e16 < t < 5.7000000000000003e-5Initial program 97.5%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 71.8%
Taylor expanded in t around 0 71.4%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -2e+16) (- x (* a (/ y t))) (if (<= t 5.7e-5) (- x (* y a)) (- x (/ a (/ t y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+16) {
tmp = x - (a * (y / t));
} else if (t <= 5.7e-5) {
tmp = x - (y * a);
} else {
tmp = x - (a / (t / y));
}
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 <= (-2d+16)) then
tmp = x - (a * (y / t))
else if (t <= 5.7d-5) then
tmp = x - (y * a)
else
tmp = x - (a / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e+16) {
tmp = x - (a * (y / t));
} else if (t <= 5.7e-5) {
tmp = x - (y * a);
} else {
tmp = x - (a / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e+16: tmp = x - (a * (y / t)) elif t <= 5.7e-5: tmp = x - (y * a) else: tmp = x - (a / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e+16) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (t <= 5.7e-5) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - Float64(a / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e+16) tmp = x - (a * (y / t)); elseif (t <= 5.7e-5) tmp = x - (y * a); else tmp = x - (a / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e+16], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.7e-5], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+16}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{-5}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\end{array}
\end{array}
if t < -2e16Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 81.4%
Taylor expanded in y around inf 72.7%
if -2e16 < t < 5.7000000000000003e-5Initial program 97.5%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 71.8%
Taylor expanded in t around 0 71.4%
if 5.7000000000000003e-5 < t Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in t around inf 85.2%
Taylor expanded in y around inf 80.8%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.95e+149) (not (<= z 8.8e-114))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.95e+149) || !(z <= 8.8e-114)) {
tmp = x - a;
} else {
tmp = x - (y * 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.95d+149)) .or. (.not. (z <= 8.8d-114))) then
tmp = x - a
else
tmp = x - (y * 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.95e+149) || !(z <= 8.8e-114)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.95e+149) or not (z <= 8.8e-114): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.95e+149) || !(z <= 8.8e-114)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.95e+149) || ~((z <= 8.8e-114))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.95e+149], N[Not[LessEqual[z, 8.8e-114]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+149} \lor \neg \left(z \leq 8.8 \cdot 10^{-114}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -1.95e149 or 8.80000000000000045e-114 < z Initial program 95.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.1%
if -1.95e149 < z < 8.80000000000000045e-114Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 83.5%
Taylor expanded in t around 0 71.4%
Final simplification73.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.05e+93) (not (<= z 2.3e+86))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.05e+93) || !(z <= 2.3e+86)) {
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 <= (-3.05d+93)) .or. (.not. (z <= 2.3d+86))) 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 <= -3.05e+93) || !(z <= 2.3e+86)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.05e+93) or not (z <= 2.3e+86): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.05e+93) || !(z <= 2.3e+86)) 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 <= -3.05e+93) || ~((z <= 2.3e+86))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.05e+93], N[Not[LessEqual[z, 2.3e+86]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.05 \cdot 10^{+93} \lor \neg \left(z \leq 2.3 \cdot 10^{+86}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.05e93 or 2.2999999999999999e86 < z Initial program 95.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.6%
if -3.05e93 < z < 2.2999999999999999e86Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 65.7%
Taylor expanded in y around 0 53.8%
neg-mul-153.8%
distribute-neg-frac53.8%
Simplified53.8%
Taylor expanded in x around inf 56.2%
Final simplification64.1%
(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 97.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 57.6%
Taylor expanded in y around 0 48.2%
neg-mul-148.2%
distribute-neg-frac48.2%
Simplified48.2%
Taylor expanded in x around inf 53.9%
Final simplification53.9%
(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 2024082
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))