
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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 - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - 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 - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
Initial program 83.7%
associate-*l/93.8%
Simplified93.8%
associate-/r/99.1%
Applied egg-rr99.1%
Final simplification99.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.4e+170)
(+ x y)
(if (<= z -3750.0)
(- x (* y (/ t z)))
(if (<= z -6.2e-79)
(- x (* z (/ y a)))
(if (<= z -1.46e-94)
(* y (- 1.0 (/ t z)))
(if (<= z 3.05e+71) (+ x (* y (/ t a))) (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.4e+170) {
tmp = x + y;
} else if (z <= -3750.0) {
tmp = x - (y * (t / z));
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3.05e+71) {
tmp = x + (y * (t / a));
} else {
tmp = x + 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 (z <= (-2.4d+170)) then
tmp = x + y
else if (z <= (-3750.0d0)) then
tmp = x - (y * (t / z))
else if (z <= (-6.2d-79)) then
tmp = x - (z * (y / a))
else if (z <= (-1.46d-94)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 3.05d+71) then
tmp = x + (y * (t / a))
else
tmp = x + y
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.4e+170) {
tmp = x + y;
} else if (z <= -3750.0) {
tmp = x - (y * (t / z));
} else if (z <= -6.2e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3.05e+71) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.4e+170: tmp = x + y elif z <= -3750.0: tmp = x - (y * (t / z)) elif z <= -6.2e-79: tmp = x - (z * (y / a)) elif z <= -1.46e-94: tmp = y * (1.0 - (t / z)) elif z <= 3.05e+71: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.4e+170) tmp = Float64(x + y); elseif (z <= -3750.0) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= -6.2e-79) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= -1.46e-94) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 3.05e+71) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.4e+170) tmp = x + y; elseif (z <= -3750.0) tmp = x - (y * (t / z)); elseif (z <= -6.2e-79) tmp = x - (z * (y / a)); elseif (z <= -1.46e-94) tmp = y * (1.0 - (t / z)); elseif (z <= 3.05e+71) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.4e+170], N[(x + y), $MachinePrecision], If[LessEqual[z, -3750.0], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-79], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+71], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+170}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3750:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+71}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.4e170 or 3.0500000000000002e71 < z Initial program 62.5%
associate-*l/88.7%
Simplified88.7%
Taylor expanded in z around inf 90.1%
if -2.4e170 < z < -3750Initial program 88.9%
associate-*l/99.9%
Simplified99.9%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 80.6%
associate-*r/80.6%
neg-mul-180.6%
Simplified80.6%
frac-2neg80.6%
distribute-frac-neg80.6%
distribute-neg-frac80.6%
remove-double-neg80.6%
*-un-lft-identity80.6%
*-un-lft-identity80.6%
add-sqr-sqrt9.2%
sqrt-unprod40.8%
sqr-neg40.8%
sqrt-unprod31.4%
add-sqr-sqrt40.7%
sub-neg40.7%
associate-/r/40.7%
associate-*l/37.7%
add-sqr-sqrt31.4%
sqrt-unprod37.9%
sqr-neg37.9%
Applied egg-rr75.3%
associate-*r/80.6%
Simplified80.6%
Taylor expanded in z around inf 69.5%
if -3750 < z < -6.1999999999999999e-79Initial program 99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in t around 0 75.3%
Taylor expanded in z around 0 75.8%
mul-1-neg75.8%
unsub-neg75.8%
associate-/l*70.0%
associate-/r/81.4%
Simplified81.4%
if -6.1999999999999999e-79 < z < -1.4599999999999999e-94Initial program 100.0%
associate-*l/81.2%
Simplified81.2%
Taylor expanded in a around 0 79.8%
Taylor expanded in y around inf 79.8%
if -1.4599999999999999e-94 < z < 3.0500000000000002e71Initial program 93.7%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in z around 0 85.6%
associate-/l*87.1%
associate-/r/89.4%
Simplified89.4%
Final simplification86.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -3.2e+41)
t_1
(if (<= z -5.3e-67)
(+ x (* z (/ y (- z a))))
(if (or (<= z -1.46e-94) (not (<= z 2.2e-62)))
t_1
(+ x (* y (/ t a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -3.2e+41) {
tmp = t_1;
} else if (z <= -5.3e-67) {
tmp = x + (z * (y / (z - a)));
} else if ((z <= -1.46e-94) || !(z <= 2.2e-62)) {
tmp = t_1;
} else {
tmp = x + (y * (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) :: t_1
real(8) :: tmp
t_1 = x + (y * (1.0d0 - (t / z)))
if (z <= (-3.2d+41)) then
tmp = t_1
else if (z <= (-5.3d-67)) then
tmp = x + (z * (y / (z - a)))
else if ((z <= (-1.46d-94)) .or. (.not. (z <= 2.2d-62))) then
tmp = t_1
else
tmp = x + (y * (t / 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 * (1.0 - (t / z)));
double tmp;
if (z <= -3.2e+41) {
tmp = t_1;
} else if (z <= -5.3e-67) {
tmp = x + (z * (y / (z - a)));
} else if ((z <= -1.46e-94) || !(z <= 2.2e-62)) {
tmp = t_1;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -3.2e+41: tmp = t_1 elif z <= -5.3e-67: tmp = x + (z * (y / (z - a))) elif (z <= -1.46e-94) or not (z <= 2.2e-62): tmp = t_1 else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -3.2e+41) tmp = t_1; elseif (z <= -5.3e-67) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif ((z <= -1.46e-94) || !(z <= 2.2e-62)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -3.2e+41) tmp = t_1; elseif (z <= -5.3e-67) tmp = x + (z * (y / (z - a))); elseif ((z <= -1.46e-94) || ~((z <= 2.2e-62))) tmp = t_1; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e+41], t$95$1, If[LessEqual[z, -5.3e-67], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.46e-94], N[Not[LessEqual[z, 2.2e-62]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{-67}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94} \lor \neg \left(z \leq 2.2 \cdot 10^{-62}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -3.2000000000000001e41 or -5.29999999999999971e-67 < z < -1.4599999999999999e-94 or 2.20000000000000017e-62 < z Initial program 75.9%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in a around 0 66.8%
Taylor expanded in y around 0 87.4%
if -3.2000000000000001e41 < z < -5.29999999999999971e-67Initial program 92.1%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in t around 0 71.8%
*-commutative71.8%
associate-*r/75.8%
Simplified75.8%
if -1.4599999999999999e-94 < z < 2.20000000000000017e-62Initial program 92.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 88.0%
associate-/l*89.9%
associate-/r/93.9%
Simplified93.9%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- 1.0 (/ t z)))) (t_2 (+ x t_1)))
(if (<= z -2.4e+36)
t_2
(if (<= z -6.5e-79)
(- x (* z (/ y a)))
(if (<= z -1.46e-94)
t_1
(if (<= z 1.65e-62) (+ x (* y (/ t a))) t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double t_2 = x + t_1;
double tmp;
if (z <= -2.4e+36) {
tmp = t_2;
} else if (z <= -6.5e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = t_1;
} else if (z <= 1.65e-62) {
tmp = x + (y * (t / a));
} else {
tmp = t_2;
}
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 = y * (1.0d0 - (t / z))
t_2 = x + t_1
if (z <= (-2.4d+36)) then
tmp = t_2
else if (z <= (-6.5d-79)) then
tmp = x - (z * (y / a))
else if (z <= (-1.46d-94)) then
tmp = t_1
else if (z <= 1.65d-62) then
tmp = x + (y * (t / a))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (1.0 - (t / z));
double t_2 = x + t_1;
double tmp;
if (z <= -2.4e+36) {
tmp = t_2;
} else if (z <= -6.5e-79) {
tmp = x - (z * (y / a));
} else if (z <= -1.46e-94) {
tmp = t_1;
} else if (z <= 1.65e-62) {
tmp = x + (y * (t / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (1.0 - (t / z)) t_2 = x + t_1 tmp = 0 if z <= -2.4e+36: tmp = t_2 elif z <= -6.5e-79: tmp = x - (z * (y / a)) elif z <= -1.46e-94: tmp = t_1 elif z <= 1.65e-62: tmp = x + (y * (t / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(1.0 - Float64(t / z))) t_2 = Float64(x + t_1) tmp = 0.0 if (z <= -2.4e+36) tmp = t_2; elseif (z <= -6.5e-79) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= -1.46e-94) tmp = t_1; elseif (z <= 1.65e-62) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (1.0 - (t / z)); t_2 = x + t_1; tmp = 0.0; if (z <= -2.4e+36) tmp = t_2; elseif (z <= -6.5e-79) tmp = x - (z * (y / a)); elseif (z <= -1.46e-94) tmp = t_1; elseif (z <= 1.65e-62) tmp = x + (y * (t / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + t$95$1), $MachinePrecision]}, If[LessEqual[z, -2.4e+36], t$95$2, If[LessEqual[z, -6.5e-79], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.46e-94], t$95$1, If[LessEqual[z, 1.65e-62], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := x + t_1\\
\mathbf{if}\;z \leq -2.4 \cdot 10^{+36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-79}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-62}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.39999999999999992e36 or 1.65000000000000002e-62 < z Initial program 74.6%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in a around 0 66.5%
Taylor expanded in y around 0 88.2%
if -2.39999999999999992e36 < z < -6.5000000000000003e-79Initial program 92.7%
associate-*l/99.8%
Simplified99.8%
associate-/r/96.3%
Applied egg-rr96.3%
Taylor expanded in t around 0 70.2%
Taylor expanded in z around 0 66.4%
mul-1-neg66.4%
unsub-neg66.4%
associate-/l*66.5%
associate-/r/73.6%
Simplified73.6%
if -6.5000000000000003e-79 < z < -1.4599999999999999e-94Initial program 100.0%
associate-*l/81.2%
Simplified81.2%
Taylor expanded in a around 0 79.8%
Taylor expanded in y around inf 79.8%
if -1.4599999999999999e-94 < z < 1.65000000000000002e-62Initial program 92.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 88.0%
associate-/l*89.9%
associate-/r/93.9%
Simplified93.9%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -2.2e+41)
t_1
(if (<= z -7.4e-67)
(+ x (* z (/ y (- z a))))
(if (<= z -1.14e-94)
t_1
(if (<= z 1.72e-62)
(+ x (* y (/ t a)))
(+ x (/ y (/ z (- z t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.2e+41) {
tmp = t_1;
} else if (z <= -7.4e-67) {
tmp = x + (z * (y / (z - a)));
} else if (z <= -1.14e-94) {
tmp = t_1;
} else if (z <= 1.72e-62) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y / (z / (z - 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 + (y * (1.0d0 - (t / z)))
if (z <= (-2.2d+41)) then
tmp = t_1
else if (z <= (-7.4d-67)) then
tmp = x + (z * (y / (z - a)))
else if (z <= (-1.14d-94)) then
tmp = t_1
else if (z <= 1.72d-62) then
tmp = x + (y * (t / a))
else
tmp = x + (y / (z / (z - 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 + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.2e+41) {
tmp = t_1;
} else if (z <= -7.4e-67) {
tmp = x + (z * (y / (z - a)));
} else if (z <= -1.14e-94) {
tmp = t_1;
} else if (z <= 1.72e-62) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y / (z / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -2.2e+41: tmp = t_1 elif z <= -7.4e-67: tmp = x + (z * (y / (z - a))) elif z <= -1.14e-94: tmp = t_1 elif z <= 1.72e-62: tmp = x + (y * (t / a)) else: tmp = x + (y / (z / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -2.2e+41) tmp = t_1; elseif (z <= -7.4e-67) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (z <= -1.14e-94) tmp = t_1; elseif (z <= 1.72e-62) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + Float64(y / Float64(z / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -2.2e+41) tmp = t_1; elseif (z <= -7.4e-67) tmp = x + (z * (y / (z - a))); elseif (z <= -1.14e-94) tmp = t_1; elseif (z <= 1.72e-62) tmp = x + (y * (t / a)); else tmp = x + (y / (z / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+41], t$95$1, If[LessEqual[z, -7.4e-67], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.14e-94], t$95$1, If[LessEqual[z, 1.72e-62], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -7.4 \cdot 10^{-67}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq -1.14 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{-62}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\
\end{array}
\end{array}
if z < -2.1999999999999999e41 or -7.3999999999999999e-67 < z < -1.14e-94Initial program 76.3%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in a around 0 65.8%
Taylor expanded in y around 0 86.1%
if -2.1999999999999999e41 < z < -7.3999999999999999e-67Initial program 92.1%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in t around 0 71.8%
*-commutative71.8%
associate-*r/75.8%
Simplified75.8%
if -1.14e-94 < z < 1.7199999999999999e-62Initial program 92.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 88.0%
associate-/l*89.9%
associate-/r/93.9%
Simplified93.9%
if 1.7199999999999999e-62 < z Initial program 75.6%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in a around 0 67.5%
associate-/l*88.3%
Simplified88.3%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))))
(if (<= z -2.5e+41)
t_1
(if (<= z -4.9e-67)
(+ x (* z (/ y (- z a))))
(if (<= z -2.7e-95)
t_1
(if (<= z 1.6e-64) (+ x (* y (/ t a))) (+ x (/ y (/ (- z a) z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.5e+41) {
tmp = t_1;
} else if (z <= -4.9e-67) {
tmp = x + (z * (y / (z - a)));
} else if (z <= -2.7e-95) {
tmp = t_1;
} else if (z <= 1.6e-64) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y / ((z - 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 + (y * (1.0d0 - (t / z)))
if (z <= (-2.5d+41)) then
tmp = t_1
else if (z <= (-4.9d-67)) then
tmp = x + (z * (y / (z - a)))
else if (z <= (-2.7d-95)) then
tmp = t_1
else if (z <= 1.6d-64) then
tmp = x + (y * (t / a))
else
tmp = x + (y / ((z - 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 + (y * (1.0 - (t / z)));
double tmp;
if (z <= -2.5e+41) {
tmp = t_1;
} else if (z <= -4.9e-67) {
tmp = x + (z * (y / (z - a)));
} else if (z <= -2.7e-95) {
tmp = t_1;
} else if (z <= 1.6e-64) {
tmp = x + (y * (t / a));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) tmp = 0 if z <= -2.5e+41: tmp = t_1 elif z <= -4.9e-67: tmp = x + (z * (y / (z - a))) elif z <= -2.7e-95: tmp = t_1 elif z <= 1.6e-64: tmp = x + (y * (t / a)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) tmp = 0.0 if (z <= -2.5e+41) tmp = t_1; elseif (z <= -4.9e-67) tmp = Float64(x + Float64(z * Float64(y / Float64(z - a)))); elseif (z <= -2.7e-95) tmp = t_1; elseif (z <= 1.6e-64) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); tmp = 0.0; if (z <= -2.5e+41) tmp = t_1; elseif (z <= -4.9e-67) tmp = x + (z * (y / (z - a))); elseif (z <= -2.7e-95) tmp = t_1; elseif (z <= 1.6e-64) tmp = x + (y * (t / a)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+41], t$95$1, If[LessEqual[z, -4.9e-67], N[(x + N[(z * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.7e-95], t$95$1, If[LessEqual[z, 1.6e-64], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-67}:\\
\;\;\;\;x + z \cdot \frac{y}{z - a}\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-95}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-64}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -2.50000000000000011e41 or -4.89999999999999993e-67 < z < -2.7e-95Initial program 76.3%
associate-*l/91.4%
Simplified91.4%
Taylor expanded in a around 0 65.8%
Taylor expanded in y around 0 86.1%
if -2.50000000000000011e41 < z < -4.89999999999999993e-67Initial program 92.1%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in t around 0 71.8%
*-commutative71.8%
associate-*r/75.8%
Simplified75.8%
if -2.7e-95 < z < 1.59999999999999988e-64Initial program 92.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in z around 0 88.8%
associate-/l*90.8%
associate-/r/94.8%
Simplified94.8%
if 1.59999999999999988e-64 < z Initial program 75.9%
associate-*l/93.5%
Simplified93.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in t around 0 90.1%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -3.5e+76)
(+ x y)
(if (<= z -2.55e-39)
t_1
(if (<= z -1.46e-94)
(* y (- 1.0 (/ t z)))
(if (<= z 3.15e+75) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -3.5e+76) {
tmp = x + y;
} else if (z <= -2.55e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3.15e+75) {
tmp = t_1;
} else {
tmp = x + 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) :: t_1
real(8) :: tmp
t_1 = x + (t * (y / a))
if (z <= (-3.5d+76)) then
tmp = x + y
else if (z <= (-2.55d-39)) then
tmp = t_1
else if (z <= (-1.46d-94)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 3.15d+75) then
tmp = t_1
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -3.5e+76) {
tmp = x + y;
} else if (z <= -2.55e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 3.15e+75) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if z <= -3.5e+76: tmp = x + y elif z <= -2.55e-39: tmp = t_1 elif z <= -1.46e-94: tmp = y * (1.0 - (t / z)) elif z <= 3.15e+75: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (z <= -3.5e+76) tmp = Float64(x + y); elseif (z <= -2.55e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 3.15e+75) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (z <= -3.5e+76) tmp = x + y; elseif (z <= -2.55e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = y * (1.0 - (t / z)); elseif (z <= 3.15e+75) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+76], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.55e-39], t$95$1, If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.15e+75], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 3.15 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.5e76 or 3.15000000000000018e75 < z Initial program 67.1%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in z around inf 84.7%
if -3.5e76 < z < -2.54999999999999994e-39 or -1.4599999999999999e-94 < z < 3.15000000000000018e75Initial program 93.4%
associate-*l/96.0%
Simplified96.0%
associate-/r/98.4%
Applied egg-rr98.4%
Taylor expanded in z around 0 82.6%
associate-*r/83.7%
Simplified83.7%
if -2.54999999999999994e-39 < z < -1.4599999999999999e-94Initial program 99.8%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in a around 0 66.1%
Taylor expanded in y around inf 52.4%
Final simplification82.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))))
(if (<= z -3.1e+76)
(+ x y)
(if (<= z -2.55e-39)
t_1
(if (<= z -1.46e-94)
(* y (- 1.0 (/ t z)))
(if (<= z 1.02e+76) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double tmp;
if (z <= -3.1e+76) {
tmp = x + y;
} else if (z <= -2.55e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.02e+76) {
tmp = t_1;
} else {
tmp = x + 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (t / a))
if (z <= (-3.1d+76)) then
tmp = x + y
else if (z <= (-2.55d-39)) then
tmp = t_1
else if (z <= (-1.46d-94)) then
tmp = y * (1.0d0 - (t / z))
else if (z <= 1.02d+76) then
tmp = t_1
else
tmp = x + y
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 * (t / a));
double tmp;
if (z <= -3.1e+76) {
tmp = x + y;
} else if (z <= -2.55e-39) {
tmp = t_1;
} else if (z <= -1.46e-94) {
tmp = y * (1.0 - (t / z));
} else if (z <= 1.02e+76) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) tmp = 0 if z <= -3.1e+76: tmp = x + y elif z <= -2.55e-39: tmp = t_1 elif z <= -1.46e-94: tmp = y * (1.0 - (t / z)) elif z <= 1.02e+76: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) tmp = 0.0 if (z <= -3.1e+76) tmp = Float64(x + y); elseif (z <= -2.55e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = Float64(y * Float64(1.0 - Float64(t / z))); elseif (z <= 1.02e+76) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); tmp = 0.0; if (z <= -3.1e+76) tmp = x + y; elseif (z <= -2.55e-39) tmp = t_1; elseif (z <= -1.46e-94) tmp = y * (1.0 - (t / z)); elseif (z <= 1.02e+76) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+76], N[(x + y), $MachinePrecision], If[LessEqual[z, -2.55e-39], t$95$1, If[LessEqual[z, -1.46e-94], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+76], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+76}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.46 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.10000000000000011e76 or 1.02000000000000007e76 < z Initial program 67.1%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in z around inf 84.7%
if -3.10000000000000011e76 < z < -2.54999999999999994e-39 or -1.4599999999999999e-94 < z < 1.02000000000000007e76Initial program 93.4%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in z around 0 82.6%
associate-/l*83.8%
associate-/r/85.8%
Simplified85.8%
if -2.54999999999999994e-39 < z < -1.4599999999999999e-94Initial program 99.8%
associate-*l/92.8%
Simplified92.8%
Taylor expanded in a around 0 66.1%
Taylor expanded in y around inf 52.4%
Final simplification83.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.8e-60)
(+ x y)
(if (<= z -4.4e-91)
(* z (/ (- y) a))
(if (<= z -3.3e-140)
x
(if (<= z 1.7e-308) (* y (/ t a)) (if (<= z 9.5e+71) x (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e-60) {
tmp = x + y;
} else if (z <= -4.4e-91) {
tmp = z * (-y / a);
} else if (z <= -3.3e-140) {
tmp = x;
} else if (z <= 1.7e-308) {
tmp = y * (t / a);
} else if (z <= 9.5e+71) {
tmp = x;
} else {
tmp = x + 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 (z <= (-2.8d-60)) then
tmp = x + y
else if (z <= (-4.4d-91)) then
tmp = z * (-y / a)
else if (z <= (-3.3d-140)) then
tmp = x
else if (z <= 1.7d-308) then
tmp = y * (t / a)
else if (z <= 9.5d+71) then
tmp = x
else
tmp = x + y
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.8e-60) {
tmp = x + y;
} else if (z <= -4.4e-91) {
tmp = z * (-y / a);
} else if (z <= -3.3e-140) {
tmp = x;
} else if (z <= 1.7e-308) {
tmp = y * (t / a);
} else if (z <= 9.5e+71) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e-60: tmp = x + y elif z <= -4.4e-91: tmp = z * (-y / a) elif z <= -3.3e-140: tmp = x elif z <= 1.7e-308: tmp = y * (t / a) elif z <= 9.5e+71: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e-60) tmp = Float64(x + y); elseif (z <= -4.4e-91) tmp = Float64(z * Float64(Float64(-y) / a)); elseif (z <= -3.3e-140) tmp = x; elseif (z <= 1.7e-308) tmp = Float64(y * Float64(t / a)); elseif (z <= 9.5e+71) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e-60) tmp = x + y; elseif (z <= -4.4e-91) tmp = z * (-y / a); elseif (z <= -3.3e-140) tmp = x; elseif (z <= 1.7e-308) tmp = y * (t / a); elseif (z <= 9.5e+71) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e-60], N[(x + y), $MachinePrecision], If[LessEqual[z, -4.4e-91], N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.3e-140], x, If[LessEqual[z, 1.7e-308], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+71], x, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-60}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{-91}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\
\mathbf{elif}\;z \leq -3.3 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-308}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.8000000000000002e-60 or 9.50000000000000015e71 < z Initial program 72.7%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in z around inf 75.7%
if -2.8000000000000002e-60 < z < -4.4000000000000002e-91Initial program 99.8%
associate-*l/99.5%
Simplified99.5%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 60.9%
Taylor expanded in z around 0 55.8%
mul-1-neg55.8%
unsub-neg55.8%
associate-/l*55.9%
associate-/r/74.0%
Simplified74.0%
Taylor expanded in x around 0 36.1%
*-commutative36.1%
associate-*r/54.3%
mul-1-neg54.3%
distribute-rgt-neg-in54.3%
distribute-neg-frac54.3%
Simplified54.3%
if -4.4000000000000002e-91 < z < -3.29999999999999987e-140 or 1.7000000000000002e-308 < z < 9.50000000000000015e71Initial program 95.9%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in z around 0 84.6%
Taylor expanded in x around inf 67.5%
if -3.29999999999999987e-140 < z < 1.7000000000000002e-308Initial program 85.6%
associate-*l/95.6%
Simplified95.6%
Taylor expanded in z around 0 85.6%
div-inv85.5%
add-sqr-sqrt51.0%
sqrt-unprod66.6%
sqr-neg66.6%
sqrt-unprod15.6%
add-sqr-sqrt35.1%
distribute-rgt-neg-in35.1%
cancel-sign-sub-inv35.1%
associate-*l*35.3%
div-inv35.3%
Applied egg-rr35.3%
Taylor expanded in x around 0 1.7%
mul-1-neg1.7%
*-commutative1.7%
associate-*l/1.8%
distribute-rgt-neg-out1.8%
*-commutative1.8%
Simplified1.8%
expm1-log1p-u1.7%
expm1-udef1.8%
associate-*r/1.7%
associate-/l*1.8%
add-sqr-sqrt0.5%
sqrt-unprod16.7%
sqr-neg16.7%
sqrt-unprod22.4%
add-sqr-sqrt33.6%
Applied egg-rr33.6%
expm1-def37.3%
expm1-log1p58.4%
associate-/r/65.6%
Simplified65.6%
Final simplification70.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e+170)
(+ x y)
(if (<= z -3.2e-95)
(- x (* y (/ t z)))
(if (<= z 4.5e+74) (+ x (* y (/ t a))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+170) {
tmp = x + y;
} else if (z <= -3.2e-95) {
tmp = x - (y * (t / z));
} else if (z <= 4.5e+74) {
tmp = x + (y * (t / a));
} else {
tmp = x + 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 (z <= (-1.7d+170)) then
tmp = x + y
else if (z <= (-3.2d-95)) then
tmp = x - (y * (t / z))
else if (z <= 4.5d+74) then
tmp = x + (y * (t / a))
else
tmp = x + y
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.7e+170) {
tmp = x + y;
} else if (z <= -3.2e-95) {
tmp = x - (y * (t / z));
} else if (z <= 4.5e+74) {
tmp = x + (y * (t / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+170: tmp = x + y elif z <= -3.2e-95: tmp = x - (y * (t / z)) elif z <= 4.5e+74: tmp = x + (y * (t / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+170) tmp = Float64(x + y); elseif (z <= -3.2e-95) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 4.5e+74) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+170) tmp = x + y; elseif (z <= -3.2e-95) tmp = x - (y * (t / z)); elseif (z <= 4.5e+74) tmp = x + (y * (t / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+170], N[(x + y), $MachinePrecision], If[LessEqual[z, -3.2e-95], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+74], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+170}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-95}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+74}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -1.7000000000000001e170 or 4.5e74 < z Initial program 62.5%
associate-*l/88.7%
Simplified88.7%
Taylor expanded in z around inf 90.1%
if -1.7000000000000001e170 < z < -3.1999999999999997e-95Initial program 93.1%
associate-*l/98.1%
Simplified98.1%
associate-/r/98.1%
Applied egg-rr98.1%
Taylor expanded in t around inf 75.8%
associate-*r/75.8%
neg-mul-175.8%
Simplified75.8%
frac-2neg75.8%
distribute-frac-neg75.8%
distribute-neg-frac75.8%
remove-double-neg75.8%
*-un-lft-identity75.8%
*-un-lft-identity75.8%
add-sqr-sqrt16.7%
sqrt-unprod42.2%
sqr-neg42.2%
sqrt-unprod25.3%
add-sqr-sqrt40.3%
sub-neg40.3%
associate-/r/40.3%
associate-*l/38.5%
add-sqr-sqrt25.4%
sqrt-unprod40.4%
sqr-neg40.4%
Applied egg-rr72.5%
associate-*r/75.8%
Simplified75.8%
Taylor expanded in z around inf 63.5%
if -3.1999999999999997e-95 < z < 4.5e74Initial program 93.7%
associate-*l/95.2%
Simplified95.2%
Taylor expanded in z around 0 85.6%
associate-/l*87.1%
associate-/r/89.4%
Simplified89.4%
Final simplification84.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.75e+83) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 5.3e+76) (- x (* y (/ t (- z a)))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.75e+83) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 5.3e+76) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y / ((z - 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) :: tmp
if (z <= (-2.75d+83)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 5.3d+76) then
tmp = x - (y * (t / (z - a)))
else
tmp = x + (y / ((z - a) / z))
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.75e+83) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 5.3e+76) {
tmp = x - (y * (t / (z - a)));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.75e+83: tmp = x + (y * (1.0 - (t / z))) elif z <= 5.3e+76: tmp = x - (y * (t / (z - a))) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.75e+83) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 5.3e+76) tmp = Float64(x - Float64(y * Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.75e+83) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 5.3e+76) tmp = x - (y * (t / (z - a))); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.75e+83], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e+76], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.75 \cdot 10^{+83}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{+76}:\\
\;\;\;\;x - y \cdot \frac{t}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -2.7499999999999998e83Initial program 66.8%
associate-*l/90.5%
Simplified90.5%
Taylor expanded in a around 0 61.8%
Taylor expanded in y around 0 90.2%
if -2.7499999999999998e83 < z < 5.30000000000000015e76Initial program 94.0%
associate-*l/95.8%
Simplified95.8%
associate-/r/98.5%
Applied egg-rr98.5%
Taylor expanded in t around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
frac-2neg91.3%
distribute-frac-neg91.3%
distribute-neg-frac91.3%
remove-double-neg91.3%
*-un-lft-identity91.3%
*-un-lft-identity91.3%
add-sqr-sqrt47.4%
sqrt-unprod65.4%
sqr-neg65.4%
sqrt-unprod24.4%
add-sqr-sqrt55.2%
sub-neg55.2%
associate-/r/54.4%
associate-*l/54.6%
add-sqr-sqrt24.4%
sqrt-unprod64.8%
sqr-neg64.8%
Applied egg-rr87.4%
associate-*r/90.9%
Simplified90.9%
if 5.30000000000000015e76 < z Initial program 66.1%
associate-*l/90.5%
Simplified90.5%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 94.0%
Final simplification91.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.32e+86) (+ x (* y (- 1.0 (/ t z)))) (if (<= z 4.5e+73) (+ x (/ y (/ (- a z) t))) (+ x (/ y (/ (- z a) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.32e+86) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 4.5e+73) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (y / ((z - 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) :: tmp
if (z <= (-1.32d+86)) then
tmp = x + (y * (1.0d0 - (t / z)))
else if (z <= 4.5d+73) then
tmp = x + (y / ((a - z) / t))
else
tmp = x + (y / ((z - a) / z))
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.32e+86) {
tmp = x + (y * (1.0 - (t / z)));
} else if (z <= 4.5e+73) {
tmp = x + (y / ((a - z) / t));
} else {
tmp = x + (y / ((z - a) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.32e+86: tmp = x + (y * (1.0 - (t / z))) elif z <= 4.5e+73: tmp = x + (y / ((a - z) / t)) else: tmp = x + (y / ((z - a) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.32e+86) tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); elseif (z <= 4.5e+73) tmp = Float64(x + Float64(y / Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(y / Float64(Float64(z - a) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.32e+86) tmp = x + (y * (1.0 - (t / z))); elseif (z <= 4.5e+73) tmp = x + (y / ((a - z) / t)); else tmp = x + (y / ((z - a) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.32e+86], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+73], N[(x + N[(y / N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+86}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+73}:\\
\;\;\;\;x + \frac{y}{\frac{a - z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -1.32e86Initial program 66.8%
associate-*l/90.5%
Simplified90.5%
Taylor expanded in a around 0 61.8%
Taylor expanded in y around 0 90.2%
if -1.32e86 < z < 4.49999999999999985e73Initial program 94.0%
associate-*l/95.8%
Simplified95.8%
associate-/r/98.5%
Applied egg-rr98.5%
Taylor expanded in t around inf 91.3%
associate-*r/91.3%
neg-mul-191.3%
Simplified91.3%
if 4.49999999999999985e73 < z Initial program 66.1%
associate-*l/90.5%
Simplified90.5%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in t around 0 94.0%
Final simplification91.7%
(FPCore (x y z t a) :precision binary64 (if (<= z 2e+218) (+ x (* (- z t) (/ y (- z a)))) (+ x (* y (- 1.0 (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 2e+218) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + (y * (1.0 - (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 (z <= 2d+218) then
tmp = x + ((z - t) * (y / (z - a)))
else
tmp = x + (y * (1.0d0 - (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 (z <= 2e+218) {
tmp = x + ((z - t) * (y / (z - a)));
} else {
tmp = x + (y * (1.0 - (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 2e+218: tmp = x + ((z - t) * (y / (z - a))) else: tmp = x + (y * (1.0 - (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 2e+218) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a)))); else tmp = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 2e+218) tmp = x + ((z - t) * (y / (z - a))); else tmp = x + (y * (1.0 - (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2e+218], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{+218}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\
\end{array}
\end{array}
if z < 2.00000000000000017e218Initial program 87.1%
associate-*l/95.0%
Simplified95.0%
if 2.00000000000000017e218 < z Initial program 56.1%
associate-*l/84.2%
Simplified84.2%
Taylor expanded in a around 0 56.1%
Taylor expanded in y around 0 100.0%
Final simplification95.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.65e+81) (not (<= z 1.5e+71))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.65e+81) || !(z <= 1.5e+71)) {
tmp = x + y;
} 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 <= (-1.65d+81)) .or. (.not. (z <= 1.5d+71))) then
tmp = x + y
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 <= -1.65e+81) || !(z <= 1.5e+71)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.65e+81) or not (z <= 1.5e+71): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.65e+81) || !(z <= 1.5e+71)) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.65e+81) || ~((z <= 1.5e+71))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.65e+81], N[Not[LessEqual[z, 1.5e+71]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+81} \lor \neg \left(z \leq 1.5 \cdot 10^{+71}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.65e81 or 1.50000000000000006e71 < z Initial program 66.4%
associate-*l/90.5%
Simplified90.5%
Taylor expanded in z around inf 85.4%
if -1.65e81 < z < 1.50000000000000006e71Initial program 94.0%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in z around 0 76.9%
Taylor expanded in x around inf 55.9%
Final simplification66.9%
(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 83.7%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in z around 0 62.6%
Taylor expanded in x around inf 52.4%
Final simplification52.4%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (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 + (y / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023301
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))