
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -1e-323)
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ b (/ t y)))))
(if (or (<= t_1 0.0) (not (<= t_1 5e+303)))
(/ (+ z (/ t (/ y x))) b)
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -1e-323) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
} else if ((t_1 <= 0.0) || !(t_1 <= 5e+303)) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))
if (t_1 <= (-1d-323)) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (b / (t / y))))
else if ((t_1 <= 0.0d0) .or. (.not. (t_1 <= 5d+303))) then
tmp = (z + (t / (y / x))) / b
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 b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -1e-323) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
} else if ((t_1 <= 0.0) || !(t_1 <= 5e+303)) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -1e-323: tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y)))) elif (t_1 <= 0.0) or not (t_1 <= 5e+303): tmp = (z + (t / (y / x))) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -1e-323) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); elseif ((t_1 <= 0.0) || !(t_1 <= 5e+303)) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -1e-323) tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y)))); elseif ((t_1 <= 0.0) || ~((t_1 <= 5e+303))) tmp = (z + (t / (y / x))) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-323], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 5e+303]], $MachinePrecision]], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-323}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+303}\right):\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.88131e-324Initial program 87.2%
associate-/l*90.4%
associate-*l/87.0%
*-commutative87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-*l/90.4%
associate-+r-90.4%
associate-*l/87.0%
*-commutative87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-*l/90.4%
*-commutative90.4%
associate-/l*87.4%
Simplified87.4%
associate-/r/91.2%
Applied egg-rr91.2%
if -9.88131e-324 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 34.8%
associate-/l*38.7%
associate-*l/54.2%
*-commutative54.2%
cancel-sign-sub54.2%
*-commutative54.2%
associate-*l/38.7%
associate-+r-38.7%
associate-*l/54.2%
*-commutative54.2%
cancel-sign-sub54.2%
*-commutative54.2%
associate-*l/38.7%
*-commutative38.7%
associate-/l*54.3%
Simplified54.3%
associate-/r/50.2%
Applied egg-rr50.2%
Taylor expanded in x around 0 38.6%
+-commutative38.6%
associate-/r*34.8%
associate-/l*38.7%
associate-*l/48.5%
*-commutative48.5%
associate-*l/55.6%
*-commutative55.6%
Simplified55.6%
Taylor expanded in y around inf 78.5%
Taylor expanded in b around inf 75.5%
associate-/l*81.2%
Simplified81.2%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e303Initial program 99.7%
Final simplification91.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.35e+139)
(not
(or (<= t -4.8e+107)
(and (not (<= t -9.5e-7))
(or (<= t 1e-106)
(and (not (<= t 9.5e-26)) (<= t 2.2e+31)))))))
(/ (+ x (* y (/ z t))) (+ a 1.0))
(/ (+ z (/ t (/ y x))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.35e+139) || !((t <= -4.8e+107) || (!(t <= -9.5e-7) && ((t <= 1e-106) || (!(t <= 9.5e-26) && (t <= 2.2e+31)))))) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z + (t / (y / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.35d+139)) .or. (.not. (t <= (-4.8d+107)) .or. (.not. (t <= (-9.5d-7))) .and. (t <= 1d-106) .or. (.not. (t <= 9.5d-26)) .and. (t <= 2.2d+31))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = (z + (t / (y / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.35e+139) || !((t <= -4.8e+107) || (!(t <= -9.5e-7) && ((t <= 1e-106) || (!(t <= 9.5e-26) && (t <= 2.2e+31)))))) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z + (t / (y / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.35e+139) or not ((t <= -4.8e+107) or (not (t <= -9.5e-7) and ((t <= 1e-106) or (not (t <= 9.5e-26) and (t <= 2.2e+31))))): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = (z + (t / (y / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.35e+139) || !((t <= -4.8e+107) || (!(t <= -9.5e-7) && ((t <= 1e-106) || (!(t <= 9.5e-26) && (t <= 2.2e+31)))))) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.35e+139) || ~(((t <= -4.8e+107) || (~((t <= -9.5e-7)) && ((t <= 1e-106) || (~((t <= 9.5e-26)) && (t <= 2.2e+31))))))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = (z + (t / (y / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.35e+139], N[Not[Or[LessEqual[t, -4.8e+107], And[N[Not[LessEqual[t, -9.5e-7]], $MachinePrecision], Or[LessEqual[t, 1e-106], And[N[Not[LessEqual[t, 9.5e-26]], $MachinePrecision], LessEqual[t, 2.2e+31]]]]]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{+139} \lor \neg \left(t \leq -4.8 \cdot 10^{+107} \lor \neg \left(t \leq -9.5 \cdot 10^{-7}\right) \land \left(t \leq 10^{-106} \lor \neg \left(t \leq 9.5 \cdot 10^{-26}\right) \land t \leq 2.2 \cdot 10^{+31}\right)\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\end{array}
\end{array}
if t < -1.3499999999999999e139 or -4.8000000000000001e107 < t < -9.5000000000000001e-7 or 9.99999999999999941e-107 < t < 9.4999999999999995e-26 or 2.2000000000000001e31 < t Initial program 80.4%
*-commutative80.4%
associate-*l/84.7%
associate-+l+84.7%
associate-*r/92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in b around 0 79.2%
if -1.3499999999999999e139 < t < -4.8000000000000001e107 or -9.5000000000000001e-7 < t < 9.99999999999999941e-107 or 9.4999999999999995e-26 < t < 2.2000000000000001e31Initial program 69.0%
associate-/l*65.6%
associate-*l/62.8%
*-commutative62.8%
cancel-sign-sub62.8%
*-commutative62.8%
associate-*l/65.6%
associate-+r-65.6%
associate-*l/62.8%
*-commutative62.8%
cancel-sign-sub62.8%
*-commutative62.8%
associate-*l/65.6%
*-commutative65.6%
associate-/l*63.2%
Simplified63.2%
associate-/r/65.1%
Applied egg-rr65.1%
Taylor expanded in x around 0 74.8%
+-commutative74.8%
associate-/r*69.0%
associate-/l*65.6%
associate-*l/64.1%
*-commutative64.1%
associate-*l/62.5%
*-commutative62.5%
Simplified62.5%
Taylor expanded in y around inf 73.4%
Taylor expanded in b around inf 73.2%
associate-/l*73.2%
Simplified73.2%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.5e-95) (not (<= t 1.75e-227))) (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ b (/ t y))))) (/ (+ z (/ t (/ y x))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e-95) || !(t <= 1.75e-227)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
} else {
tmp = (z + (t / (y / x))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.5d-95)) .or. (.not. (t <= 1.75d-227))) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (b / (t / y))))
else
tmp = (z + (t / (y / x))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.5e-95) || !(t <= 1.75e-227)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
} else {
tmp = (z + (t / (y / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.5e-95) or not (t <= 1.75e-227): tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y)))) else: tmp = (z + (t / (y / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.5e-95) || !(t <= 1.75e-227)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); else tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.5e-95) || ~((t <= 1.75e-227))) tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y)))); else tmp = (z + (t / (y / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.5e-95], N[Not[LessEqual[t, 1.75e-227]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{-95} \lor \neg \left(t \leq 1.75 \cdot 10^{-227}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\end{array}
\end{array}
if t < -1.5e-95 or 1.75000000000000005e-227 < t Initial program 79.4%
associate-/l*81.5%
associate-*l/88.2%
*-commutative88.2%
cancel-sign-sub88.2%
*-commutative88.2%
associate-*l/81.5%
associate-+r-81.5%
associate-*l/88.2%
*-commutative88.2%
cancel-sign-sub88.2%
*-commutative88.2%
associate-*l/81.5%
*-commutative81.5%
associate-/l*88.4%
Simplified88.4%
associate-/r/89.3%
Applied egg-rr89.3%
if -1.5e-95 < t < 1.75000000000000005e-227Initial program 60.3%
associate-/l*56.6%
associate-*l/47.4%
*-commutative47.4%
cancel-sign-sub47.4%
*-commutative47.4%
associate-*l/56.6%
associate-+r-56.6%
associate-*l/47.4%
*-commutative47.4%
cancel-sign-sub47.4%
*-commutative47.4%
associate-*l/56.6%
*-commutative56.6%
associate-/l*47.5%
Simplified47.5%
associate-/r/48.7%
Applied egg-rr48.7%
Taylor expanded in x around 0 70.7%
+-commutative70.7%
associate-/r*60.3%
associate-/l*56.6%
associate-*l/51.7%
*-commutative51.7%
associate-*l/48.3%
*-commutative48.3%
Simplified48.3%
Taylor expanded in y around inf 77.6%
Taylor expanded in b around inf 84.1%
associate-/l*82.4%
Simplified82.4%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -6.4e-99)
(/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t)))))
(if (<= t 3e-228)
(/ (+ z (/ t (/ y x))) b)
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ b (/ t y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.4e-99) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t <= 3e-228) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (t <= (-6.4d-99)) then
tmp = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
else if (t <= 3d-228) then
tmp = (z + (t / (y / x))) / b
else
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (b / (t / y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.4e-99) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t <= 3e-228) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.4e-99: tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) elif t <= 3e-228: tmp = (z + (t / (y / x))) / b else: tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.4e-99) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))); elseif (t <= 3e-228) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.4e-99) tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); elseif (t <= 3e-228) tmp = (z + (t / (y / x))) / b; else tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.4e-99], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-228], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{-99}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-228}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\end{array}
\end{array}
if t < -6.4000000000000001e-99Initial program 82.9%
*-commutative82.9%
associate-*l/85.3%
associate-+l+85.3%
associate-*r/94.6%
*-commutative94.6%
Simplified94.6%
if -6.4000000000000001e-99 < t < 3e-228Initial program 60.3%
associate-/l*56.6%
associate-*l/47.4%
*-commutative47.4%
cancel-sign-sub47.4%
*-commutative47.4%
associate-*l/56.6%
associate-+r-56.6%
associate-*l/47.4%
*-commutative47.4%
cancel-sign-sub47.4%
*-commutative47.4%
associate-*l/56.6%
*-commutative56.6%
associate-/l*47.5%
Simplified47.5%
associate-/r/48.7%
Applied egg-rr48.7%
Taylor expanded in x around 0 70.7%
+-commutative70.7%
associate-/r*60.3%
associate-/l*56.6%
associate-*l/51.7%
*-commutative51.7%
associate-*l/48.3%
*-commutative48.3%
Simplified48.3%
Taylor expanded in y around inf 77.6%
Taylor expanded in b around inf 84.1%
associate-/l*82.4%
Simplified82.4%
if 3e-228 < t Initial program 76.4%
associate-/l*78.3%
associate-*l/82.7%
*-commutative82.7%
cancel-sign-sub82.7%
*-commutative82.7%
associate-*l/78.3%
associate-+r-78.3%
associate-*l/82.7%
*-commutative82.7%
cancel-sign-sub82.7%
*-commutative82.7%
associate-*l/78.3%
*-commutative78.3%
associate-/l*83.0%
Simplified83.0%
associate-/r/85.3%
Applied egg-rr85.3%
Final simplification88.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (+ 1.0 (/ b (/ t y))))))
(if (<= t -2e-98)
(/ (+ x (/ y (/ t z))) t_1)
(if (<= t 1.75e-227)
(/ (+ z (/ t (/ y x))) b)
(/ (+ x (* z (/ y t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (1.0 + (b / (t / y)));
double tmp;
if (t <= -2e-98) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 1.75e-227) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (z * (y / t))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a + (1.0d0 + (b / (t / y)))
if (t <= (-2d-98)) then
tmp = (x + (y / (t / z))) / t_1
else if (t <= 1.75d-227) then
tmp = (z + (t / (y / x))) / b
else
tmp = (x + (z * (y / t))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (1.0 + (b / (t / y)));
double tmp;
if (t <= -2e-98) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 1.75e-227) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (z * (y / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (1.0 + (b / (t / y))) tmp = 0 if t <= -2e-98: tmp = (x + (y / (t / z))) / t_1 elif t <= 1.75e-227: tmp = (z + (t / (y / x))) / b else: tmp = (x + (z * (y / t))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(1.0 + Float64(b / Float64(t / y)))) tmp = 0.0 if (t <= -2e-98) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); elseif (t <= 1.75e-227) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (1.0 + (b / (t / y))); tmp = 0.0; if (t <= -2e-98) tmp = (x + (y / (t / z))) / t_1; elseif (t <= 1.75e-227) tmp = (z + (t / (y / x))) / b; else tmp = (x + (z * (y / t))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-98], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 1.75e-227], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(1 + \frac{b}{\frac{t}{y}}\right)\\
\mathbf{if}\;t \leq -2 \cdot 10^{-98}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t_1}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-227}:\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\end{array}
\end{array}
if t < -1.99999999999999988e-98Initial program 82.9%
associate-/l*85.2%
associate-*l/94.5%
*-commutative94.5%
cancel-sign-sub94.5%
*-commutative94.5%
associate-*l/85.2%
associate-+r-85.2%
associate-*l/94.5%
*-commutative94.5%
cancel-sign-sub94.5%
*-commutative94.5%
associate-*l/85.2%
*-commutative85.2%
associate-/l*94.6%
Simplified94.6%
if -1.99999999999999988e-98 < t < 1.75000000000000005e-227Initial program 60.3%
associate-/l*56.6%
associate-*l/47.4%
*-commutative47.4%
cancel-sign-sub47.4%
*-commutative47.4%
associate-*l/56.6%
associate-+r-56.6%
associate-*l/47.4%
*-commutative47.4%
cancel-sign-sub47.4%
*-commutative47.4%
associate-*l/56.6%
*-commutative56.6%
associate-/l*47.5%
Simplified47.5%
associate-/r/48.7%
Applied egg-rr48.7%
Taylor expanded in x around 0 70.7%
+-commutative70.7%
associate-/r*60.3%
associate-/l*56.6%
associate-*l/51.7%
*-commutative51.7%
associate-*l/48.3%
*-commutative48.3%
Simplified48.3%
Taylor expanded in y around inf 77.6%
Taylor expanded in b around inf 84.1%
associate-/l*82.4%
Simplified82.4%
if 1.75000000000000005e-227 < t Initial program 76.4%
associate-/l*78.3%
associate-*l/82.7%
*-commutative82.7%
cancel-sign-sub82.7%
*-commutative82.7%
associate-*l/78.3%
associate-+r-78.3%
associate-*l/82.7%
*-commutative82.7%
cancel-sign-sub82.7%
*-commutative82.7%
associate-*l/78.3%
*-commutative78.3%
associate-/l*83.0%
Simplified83.0%
associate-/r/85.3%
Applied egg-rr85.3%
Final simplification88.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -3.6e-6)
(not (or (<= y 1.8) (and (not (<= y 1.85e+84)) (<= y 5.6e+133)))))
(/ (+ z (/ t (/ y x))) b)
(/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e-6) || !((y <= 1.8) || (!(y <= 1.85e+84) && (y <= 5.6e+133)))) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.6d-6)) .or. (.not. (y <= 1.8d0) .or. (.not. (y <= 1.85d+84)) .and. (y <= 5.6d+133))) then
tmp = (z + (t / (y / x))) / b
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e-6) || !((y <= 1.8) || (!(y <= 1.85e+84) && (y <= 5.6e+133)))) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e-6) or not ((y <= 1.8) or (not (y <= 1.85e+84) and (y <= 5.6e+133))): tmp = (z + (t / (y / x))) / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e-6) || !((y <= 1.8) || (!(y <= 1.85e+84) && (y <= 5.6e+133)))) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e-6) || ~(((y <= 1.8) || (~((y <= 1.85e+84)) && (y <= 5.6e+133))))) tmp = (z + (t / (y / x))) / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e-6], N[Not[Or[LessEqual[y, 1.8], And[N[Not[LessEqual[y, 1.85e+84]], $MachinePrecision], LessEqual[y, 5.6e+133]]]], $MachinePrecision]], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-6} \lor \neg \left(y \leq 1.8 \lor \neg \left(y \leq 1.85 \cdot 10^{+84}\right) \land y \leq 5.6 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -3.59999999999999984e-6 or 1.80000000000000004 < y < 1.85e84 or 5.60000000000000033e133 < y Initial program 54.7%
associate-/l*59.6%
associate-*l/67.0%
*-commutative67.0%
cancel-sign-sub67.0%
*-commutative67.0%
associate-*l/59.6%
associate-+r-59.6%
associate-*l/67.0%
*-commutative67.0%
cancel-sign-sub67.0%
*-commutative67.0%
associate-*l/59.6%
*-commutative59.6%
associate-/l*67.4%
Simplified67.4%
associate-/r/65.9%
Applied egg-rr65.9%
Taylor expanded in x around 0 53.2%
+-commutative53.2%
associate-/r*54.7%
associate-/l*59.7%
associate-*l/66.6%
*-commutative66.6%
associate-*l/71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in y around inf 70.9%
Taylor expanded in b around inf 61.9%
associate-/l*66.7%
Simplified66.7%
if -3.59999999999999984e-6 < y < 1.80000000000000004 or 1.85e84 < y < 5.60000000000000033e133Initial program 94.8%
*-commutative94.8%
associate-*l/91.8%
associate-+l+91.8%
associate-*r/86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in b around 0 78.4%
Final simplification72.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0)))
(t_2 (/ (+ z (/ t (/ y x))) b)))
(if (<= y -3.4e-6)
t_2
(if (<= y 2.9)
t_1
(if (<= y 2.6e+85)
(+ (/ z b) (/ x (+ 1.0 (/ (* y b) t))))
(if (<= y 5.5e+134) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double t_2 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -3.4e-6) {
tmp = t_2;
} else if (y <= 2.9) {
tmp = t_1;
} else if (y <= 2.6e+85) {
tmp = (z / b) + (x / (1.0 + ((y * b) / t)));
} else if (y <= 5.5e+134) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
t_2 = (z + (t / (y / x))) / b
if (y <= (-3.4d-6)) then
tmp = t_2
else if (y <= 2.9d0) then
tmp = t_1
else if (y <= 2.6d+85) then
tmp = (z / b) + (x / (1.0d0 + ((y * b) / t)))
else if (y <= 5.5d+134) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double t_2 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -3.4e-6) {
tmp = t_2;
} else if (y <= 2.9) {
tmp = t_1;
} else if (y <= 2.6e+85) {
tmp = (z / b) + (x / (1.0 + ((y * b) / t)));
} else if (y <= 5.5e+134) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (a + 1.0) t_2 = (z + (t / (y / x))) / b tmp = 0 if y <= -3.4e-6: tmp = t_2 elif y <= 2.9: tmp = t_1 elif y <= 2.6e+85: tmp = (z / b) + (x / (1.0 + ((y * b) / t))) elif y <= 5.5e+134: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) t_2 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (y <= -3.4e-6) tmp = t_2; elseif (y <= 2.9) tmp = t_1; elseif (y <= 2.6e+85) tmp = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(Float64(y * b) / t)))); elseif (y <= 5.5e+134) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (a + 1.0); t_2 = (z + (t / (y / x))) / b; tmp = 0.0; if (y <= -3.4e-6) tmp = t_2; elseif (y <= 2.9) tmp = t_1; elseif (y <= 2.6e+85) tmp = (z / b) + (x / (1.0 + ((y * b) / t))); elseif (y <= 5.5e+134) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3.4e-6], t$95$2, If[LessEqual[y, 2.9], t$95$1, If[LessEqual[y, 2.6e+85], N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+134], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
t_2 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{-6}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.9:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+85}:\\
\;\;\;\;\frac{z}{b} + \frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+134}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.40000000000000006e-6 or 5.4999999999999999e134 < y Initial program 53.3%
associate-/l*58.8%
associate-*l/65.5%
*-commutative65.5%
cancel-sign-sub65.5%
*-commutative65.5%
associate-*l/58.8%
associate-+r-58.8%
associate-*l/65.5%
*-commutative65.5%
cancel-sign-sub65.5%
*-commutative65.5%
associate-*l/58.8%
*-commutative58.8%
associate-/l*65.8%
Simplified65.8%
associate-/r/64.3%
Applied egg-rr64.3%
Taylor expanded in x around 0 50.8%
+-commutative50.8%
associate-/r*53.3%
associate-/l*58.9%
associate-*l/65.9%
*-commutative65.9%
associate-*l/70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in y around inf 70.5%
Taylor expanded in b around inf 62.2%
associate-/l*66.9%
Simplified66.9%
if -3.40000000000000006e-6 < y < 2.89999999999999991 or 2.60000000000000011e85 < y < 5.4999999999999999e134Initial program 94.8%
*-commutative94.8%
associate-*l/91.8%
associate-+l+91.8%
associate-*r/86.7%
*-commutative86.7%
Simplified86.7%
Taylor expanded in b around 0 78.4%
if 2.89999999999999991 < y < 2.60000000000000011e85Initial program 65.8%
associate-/l*65.7%
associate-*l/79.5%
*-commutative79.5%
cancel-sign-sub79.5%
*-commutative79.5%
associate-*l/65.7%
associate-+r-65.7%
associate-*l/79.5%
*-commutative79.5%
cancel-sign-sub79.5%
*-commutative79.5%
associate-*l/65.7%
*-commutative65.7%
associate-/l*79.6%
Simplified79.6%
associate-/r/79.3%
Applied egg-rr79.3%
Taylor expanded in x around 0 72.3%
+-commutative72.3%
associate-/r*65.8%
associate-/l*65.7%
associate-*l/72.5%
*-commutative72.5%
associate-*l/79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in y around inf 73.7%
Taylor expanded in a around 0 66.9%
Final simplification72.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.1e-120) (not (<= b 7e-42))) (+ (/ z b) (/ x (+ 1.0 (+ a (* y (/ b t)))))) (/ (+ x (* y (/ z t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.1e-120) || !(b <= 7e-42)) {
tmp = (z / b) + (x / (1.0 + (a + (y * (b / t)))));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.1d-120)) .or. (.not. (b <= 7d-42))) then
tmp = (z / b) + (x / (1.0d0 + (a + (y * (b / t)))))
else
tmp = (x + (y * (z / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.1e-120) || !(b <= 7e-42)) {
tmp = (z / b) + (x / (1.0 + (a + (y * (b / t)))));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.1e-120) or not (b <= 7e-42): tmp = (z / b) + (x / (1.0 + (a + (y * (b / t))))) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.1e-120) || !(b <= 7e-42)) tmp = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.1e-120) || ~((b <= 7e-42))) tmp = (z / b) + (x / (1.0 + (a + (y * (b / t))))); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.1e-120], N[Not[LessEqual[b, 7e-42]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{-120} \lor \neg \left(b \leq 7 \cdot 10^{-42}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if b < -3.10000000000000019e-120 or 7.0000000000000004e-42 < b Initial program 67.7%
associate-/l*67.8%
associate-*l/75.8%
*-commutative75.8%
cancel-sign-sub75.8%
*-commutative75.8%
associate-*l/67.8%
associate-+r-67.8%
associate-*l/75.8%
*-commutative75.8%
cancel-sign-sub75.8%
*-commutative75.8%
associate-*l/67.8%
*-commutative67.8%
associate-/l*75.9%
Simplified75.9%
associate-/r/75.6%
Applied egg-rr75.6%
Taylor expanded in x around 0 67.8%
+-commutative67.8%
associate-/r*67.7%
associate-/l*67.8%
associate-*l/70.8%
*-commutative70.8%
associate-*l/72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in y around inf 74.9%
if -3.10000000000000019e-120 < b < 7.0000000000000004e-42Initial program 89.2%
*-commutative89.2%
associate-*l/91.3%
associate-+l+91.3%
associate-*r/91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in b around 0 82.5%
Final simplification77.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ t (/ y x))) b)))
(if (<= y -1.9e+29)
t_1
(if (<= y 15000000000000.0)
(/ x (+ (/ b (/ t y)) (+ a 1.0)))
(if (or (<= y 7.6e+84) (not (<= y 1.75e+131)))
t_1
(+ x (/ y (/ t z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -1.9e+29) {
tmp = t_1;
} else if (y <= 15000000000000.0) {
tmp = x / ((b / (t / y)) + (a + 1.0));
} else if ((y <= 7.6e+84) || !(y <= 1.75e+131)) {
tmp = t_1;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + (t / (y / x))) / b
if (y <= (-1.9d+29)) then
tmp = t_1
else if (y <= 15000000000000.0d0) then
tmp = x / ((b / (t / y)) + (a + 1.0d0))
else if ((y <= 7.6d+84) .or. (.not. (y <= 1.75d+131))) then
tmp = t_1
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -1.9e+29) {
tmp = t_1;
} else if (y <= 15000000000000.0) {
tmp = x / ((b / (t / y)) + (a + 1.0));
} else if ((y <= 7.6e+84) || !(y <= 1.75e+131)) {
tmp = t_1;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t / (y / x))) / b tmp = 0 if y <= -1.9e+29: tmp = t_1 elif y <= 15000000000000.0: tmp = x / ((b / (t / y)) + (a + 1.0)) elif (y <= 7.6e+84) or not (y <= 1.75e+131): tmp = t_1 else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (y <= -1.9e+29) tmp = t_1; elseif (y <= 15000000000000.0) tmp = Float64(x / Float64(Float64(b / Float64(t / y)) + Float64(a + 1.0))); elseif ((y <= 7.6e+84) || !(y <= 1.75e+131)) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t / (y / x))) / b; tmp = 0.0; if (y <= -1.9e+29) tmp = t_1; elseif (y <= 15000000000000.0) tmp = x / ((b / (t / y)) + (a + 1.0)); elseif ((y <= 7.6e+84) || ~((y <= 1.75e+131))) tmp = t_1; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.9e+29], t$95$1, If[LessEqual[y, 15000000000000.0], N[(x / N[(N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 7.6e+84], N[Not[LessEqual[y, 1.75e+131]], $MachinePrecision]], t$95$1, N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 15000000000000:\\
\;\;\;\;\frac{x}{\frac{b}{\frac{t}{y}} + \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+84} \lor \neg \left(y \leq 1.75 \cdot 10^{+131}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if y < -1.89999999999999985e29 or 1.5e13 < y < 7.6000000000000002e84 or 1.7499999999999999e131 < y Initial program 53.2%
associate-/l*58.3%
associate-*l/66.0%
*-commutative66.0%
cancel-sign-sub66.0%
*-commutative66.0%
associate-*l/58.3%
associate-+r-58.3%
associate-*l/66.0%
*-commutative66.0%
cancel-sign-sub66.0%
*-commutative66.0%
associate-*l/58.3%
*-commutative58.3%
associate-/l*66.3%
Simplified66.3%
associate-/r/64.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 51.7%
+-commutative51.7%
associate-/r*53.2%
associate-/l*58.3%
associate-*l/65.5%
*-commutative65.5%
associate-*l/70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in y around inf 71.3%
Taylor expanded in b around inf 62.0%
associate-/l*66.9%
Simplified66.9%
if -1.89999999999999985e29 < y < 1.5e13Initial program 94.6%
*-commutative94.6%
associate-*l/91.5%
associate-+l+91.5%
associate-*r/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in x around inf 71.9%
associate-+r+71.9%
associate-/l*71.9%
Simplified71.9%
if 7.6000000000000002e84 < y < 1.7499999999999999e131Initial program 100.0%
*-commutative100.0%
associate-*l/99.8%
associate-+l+99.8%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 75.1%
Taylor expanded in b around 0 75.3%
associate-/l*75.3%
Simplified75.3%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ t (/ y x))) b)))
(if (<= y -7.5e+28)
t_1
(if (<= y 11500000000.0)
(/ x (+ (/ (* y b) t) (+ a 1.0)))
(if (or (<= y 2.95e+85) (not (<= y 1.75e+131)))
t_1
(+ x (/ y (/ t z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -7.5e+28) {
tmp = t_1;
} else if (y <= 11500000000.0) {
tmp = x / (((y * b) / t) + (a + 1.0));
} else if ((y <= 2.95e+85) || !(y <= 1.75e+131)) {
tmp = t_1;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + (t / (y / x))) / b
if (y <= (-7.5d+28)) then
tmp = t_1
else if (y <= 11500000000.0d0) then
tmp = x / (((y * b) / t) + (a + 1.0d0))
else if ((y <= 2.95d+85) .or. (.not. (y <= 1.75d+131))) then
tmp = t_1
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -7.5e+28) {
tmp = t_1;
} else if (y <= 11500000000.0) {
tmp = x / (((y * b) / t) + (a + 1.0));
} else if ((y <= 2.95e+85) || !(y <= 1.75e+131)) {
tmp = t_1;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t / (y / x))) / b tmp = 0 if y <= -7.5e+28: tmp = t_1 elif y <= 11500000000.0: tmp = x / (((y * b) / t) + (a + 1.0)) elif (y <= 2.95e+85) or not (y <= 1.75e+131): tmp = t_1 else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (y <= -7.5e+28) tmp = t_1; elseif (y <= 11500000000.0) tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif ((y <= 2.95e+85) || !(y <= 1.75e+131)) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t / (y / x))) / b; tmp = 0.0; if (y <= -7.5e+28) tmp = t_1; elseif (y <= 11500000000.0) tmp = x / (((y * b) / t) + (a + 1.0)); elseif ((y <= 2.95e+85) || ~((y <= 1.75e+131))) tmp = t_1; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -7.5e+28], t$95$1, If[LessEqual[y, 11500000000.0], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.95e+85], N[Not[LessEqual[y, 1.75e+131]], $MachinePrecision]], t$95$1, N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 11500000000:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+85} \lor \neg \left(y \leq 1.75 \cdot 10^{+131}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if y < -7.4999999999999998e28 or 1.15e10 < y < 2.95e85 or 1.7499999999999999e131 < y Initial program 53.2%
associate-/l*58.3%
associate-*l/66.0%
*-commutative66.0%
cancel-sign-sub66.0%
*-commutative66.0%
associate-*l/58.3%
associate-+r-58.3%
associate-*l/66.0%
*-commutative66.0%
cancel-sign-sub66.0%
*-commutative66.0%
associate-*l/58.3%
*-commutative58.3%
associate-/l*66.3%
Simplified66.3%
associate-/r/64.8%
Applied egg-rr64.8%
Taylor expanded in x around 0 51.7%
+-commutative51.7%
associate-/r*53.2%
associate-/l*58.3%
associate-*l/65.5%
*-commutative65.5%
associate-*l/70.2%
*-commutative70.2%
Simplified70.2%
Taylor expanded in y around inf 71.3%
Taylor expanded in b around inf 62.0%
associate-/l*66.9%
Simplified66.9%
if -7.4999999999999998e28 < y < 1.15e10Initial program 94.6%
Taylor expanded in x around inf 71.9%
if 2.95e85 < y < 1.7499999999999999e131Initial program 100.0%
*-commutative100.0%
associate-*l/99.8%
associate-+l+99.8%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 75.1%
Taylor expanded in b around 0 75.3%
associate-/l*75.3%
Simplified75.3%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ t (/ y x))) b)) (t_2 (/ x (+ a 1.0))))
(if (<= t -2.55e+138)
t_2
(if (<= t -5.4e+107)
t_1
(if (<= t -2.05e-6)
(/ (+ x (* y (/ z t))) a)
(if (<= t 9.8e+33) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -2.55e+138) {
tmp = t_2;
} else if (t <= -5.4e+107) {
tmp = t_1;
} else if (t <= -2.05e-6) {
tmp = (x + (y * (z / t))) / a;
} else if (t <= 9.8e+33) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z + (t / (y / x))) / b
t_2 = x / (a + 1.0d0)
if (t <= (-2.55d+138)) then
tmp = t_2
else if (t <= (-5.4d+107)) then
tmp = t_1
else if (t <= (-2.05d-6)) then
tmp = (x + (y * (z / t))) / a
else if (t <= 9.8d+33) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -2.55e+138) {
tmp = t_2;
} else if (t <= -5.4e+107) {
tmp = t_1;
} else if (t <= -2.05e-6) {
tmp = (x + (y * (z / t))) / a;
} else if (t <= 9.8e+33) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t / (y / x))) / b t_2 = x / (a + 1.0) tmp = 0 if t <= -2.55e+138: tmp = t_2 elif t <= -5.4e+107: tmp = t_1 elif t <= -2.05e-6: tmp = (x + (y * (z / t))) / a elif t <= 9.8e+33: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) t_2 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.55e+138) tmp = t_2; elseif (t <= -5.4e+107) tmp = t_1; elseif (t <= -2.05e-6) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (t <= 9.8e+33) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t / (y / x))) / b; t_2 = x / (a + 1.0); tmp = 0.0; if (t <= -2.55e+138) tmp = t_2; elseif (t <= -5.4e+107) tmp = t_1; elseif (t <= -2.05e-6) tmp = (x + (y * (z / t))) / a; elseif (t <= 9.8e+33) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.55e+138], t$95$2, If[LessEqual[t, -5.4e+107], t$95$1, If[LessEqual[t, -2.05e-6], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 9.8e+33], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
t_2 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.55 \cdot 10^{+138}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.4 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{-6}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.5499999999999999e138 or 9.80000000000000027e33 < t Initial program 78.8%
*-commutative78.8%
associate-*l/84.8%
associate-+l+84.8%
associate-*r/92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in t around inf 66.8%
if -2.5499999999999999e138 < t < -5.4000000000000003e107 or -2.0499999999999999e-6 < t < 9.80000000000000027e33Initial program 71.2%
associate-/l*68.1%
associate-*l/65.5%
*-commutative65.5%
cancel-sign-sub65.5%
*-commutative65.5%
associate-*l/68.1%
associate-+r-68.1%
associate-*l/65.5%
*-commutative65.5%
cancel-sign-sub65.5%
*-commutative65.5%
associate-*l/68.1%
*-commutative68.1%
associate-/l*65.9%
Simplified65.9%
associate-/r/67.6%
Applied egg-rr67.6%
Taylor expanded in x around 0 76.4%
+-commutative76.4%
associate-/r*71.2%
associate-/l*68.1%
associate-*l/66.7%
*-commutative66.7%
associate-*l/65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in y around inf 69.8%
Taylor expanded in b around inf 68.8%
associate-/l*68.8%
Simplified68.8%
if -5.4000000000000003e107 < t < -2.0499999999999999e-6Initial program 81.1%
*-commutative81.1%
associate-*l/81.3%
associate-+l+81.3%
associate-*r/95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in a around inf 50.6%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.8e+29)
(/ z b)
(if (<= y 4400000000.0)
(/ x (+ a 1.0))
(if (or (<= y 2.1e+85) (not (<= y 3.1e+132)))
(/ z b)
(+ x (/ y (/ t z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.8e+29) {
tmp = z / b;
} else if (y <= 4400000000.0) {
tmp = x / (a + 1.0);
} else if ((y <= 2.1e+85) || !(y <= 3.1e+132)) {
tmp = z / b;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (y <= (-5.8d+29)) then
tmp = z / b
else if (y <= 4400000000.0d0) then
tmp = x / (a + 1.0d0)
else if ((y <= 2.1d+85) .or. (.not. (y <= 3.1d+132))) then
tmp = z / b
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.8e+29) {
tmp = z / b;
} else if (y <= 4400000000.0) {
tmp = x / (a + 1.0);
} else if ((y <= 2.1e+85) || !(y <= 3.1e+132)) {
tmp = z / b;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.8e+29: tmp = z / b elif y <= 4400000000.0: tmp = x / (a + 1.0) elif (y <= 2.1e+85) or not (y <= 3.1e+132): tmp = z / b else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.8e+29) tmp = Float64(z / b); elseif (y <= 4400000000.0) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 2.1e+85) || !(y <= 3.1e+132)) tmp = Float64(z / b); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.8e+29) tmp = z / b; elseif (y <= 4400000000.0) tmp = x / (a + 1.0); elseif ((y <= 2.1e+85) || ~((y <= 3.1e+132))) tmp = z / b; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.8e+29], N[(z / b), $MachinePrecision], If[LessEqual[y, 4400000000.0], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.1e+85], N[Not[LessEqual[y, 3.1e+132]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+29}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 4400000000:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+85} \lor \neg \left(y \leq 3.1 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if y < -5.7999999999999999e29 or 4.4e9 < y < 2.1000000000000001e85 or 3.0999999999999998e132 < y Initial program 53.2%
*-commutative53.2%
associate-*l/58.3%
associate-+l+58.3%
associate-*r/70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in t around 0 56.2%
if -5.7999999999999999e29 < y < 4.4e9Initial program 94.6%
*-commutative94.6%
associate-*l/91.5%
associate-+l+91.5%
associate-*r/86.2%
*-commutative86.2%
Simplified86.2%
Taylor expanded in t around inf 62.7%
if 2.1000000000000001e85 < y < 3.0999999999999998e132Initial program 100.0%
*-commutative100.0%
associate-*l/99.8%
associate-+l+99.8%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 75.1%
Taylor expanded in b around 0 75.3%
associate-/l*75.3%
Simplified75.3%
Final simplification60.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= a -16500000000000.0)
t_1
(if (<= a -1.32e-303)
(/ z b)
(if (<= a 3.7) (/ x (+ 1.0 (/ b (/ t y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -16500000000000.0) {
tmp = t_1;
} else if (a <= -1.32e-303) {
tmp = z / b;
} else if (a <= 3.7) {
tmp = x / (1.0 + (b / (t / y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (z * (y / t))) / a
if (a <= (-16500000000000.0d0)) then
tmp = t_1
else if (a <= (-1.32d-303)) then
tmp = z / b
else if (a <= 3.7d0) then
tmp = x / (1.0d0 + (b / (t / y)))
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 b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -16500000000000.0) {
tmp = t_1;
} else if (a <= -1.32e-303) {
tmp = z / b;
} else if (a <= 3.7) {
tmp = x / (1.0 + (b / (t / y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / a tmp = 0 if a <= -16500000000000.0: tmp = t_1 elif a <= -1.32e-303: tmp = z / b elif a <= 3.7: tmp = x / (1.0 + (b / (t / y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -16500000000000.0) tmp = t_1; elseif (a <= -1.32e-303) tmp = Float64(z / b); elseif (a <= 3.7) tmp = Float64(x / Float64(1.0 + Float64(b / Float64(t / y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / a; tmp = 0.0; if (a <= -16500000000000.0) tmp = t_1; elseif (a <= -1.32e-303) tmp = z / b; elseif (a <= 3.7) tmp = x / (1.0 + (b / (t / y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -16500000000000.0], t$95$1, If[LessEqual[a, -1.32e-303], N[(z / b), $MachinePrecision], If[LessEqual[a, 3.7], N[(x / N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -16500000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.32 \cdot 10^{-303}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 3.7:\\
\;\;\;\;\frac{x}{1 + \frac{b}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.65e13 or 3.7000000000000002 < a Initial program 73.9%
associate-/l*74.8%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/74.8%
associate-+r-74.8%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/74.8%
*-commutative74.8%
associate-/l*79.0%
Simplified79.0%
associate-/r/79.9%
Applied egg-rr79.9%
Taylor expanded in a around inf 67.4%
if -1.65e13 < a < -1.32000000000000005e-303Initial program 70.3%
*-commutative70.3%
associate-*l/73.2%
associate-+l+73.2%
associate-*r/79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in t around 0 55.1%
if -1.32000000000000005e-303 < a < 3.7000000000000002Initial program 82.6%
Taylor expanded in x around inf 61.5%
Taylor expanded in a around 0 60.7%
associate-*r/63.4%
*-commutative63.4%
Applied egg-rr63.4%
*-commutative63.4%
clear-num63.4%
div-inv63.5%
Applied egg-rr63.5%
Final simplification62.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -15000000000000.0)
(/ (+ x (* y (/ z t))) a)
(if (<= a -7.5e-304)
(/ z b)
(if (<= a 1.9) (/ x (+ 1.0 (/ b (/ t y)))) (/ (+ x (* z (/ y t))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -15000000000000.0) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -7.5e-304) {
tmp = z / b;
} else if (a <= 1.9) {
tmp = x / (1.0 + (b / (t / y)));
} else {
tmp = (x + (z * (y / t))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (a <= (-15000000000000.0d0)) then
tmp = (x + (y * (z / t))) / a
else if (a <= (-7.5d-304)) then
tmp = z / b
else if (a <= 1.9d0) then
tmp = x / (1.0d0 + (b / (t / y)))
else
tmp = (x + (z * (y / t))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -15000000000000.0) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -7.5e-304) {
tmp = z / b;
} else if (a <= 1.9) {
tmp = x / (1.0 + (b / (t / y)));
} else {
tmp = (x + (z * (y / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -15000000000000.0: tmp = (x + (y * (z / t))) / a elif a <= -7.5e-304: tmp = z / b elif a <= 1.9: tmp = x / (1.0 + (b / (t / y))) else: tmp = (x + (z * (y / t))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -15000000000000.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (a <= -7.5e-304) tmp = Float64(z / b); elseif (a <= 1.9) tmp = Float64(x / Float64(1.0 + Float64(b / Float64(t / y)))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -15000000000000.0) tmp = (x + (y * (z / t))) / a; elseif (a <= -7.5e-304) tmp = z / b; elseif (a <= 1.9) tmp = x / (1.0 + (b / (t / y))); else tmp = (x + (z * (y / t))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -15000000000000.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -7.5e-304], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.9], N[(x / N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -15000000000000:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-304}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.9:\\
\;\;\;\;\frac{x}{1 + \frac{b}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\end{array}
\end{array}
if a < -1.5e13Initial program 81.7%
*-commutative81.7%
associate-*l/85.2%
associate-+l+85.2%
associate-*r/85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in a around inf 75.8%
if -1.5e13 < a < -7.50000000000000069e-304Initial program 70.3%
*-commutative70.3%
associate-*l/73.2%
associate-+l+73.2%
associate-*r/79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in t around 0 55.1%
if -7.50000000000000069e-304 < a < 1.8999999999999999Initial program 82.6%
Taylor expanded in x around inf 61.5%
Taylor expanded in a around 0 60.7%
associate-*r/63.4%
*-commutative63.4%
Applied egg-rr63.4%
*-commutative63.4%
clear-num63.4%
div-inv63.5%
Applied egg-rr63.5%
if 1.8999999999999999 < a Initial program 67.5%
associate-/l*66.1%
associate-*l/72.1%
*-commutative72.1%
cancel-sign-sub72.1%
*-commutative72.1%
associate-*l/66.1%
associate-+r-66.1%
associate-*l/72.1%
*-commutative72.1%
cancel-sign-sub72.1%
*-commutative72.1%
associate-*l/66.1%
*-commutative66.1%
associate-/l*72.1%
Simplified72.1%
associate-/r/74.9%
Applied egg-rr74.9%
Taylor expanded in a around inf 61.3%
Final simplification63.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -13500000000000.0)
(/ (+ x (/ y (/ t z))) a)
(if (<= a -1.55e-303)
(/ z b)
(if (<= a 0.95) (/ x (+ 1.0 (/ b (/ t y)))) (/ (+ x (* z (/ y t))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -13500000000000.0) {
tmp = (x + (y / (t / z))) / a;
} else if (a <= -1.55e-303) {
tmp = z / b;
} else if (a <= 0.95) {
tmp = x / (1.0 + (b / (t / y)));
} else {
tmp = (x + (z * (y / t))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (a <= (-13500000000000.0d0)) then
tmp = (x + (y / (t / z))) / a
else if (a <= (-1.55d-303)) then
tmp = z / b
else if (a <= 0.95d0) then
tmp = x / (1.0d0 + (b / (t / y)))
else
tmp = (x + (z * (y / t))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -13500000000000.0) {
tmp = (x + (y / (t / z))) / a;
} else if (a <= -1.55e-303) {
tmp = z / b;
} else if (a <= 0.95) {
tmp = x / (1.0 + (b / (t / y)));
} else {
tmp = (x + (z * (y / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -13500000000000.0: tmp = (x + (y / (t / z))) / a elif a <= -1.55e-303: tmp = z / b elif a <= 0.95: tmp = x / (1.0 + (b / (t / y))) else: tmp = (x + (z * (y / t))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -13500000000000.0) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); elseif (a <= -1.55e-303) tmp = Float64(z / b); elseif (a <= 0.95) tmp = Float64(x / Float64(1.0 + Float64(b / Float64(t / y)))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -13500000000000.0) tmp = (x + (y / (t / z))) / a; elseif (a <= -1.55e-303) tmp = z / b; elseif (a <= 0.95) tmp = x / (1.0 + (b / (t / y))); else tmp = (x + (z * (y / t))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -13500000000000.0], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.55e-303], N[(z / b), $MachinePrecision], If[LessEqual[a, 0.95], N[(x / N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -13500000000000:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{-303}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 0.95:\\
\;\;\;\;\frac{x}{1 + \frac{b}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\end{array}
\end{array}
if a < -1.35e13Initial program 81.7%
associate-/l*85.2%
associate-*l/87.0%
*-commutative87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-*l/85.2%
associate-+r-85.2%
associate-*l/87.0%
*-commutative87.0%
cancel-sign-sub87.0%
*-commutative87.0%
associate-*l/85.2%
*-commutative85.2%
associate-/l*87.1%
Simplified87.1%
associate-/r/85.8%
Applied egg-rr85.8%
Taylor expanded in a around inf 72.3%
associate-/l*75.8%
Simplified75.8%
if -1.35e13 < a < -1.55e-303Initial program 70.3%
*-commutative70.3%
associate-*l/73.2%
associate-+l+73.2%
associate-*r/79.7%
*-commutative79.7%
Simplified79.7%
Taylor expanded in t around 0 55.1%
if -1.55e-303 < a < 0.94999999999999996Initial program 82.6%
Taylor expanded in x around inf 61.5%
Taylor expanded in a around 0 60.7%
associate-*r/63.4%
*-commutative63.4%
Applied egg-rr63.4%
*-commutative63.4%
clear-num63.4%
div-inv63.5%
Applied egg-rr63.5%
if 0.94999999999999996 < a Initial program 67.5%
associate-/l*66.1%
associate-*l/72.1%
*-commutative72.1%
cancel-sign-sub72.1%
*-commutative72.1%
associate-*l/66.1%
associate-+r-66.1%
associate-*l/72.1%
*-commutative72.1%
cancel-sign-sub72.1%
*-commutative72.1%
associate-*l/66.1%
*-commutative66.1%
associate-/l*72.1%
Simplified72.1%
associate-/r/74.9%
Applied egg-rr74.9%
Taylor expanded in a around inf 61.3%
Final simplification63.1%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -5.4e+29)
(not
(or (<= y 550000000000.0)
(and (not (<= y 2.6e+85)) (<= y 5.6e+133)))))
(/ z b)
(/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e+29) || !((y <= 550000000000.0) || (!(y <= 2.6e+85) && (y <= 5.6e+133)))) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.4d+29)) .or. (.not. (y <= 550000000000.0d0) .or. (.not. (y <= 2.6d+85)) .and. (y <= 5.6d+133))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e+29) || !((y <= 550000000000.0) || (!(y <= 2.6e+85) && (y <= 5.6e+133)))) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.4e+29) or not ((y <= 550000000000.0) or (not (y <= 2.6e+85) and (y <= 5.6e+133))): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.4e+29) || !((y <= 550000000000.0) || (!(y <= 2.6e+85) && (y <= 5.6e+133)))) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.4e+29) || ~(((y <= 550000000000.0) || (~((y <= 2.6e+85)) && (y <= 5.6e+133))))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.4e+29], N[Not[Or[LessEqual[y, 550000000000.0], And[N[Not[LessEqual[y, 2.6e+85]], $MachinePrecision], LessEqual[y, 5.6e+133]]]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+29} \lor \neg \left(y \leq 550000000000 \lor \neg \left(y \leq 2.6 \cdot 10^{+85}\right) \land y \leq 5.6 \cdot 10^{+133}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -5.4e29 or 5.5e11 < y < 2.60000000000000011e85 or 5.60000000000000033e133 < y Initial program 52.8%
*-commutative52.8%
associate-*l/57.9%
associate-+l+57.9%
associate-*r/69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in t around 0 56.6%
if -5.4e29 < y < 5.5e11 or 2.60000000000000011e85 < y < 5.60000000000000033e133Initial program 95.0%
*-commutative95.0%
associate-*l/92.1%
associate-+l+92.1%
associate-*r/87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in t around inf 63.0%
Final simplification60.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -880000.0) (not (<= a 3.8))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -880000.0) || !(a <= 3.8)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((a <= (-880000.0d0)) .or. (.not. (a <= 3.8d0))) 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 b) {
double tmp;
if ((a <= -880000.0) || !(a <= 3.8)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -880000.0) or not (a <= 3.8): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -880000.0) || !(a <= 3.8)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -880000.0) || ~((a <= 3.8))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -880000.0], N[Not[LessEqual[a, 3.8]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -880000 \lor \neg \left(a \leq 3.8\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.8e5 or 3.7999999999999998 < a Initial program 74.2%
Taylor expanded in x around inf 53.4%
Taylor expanded in a around inf 47.1%
if -8.8e5 < a < 3.7999999999999998Initial program 76.1%
*-commutative76.1%
associate-*l/76.2%
associate-+l+76.2%
associate-*r/80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in a around 0 74.8%
Taylor expanded in t around inf 34.9%
Final simplification40.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3.7e+138) x (if (<= t 1.85e+34) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.7e+138) {
tmp = x;
} else if (t <= 1.85e+34) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (t <= (-3.7d+138)) then
tmp = x
else if (t <= 1.85d+34) then
tmp = z / b
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 b) {
double tmp;
if (t <= -3.7e+138) {
tmp = x;
} else if (t <= 1.85e+34) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.7e+138: tmp = x elif t <= 1.85e+34: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.7e+138) tmp = x; elseif (t <= 1.85e+34) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.7e+138) tmp = x; elseif (t <= 1.85e+34) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.7e+138], x, If[LessEqual[t, 1.85e+34], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+138}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -3.69999999999999979e138Initial program 83.3%
*-commutative83.3%
associate-*l/88.4%
associate-+l+88.4%
associate-*r/93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in a around 0 47.7%
Taylor expanded in t around inf 36.3%
if -3.69999999999999979e138 < t < 1.85000000000000004e34Initial program 72.8%
*-commutative72.8%
associate-*l/70.3%
associate-+l+70.3%
associate-*r/70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in t around 0 52.5%
if 1.85000000000000004e34 < t Initial program 75.7%
Taylor expanded in x around inf 68.3%
Taylor expanded in a around inf 36.8%
Final simplification46.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -4.5e+141) (- x (* x a)) (if (<= t 1.9e+35) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e+141) {
tmp = x - (x * a);
} else if (t <= 1.9e+35) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (t <= (-4.5d+141)) then
tmp = x - (x * a)
else if (t <= 1.9d+35) then
tmp = z / b
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 b) {
double tmp;
if (t <= -4.5e+141) {
tmp = x - (x * a);
} else if (t <= 1.9e+35) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.5e+141: tmp = x - (x * a) elif t <= 1.9e+35: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.5e+141) tmp = Float64(x - Float64(x * a)); elseif (t <= 1.9e+35) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.5e+141) tmp = x - (x * a); elseif (t <= 1.9e+35) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e+141], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+35], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+141}:\\
\;\;\;\;x - x \cdot a\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+35}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -4.5000000000000002e141Initial program 83.3%
*-commutative83.3%
associate-*l/88.4%
associate-+l+88.4%
associate-*r/93.0%
*-commutative93.0%
Simplified93.0%
Taylor expanded in t around inf 66.0%
Taylor expanded in a around 0 37.8%
mul-1-neg37.8%
unsub-neg37.8%
Simplified37.8%
if -4.5000000000000002e141 < t < 1.9e35Initial program 72.8%
*-commutative72.8%
associate-*l/70.3%
associate-+l+70.3%
associate-*r/70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in t around 0 52.5%
if 1.9e35 < t Initial program 75.7%
Taylor expanded in x around inf 68.3%
Taylor expanded in a around inf 36.8%
Final simplification46.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 75.2%
*-commutative75.2%
associate-*l/76.1%
associate-+l+76.1%
associate-*r/79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in a around 0 47.2%
Taylor expanded in t around inf 20.7%
Final simplification20.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
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 b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023306
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))