
(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 17 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))))
(t_2 (* (/ y t) (/ z (+ 1.0 (fma y (/ b t) a))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -5e-317)
t_1
(if (<= t_1 0.0)
(+
(/ z b)
(- (/ (/ t (/ b x)) y) (/ t (/ (* y (pow b 2.0)) (* z (+ a 1.0))))))
(if (<= t_1 1e+263) t_1 (if (<= t_1 INFINITY) t_2 (/ z b))))))))
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 t_2 = (y / t) * (z / (1.0 + fma(y, (b / t), a)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -5e-317) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + (((t / (b / x)) / y) - (t / ((y * pow(b, 2.0)) / (z * (a + 1.0)))));
} else if (t_1 <= 1e+263) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
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))) t_2 = Float64(Float64(y / t) * Float64(z / Float64(1.0 + fma(y, Float64(b / t), a)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -5e-317) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(Float64(t / Float64(b / x)) / y) - Float64(t / Float64(Float64(y * (b ^ 2.0)) / Float64(z * Float64(a + 1.0)))))); elseif (t_1 <= 1e+263) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return 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]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-317], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] - N[(t / N[(N[(y * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+263], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \frac{y}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-317}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \left(\frac{\frac{t}{\frac{b}{x}}}{y} - \frac{t}{\frac{y \cdot {b}^{2}}{z \cdot \left(a + 1\right)}}\right)\\
\mathbf{elif}\;t_1 \leq 10^{+263}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 1.00000000000000002e263 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 28.7%
associate-/l*57.0%
associate-+l+57.0%
associate-/l*57.0%
Simplified57.0%
Taylor expanded in x around 0 56.2%
times-frac94.5%
+-commutative94.5%
*-commutative94.5%
associate-*r/94.3%
fma-udef94.3%
Simplified94.3%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.00000017e-317 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000002e263Initial program 99.4%
if -5.00000017e-317 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 49.8%
associate-/l*49.6%
associate-+l+49.6%
associate-/l*71.9%
Simplified71.9%
clear-num71.9%
associate-+r+71.9%
associate-/l*49.6%
associate-/l*49.8%
inv-pow49.8%
associate-+l+49.8%
+-commutative49.8%
*-commutative49.8%
associate-*l/74.9%
*-commutative74.9%
fma-def74.9%
+-commutative74.9%
associate-/l*71.9%
associate-/r/67.0%
fma-def67.0%
Applied egg-rr67.0%
unpow-167.0%
fma-udef67.0%
associate-*l/74.9%
associate-*r/74.7%
fma-udef74.7%
Simplified74.7%
Taylor expanded in y around inf 63.0%
associate--l+63.0%
associate-/r*64.2%
associate-/l*77.2%
associate-/l*77.2%
*-commutative77.2%
Simplified77.2%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*1.1%
associate-+l+1.1%
associate-/l*13.0%
Simplified13.0%
Taylor expanded in y around inf 94.2%
Final simplification95.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (* (/ y t) (/ z (+ 1.0 (fma y (/ b t) a))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -5e-282)
t_1
(if (<= t_1 2e-103)
(/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (* b (/ y t)))))
(if (<= t_1 1e+263) t_1 (if (<= t_1 INFINITY) t_2 (/ z b))))))))
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 t_2 = (y / t) * (z / (1.0 + fma(y, (b / t), a)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -5e-282) {
tmp = t_1;
} else if (t_1 <= 2e-103) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else if (t_1 <= 1e+263) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
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))) t_2 = Float64(Float64(y / t) * Float64(z / Float64(1.0 + fma(y, Float64(b / t), a)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -5e-282) tmp = t_1; elseif (t_1 <= 2e-103) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); elseif (t_1 <= 1e+263) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return 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]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-282], t$95$1, If[LessEqual[t$95$1, 2e-103], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+263], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \frac{y}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-282}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-103}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t_1 \leq 10^{+263}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 1.00000000000000002e263 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 28.7%
associate-/l*57.0%
associate-+l+57.0%
associate-/l*57.0%
Simplified57.0%
Taylor expanded in x around 0 56.2%
times-frac94.5%
+-commutative94.5%
*-commutative94.5%
associate-*r/94.3%
fma-udef94.3%
Simplified94.3%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000001e-282 or 1.99999999999999992e-103 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000002e263Initial program 99.7%
if -5.0000000000000001e-282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.99999999999999992e-103Initial program 72.6%
associate-/l*73.4%
associate-+l+73.4%
associate-/l*81.8%
Simplified81.8%
associate-/r/71.2%
Applied egg-rr85.1%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*1.1%
associate-+l+1.1%
associate-/l*13.0%
Simplified13.0%
Taylor expanded in y around inf 94.2%
Final simplification95.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0)))
(t_2 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -3.1e+31)
t_2
(if (<= y 1.02e-112)
t_1
(if (<= y 3.35e-47)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 5.6e+58)
(+ (/ y (/ (* t a) z)) (/ x (+ a 1.0)))
(if (or (<= y 3.1e+118) (not (<= y 7.8e+128))) t_2 t_1)))))))
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 / b) + ((t / b) * (x / y));
double tmp;
if (y <= -3.1e+31) {
tmp = t_2;
} else if (y <= 1.02e-112) {
tmp = t_1;
} else if (y <= 3.35e-47) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 5.6e+58) {
tmp = (y / ((t * a) / z)) + (x / (a + 1.0));
} else if ((y <= 3.1e+118) || !(y <= 7.8e+128)) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
t_2 = (z / b) + ((t / b) * (x / y))
if (y <= (-3.1d+31)) then
tmp = t_2
else if (y <= 1.02d-112) then
tmp = t_1
else if (y <= 3.35d-47) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 5.6d+58) then
tmp = (y / ((t * a) / z)) + (x / (a + 1.0d0))
else if ((y <= 3.1d+118) .or. (.not. (y <= 7.8d+128))) then
tmp = t_2
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)) / (a + 1.0);
double t_2 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -3.1e+31) {
tmp = t_2;
} else if (y <= 1.02e-112) {
tmp = t_1;
} else if (y <= 3.35e-47) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 5.6e+58) {
tmp = (y / ((t * a) / z)) + (x / (a + 1.0));
} else if ((y <= 3.1e+118) || !(y <= 7.8e+128)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (a + 1.0) t_2 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -3.1e+31: tmp = t_2 elif y <= 1.02e-112: tmp = t_1 elif y <= 3.35e-47: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 5.6e+58: tmp = (y / ((t * a) / z)) + (x / (a + 1.0)) elif (y <= 3.1e+118) or not (y <= 7.8e+128): tmp = t_2 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(a + 1.0)) t_2 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -3.1e+31) tmp = t_2; elseif (y <= 1.02e-112) tmp = t_1; elseif (y <= 3.35e-47) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 5.6e+58) tmp = Float64(Float64(y / Float64(Float64(t * a) / z)) + Float64(x / Float64(a + 1.0))); elseif ((y <= 3.1e+118) || !(y <= 7.8e+128)) tmp = t_2; else tmp = t_1; 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 / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -3.1e+31) tmp = t_2; elseif (y <= 1.02e-112) tmp = t_1; elseif (y <= 3.35e-47) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 5.6e+58) tmp = (y / ((t * a) / z)) + (x / (a + 1.0)); elseif ((y <= 3.1e+118) || ~((y <= 7.8e+128))) tmp = t_2; 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[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+31], t$95$2, If[LessEqual[y, 1.02e-112], t$95$1, If[LessEqual[y, 3.35e-47], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e+58], N[(N[(y / N[(N[(t * a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.1e+118], N[Not[LessEqual[y, 7.8e+128]], $MachinePrecision]], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
t_2 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.35 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+58}:\\
\;\;\;\;\frac{y}{\frac{t \cdot a}{z}} + \frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+118} \lor \neg \left(y \leq 7.8 \cdot 10^{+128}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.1000000000000002e31 or 5.5999999999999996e58 < y < 3.09999999999999986e118 or 7.7999999999999994e128 < y Initial program 51.5%
associate-/l*61.5%
associate-+l+61.5%
associate-/l*70.3%
Simplified70.3%
clear-num70.3%
associate-+r+70.3%
associate-/l*61.4%
associate-/l*51.5%
inv-pow51.5%
associate-+l+51.5%
+-commutative51.5%
*-commutative51.5%
associate-*l/58.6%
*-commutative58.6%
fma-def58.6%
+-commutative58.6%
associate-/l*70.3%
associate-/r/60.9%
fma-def60.9%
Applied egg-rr60.9%
unpow-160.9%
fma-udef60.9%
associate-*l/58.6%
associate-*r/71.0%
fma-udef71.0%
Simplified71.0%
Taylor expanded in b around inf 32.3%
times-frac40.9%
associate-/l*47.3%
Simplified47.3%
Taylor expanded in t around 0 61.0%
+-commutative61.0%
times-frac68.4%
Simplified68.4%
if -3.1000000000000002e31 < y < 1.01999999999999996e-112 or 3.09999999999999986e118 < y < 7.7999999999999994e128Initial program 93.6%
associate-/l*88.1%
associate-+l+88.1%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in b around 0 80.2%
if 1.01999999999999996e-112 < y < 3.3499999999999999e-47Initial program 88.4%
associate-/l*88.4%
associate-+l+88.4%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in x around inf 82.9%
if 3.3499999999999999e-47 < y < 5.5999999999999996e58Initial program 70.8%
associate-/l*70.8%
associate-+l+70.8%
associate-/l*64.8%
Simplified64.8%
Taylor expanded in y around 0 57.1%
Taylor expanded in a around inf 63.7%
associate-/l*63.7%
*-commutative63.7%
Simplified63.7%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y z) (+ (* y b) (* t (+ a 1.0)))))
(t_2 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -4.7e+30)
t_2
(if (<= y 3.5e-52)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= y 96000000000000.0)
t_1
(if (<= y 6.6e+78)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= y 6.6e+128) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * z) / ((y * b) + (t * (a + 1.0)));
double t_2 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -4.7e+30) {
tmp = t_2;
} else if (y <= 3.5e-52) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 96000000000000.0) {
tmp = t_1;
} else if (y <= 6.6e+78) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 6.6e+128) {
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 = (y * z) / ((y * b) + (t * (a + 1.0d0)))
t_2 = (z / b) + ((t / b) * (x / y))
if (y <= (-4.7d+30)) then
tmp = t_2
else if (y <= 3.5d-52) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (y <= 96000000000000.0d0) then
tmp = t_1
else if (y <= 6.6d+78) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (y <= 6.6d+128) 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 = (y * z) / ((y * b) + (t * (a + 1.0)));
double t_2 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -4.7e+30) {
tmp = t_2;
} else if (y <= 3.5e-52) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 96000000000000.0) {
tmp = t_1;
} else if (y <= 6.6e+78) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 6.6e+128) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * z) / ((y * b) + (t * (a + 1.0))) t_2 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -4.7e+30: tmp = t_2 elif y <= 3.5e-52: tmp = (x + ((y * z) / t)) / (a + 1.0) elif y <= 96000000000000.0: tmp = t_1 elif y <= 6.6e+78: tmp = (x + (y * (z / t))) / (a + 1.0) elif y <= 6.6e+128: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))) t_2 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -4.7e+30) tmp = t_2; elseif (y <= 3.5e-52) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (y <= 96000000000000.0) tmp = t_1; elseif (y <= 6.6e+78) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (y <= 6.6e+128) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * z) / ((y * b) + (t * (a + 1.0))); t_2 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -4.7e+30) tmp = t_2; elseif (y <= 3.5e-52) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (y <= 96000000000000.0) tmp = t_1; elseif (y <= 6.6e+78) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (y <= 6.6e+128) 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[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e+30], t$95$2, If[LessEqual[y, 3.5e-52], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 96000000000000.0], t$95$1, If[LessEqual[y, 6.6e+78], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.6e+128], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
t_2 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{+30}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-52}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 96000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+78}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+128}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.6999999999999999e30 or 6.6000000000000001e128 < y Initial program 49.9%
associate-/l*59.4%
associate-+l+59.4%
associate-/l*69.6%
Simplified69.6%
clear-num69.6%
associate-+r+69.6%
associate-/l*59.3%
associate-/l*49.8%
inv-pow49.8%
associate-+l+49.8%
+-commutative49.8%
*-commutative49.8%
associate-*l/58.0%
*-commutative58.0%
fma-def58.0%
+-commutative58.0%
associate-/l*69.6%
associate-/r/60.8%
fma-def60.8%
Applied egg-rr60.8%
unpow-160.8%
fma-udef60.8%
associate-*l/58.0%
associate-*r/70.5%
fma-udef70.5%
Simplified70.5%
Taylor expanded in b around inf 30.6%
times-frac40.5%
associate-/l*47.0%
Simplified47.0%
Taylor expanded in t around 0 60.7%
+-commutative60.7%
times-frac68.3%
Simplified68.3%
if -4.6999999999999999e30 < y < 3.5e-52Initial program 92.6%
associate-/l*88.3%
associate-+l+88.3%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in b around 0 76.6%
if 3.5e-52 < y < 9.6e13 or 6.6e78 < y < 6.6000000000000001e128Initial program 73.6%
associate-/l*70.1%
associate-+l+70.1%
associate-/l*66.4%
Simplified66.4%
clear-num66.2%
associate-+r+66.2%
associate-/l*70.1%
associate-/l*73.7%
inv-pow73.7%
associate-+l+73.7%
+-commutative73.7%
*-commutative73.7%
associate-*l/70.0%
*-commutative70.0%
fma-def70.0%
+-commutative70.0%
associate-/l*66.2%
associate-/r/62.1%
fma-def62.1%
Applied egg-rr62.1%
unpow-162.1%
fma-udef62.1%
associate-*l/70.0%
associate-*r/66.2%
fma-udef66.2%
Simplified66.2%
Taylor expanded in z around inf 66.7%
*-commutative66.7%
associate-/l*65.9%
associate-/r/62.8%
Simplified62.8%
Taylor expanded in t around 0 74.2%
if 9.6e13 < y < 6.6e78Initial program 68.1%
associate-/l*83.8%
associate-+l+83.8%
associate-/l*83.8%
Simplified83.8%
clear-num83.6%
associate-+r+83.6%
associate-/l*83.6%
associate-/l*68.0%
inv-pow68.0%
associate-+l+68.0%
+-commutative68.0%
*-commutative68.0%
associate-*l/68.0%
*-commutative68.0%
fma-def68.0%
+-commutative68.0%
associate-/l*83.4%
associate-/r/83.4%
fma-def83.4%
Applied egg-rr83.4%
unpow-183.4%
fma-udef83.4%
associate-*l/68.0%
associate-*r/83.6%
fma-udef83.6%
Simplified83.6%
Taylor expanded in b around 0 67.8%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in y around 0 67.8%
associate-*r/75.7%
Simplified75.7%
Final simplification73.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.5e-145) (not (<= t 2.56e-182))) (/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (* b (/ y t))))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.5e-145) || !(t <= 2.56e-182)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else {
tmp = (y * z) / ((y * b) + (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 ((t <= (-5.5d-145)) .or. (.not. (t <= 2.56d-182))) then
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (b * (y / t))))
else
tmp = (y * z) / ((y * b) + (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 ((t <= -5.5e-145) || !(t <= 2.56e-182)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.5e-145) or not (t <= 2.56e-182): tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.5e-145) || !(t <= 2.56e-182)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.5e-145) || ~((t <= 2.56e-182))) tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.5e-145], N[Not[LessEqual[t, 2.56e-182]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-145} \lor \neg \left(t \leq 2.56 \cdot 10^{-182}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -5.50000000000000015e-145 or 2.5600000000000001e-182 < t Initial program 80.7%
associate-/l*85.4%
associate-+l+85.4%
associate-/l*89.7%
Simplified89.7%
associate-/r/58.6%
Applied egg-rr88.2%
if -5.50000000000000015e-145 < t < 2.5600000000000001e-182Initial program 51.0%
associate-/l*42.4%
associate-+l+42.4%
associate-/l*39.2%
Simplified39.2%
clear-num39.1%
associate-+r+39.1%
associate-/l*42.4%
associate-/l*50.9%
inv-pow50.9%
associate-+l+50.9%
+-commutative50.9%
*-commutative50.9%
associate-*l/47.6%
*-commutative47.6%
fma-def47.6%
+-commutative47.6%
associate-/l*39.1%
associate-/r/35.1%
fma-def35.1%
Applied egg-rr35.1%
unpow-135.1%
fma-udef35.1%
associate-*l/47.6%
associate-*r/39.1%
fma-udef39.1%
Simplified39.1%
Taylor expanded in z around inf 48.9%
*-commutative48.9%
associate-/l*48.5%
associate-/r/40.2%
Simplified40.2%
Taylor expanded in t around 0 73.7%
Final simplification85.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.5e-172) (not (<= t 2.56e-182))) (/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (/ y (/ t b))))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e-172) || !(t <= 2.56e-182)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = (z / b) + ((x * t) / (y * 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 <= (-6.5d-172)) .or. (.not. (t <= 2.56d-182))) then
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (y / (t / b))))
else
tmp = (z / b) + ((x * t) / (y * 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 <= -6.5e-172) || !(t <= 2.56e-182)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.5e-172) or not (t <= 2.56e-182): tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.5e-172) || !(t <= 2.56e-182)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.5e-172) || ~((t <= 2.56e-182))) tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.5e-172], N[Not[LessEqual[t, 2.56e-182]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-172} \lor \neg \left(t \leq 2.56 \cdot 10^{-182}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -6.50000000000000012e-172 or 2.5600000000000001e-182 < t Initial program 80.2%
associate-/l*84.2%
associate-+l+84.2%
associate-/l*88.4%
Simplified88.4%
if -6.50000000000000012e-172 < t < 2.5600000000000001e-182Initial program 46.8%
associate-/l*38.5%
associate-+l+38.5%
associate-/l*34.5%
Simplified34.5%
clear-num34.5%
associate-+r+34.5%
associate-/l*38.5%
associate-/l*46.7%
inv-pow46.7%
associate-+l+46.7%
+-commutative46.7%
*-commutative46.7%
associate-*l/42.7%
*-commutative42.7%
fma-def42.7%
+-commutative42.7%
associate-/l*34.5%
associate-/r/29.6%
fma-def29.6%
Applied egg-rr29.6%
unpow-129.6%
fma-udef29.6%
associate-*l/42.7%
associate-*r/34.5%
fma-udef34.5%
Simplified34.5%
Taylor expanded in b around inf 45.9%
times-frac32.2%
associate-/l*32.2%
Simplified32.2%
Taylor expanded in t around 0 77.8%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.3e-172)
(/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t 2.56e-182)
(+ (/ z b) (/ (* x t) (* y b)))
(/ (+ x (/ z (/ t y))) (+ 1.0 (+ a (* y (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.3e-172) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
} else if (t <= 2.56e-182) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (z / (t / y))) / (1.0 + (a + (y * (b / t))));
}
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 <= (-2.3d-172)) then
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (y / (t / b))))
else if (t <= 2.56d-182) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = (x + (z / (t / y))) / (1.0d0 + (a + (y * (b / t))))
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 <= -2.3e-172) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
} else if (t <= 2.56e-182) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (z / (t / y))) / (1.0 + (a + (y * (b / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.3e-172: tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))) elif t <= 2.56e-182: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = (x + (z / (t / y))) / (1.0 + (a + (y * (b / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.3e-172) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t <= 2.56e-182) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.3e-172) tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))); elseif (t <= 2.56e-182) tmp = (z / b) + ((x * t) / (y * b)); else tmp = (x + (z / (t / y))) / (1.0 + (a + (y * (b / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.3e-172], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.56e-182], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-172}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t \leq 2.56 \cdot 10^{-182}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\end{array}
\end{array}
if t < -2.29999999999999995e-172Initial program 85.4%
associate-/l*84.6%
associate-+l+84.6%
associate-/l*88.2%
Simplified88.2%
if -2.29999999999999995e-172 < t < 2.5600000000000001e-182Initial program 46.8%
associate-/l*38.5%
associate-+l+38.5%
associate-/l*34.5%
Simplified34.5%
clear-num34.5%
associate-+r+34.5%
associate-/l*38.5%
associate-/l*46.7%
inv-pow46.7%
associate-+l+46.7%
+-commutative46.7%
*-commutative46.7%
associate-*l/42.7%
*-commutative42.7%
fma-def42.7%
+-commutative42.7%
associate-/l*34.5%
associate-/r/29.6%
fma-def29.6%
Applied egg-rr29.6%
unpow-129.6%
fma-udef29.6%
associate-*l/42.7%
associate-*r/34.5%
fma-udef34.5%
Simplified34.5%
Taylor expanded in b around inf 45.9%
times-frac32.2%
associate-/l*32.2%
Simplified32.2%
Taylor expanded in t around 0 77.8%
if 2.5600000000000001e-182 < t Initial program 74.7%
*-commutative74.7%
associate-/l*83.7%
+-commutative83.7%
associate-+l+83.7%
associate-*r/89.4%
*-commutative89.4%
Simplified89.4%
Final simplification86.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -46000000000000.0)
t_1
(if (<= y 1.14e-73)
(/ x (+ a 1.0))
(if (<= y 3e+15)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y 1.5e+60) (/ (+ x (/ (* y z) t)) a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -46000000000000.0) {
tmp = t_1;
} else if (y <= 1.14e-73) {
tmp = x / (a + 1.0);
} else if (y <= 3e+15) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= 1.5e+60) {
tmp = (x + ((y * z) / t)) / a;
} 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 = (z / b) + ((t / b) * (x / y))
if (y <= (-46000000000000.0d0)) then
tmp = t_1
else if (y <= 1.14d-73) then
tmp = x / (a + 1.0d0)
else if (y <= 3d+15) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= 1.5d+60) then
tmp = (x + ((y * z) / t)) / a
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 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -46000000000000.0) {
tmp = t_1;
} else if (y <= 1.14e-73) {
tmp = x / (a + 1.0);
} else if (y <= 3e+15) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= 1.5e+60) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -46000000000000.0: tmp = t_1 elif y <= 1.14e-73: tmp = x / (a + 1.0) elif y <= 3e+15: tmp = (z / b) + ((x * t) / (y * b)) elif y <= 1.5e+60: tmp = (x + ((y * z) / t)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -46000000000000.0) tmp = t_1; elseif (y <= 1.14e-73) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 3e+15) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= 1.5e+60) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -46000000000000.0) tmp = t_1; elseif (y <= 1.14e-73) tmp = x / (a + 1.0); elseif (y <= 3e+15) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= 1.5e+60) tmp = (x + ((y * z) / t)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -46000000000000.0], t$95$1, If[LessEqual[y, 1.14e-73], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+15], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+60], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -46000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.14 \cdot 10^{-73}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+15}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+60}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.6e13 or 1.4999999999999999e60 < y Initial program 55.2%
associate-/l*63.5%
associate-+l+63.5%
associate-/l*71.6%
Simplified71.6%
clear-num71.5%
associate-+r+71.5%
associate-/l*63.4%
associate-/l*55.2%
inv-pow55.2%
associate-+l+55.2%
+-commutative55.2%
*-commutative55.2%
associate-*l/61.6%
*-commutative61.6%
fma-def61.6%
+-commutative61.6%
associate-/l*71.5%
associate-/r/63.7%
fma-def63.7%
Applied egg-rr63.7%
unpow-163.7%
fma-udef63.7%
associate-*l/61.6%
associate-*r/72.1%
fma-udef72.2%
Simplified72.2%
Taylor expanded in b around inf 31.2%
times-frac38.9%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in t around 0 57.2%
+-commutative57.2%
times-frac63.9%
Simplified63.9%
if -4.6e13 < y < 1.14000000000000005e-73Initial program 93.4%
associate-/l*88.7%
associate-+l+88.7%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in y around 0 64.8%
if 1.14000000000000005e-73 < y < 3e15Initial program 72.2%
associate-/l*72.2%
associate-+l+72.2%
associate-/l*66.6%
Simplified66.6%
clear-num66.5%
associate-+r+66.5%
associate-/l*72.2%
associate-/l*72.1%
inv-pow72.1%
associate-+l+72.1%
+-commutative72.1%
*-commutative72.1%
associate-*l/66.6%
*-commutative66.6%
fma-def66.6%
+-commutative66.6%
associate-/l*66.5%
associate-/r/66.6%
fma-def66.6%
Applied egg-rr66.6%
unpow-166.6%
fma-udef66.6%
associate-*l/66.6%
associate-*r/66.5%
fma-udef66.5%
Simplified66.5%
Taylor expanded in b around inf 54.0%
times-frac37.3%
associate-/l*37.3%
Simplified37.3%
Taylor expanded in t around 0 62.1%
if 3e15 < y < 1.4999999999999999e60Initial program 86.3%
associate-/l*86.1%
associate-+l+86.1%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in a around inf 72.0%
Final simplification64.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0)))
(t_2 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -7.2e+31)
t_2
(if (<= y 1.8e-73)
t_1
(if (<= y 1.1e+18)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y 1.7e+75) 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 / b) + ((t / b) * (x / y));
double tmp;
if (y <= -7.2e+31) {
tmp = t_2;
} else if (y <= 1.8e-73) {
tmp = t_1;
} else if (y <= 1.1e+18) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= 1.7e+75) {
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 / b) + ((t / b) * (x / y))
if (y <= (-7.2d+31)) then
tmp = t_2
else if (y <= 1.8d-73) then
tmp = t_1
else if (y <= 1.1d+18) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= 1.7d+75) 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 / b) + ((t / b) * (x / y));
double tmp;
if (y <= -7.2e+31) {
tmp = t_2;
} else if (y <= 1.8e-73) {
tmp = t_1;
} else if (y <= 1.1e+18) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= 1.7e+75) {
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 / b) + ((t / b) * (x / y)) tmp = 0 if y <= -7.2e+31: tmp = t_2 elif y <= 1.8e-73: tmp = t_1 elif y <= 1.1e+18: tmp = (z / b) + ((x * t) / (y * b)) elif y <= 1.7e+75: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)) t_2 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -7.2e+31) tmp = t_2; elseif (y <= 1.8e-73) tmp = t_1; elseif (y <= 1.1e+18) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= 1.7e+75) 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 / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -7.2e+31) tmp = t_2; elseif (y <= 1.8e-73) tmp = t_1; elseif (y <= 1.1e+18) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= 1.7e+75) 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[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e+31], t$95$2, If[LessEqual[y, 1.8e-73], t$95$1, If[LessEqual[y, 1.1e+18], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+75], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
t_2 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+18}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -7.19999999999999992e31 or 1.70000000000000006e75 < y Initial program 54.1%
associate-/l*62.2%
associate-+l+62.2%
associate-/l*70.9%
Simplified70.9%
clear-num70.8%
associate-+r+70.8%
associate-/l*62.2%
associate-/l*54.1%
inv-pow54.1%
associate-+l+54.1%
+-commutative54.1%
*-commutative54.1%
associate-*l/61.0%
*-commutative61.0%
fma-def61.0%
+-commutative61.0%
associate-/l*70.8%
associate-/r/62.5%
fma-def62.5%
Applied egg-rr62.5%
unpow-162.5%
fma-udef62.5%
associate-*l/61.0%
associate-*r/71.6%
fma-udef71.6%
Simplified71.6%
Taylor expanded in b around inf 31.7%
times-frac40.1%
associate-/l*46.4%
Simplified46.4%
Taylor expanded in t around 0 58.9%
+-commutative58.9%
times-frac66.2%
Simplified66.2%
if -7.19999999999999992e31 < y < 1.8e-73 or 1.1e18 < y < 1.70000000000000006e75Initial program 91.3%
associate-/l*87.9%
associate-+l+87.9%
associate-/l*86.4%
Simplified86.4%
clear-num85.9%
associate-+r+85.9%
associate-/l*87.3%
associate-/l*90.7%
inv-pow90.7%
associate-+l+90.7%
+-commutative90.7%
*-commutative90.7%
associate-*l/89.3%
*-commutative89.3%
fma-def89.3%
+-commutative89.3%
associate-/l*86.0%
associate-/r/90.4%
fma-def90.4%
Applied egg-rr90.4%
unpow-190.4%
fma-udef90.4%
associate-*l/89.3%
associate-*r/85.9%
fma-udef85.9%
Simplified85.9%
Taylor expanded in b around 0 77.9%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in y around 0 77.9%
associate-*r/75.2%
Simplified75.2%
if 1.8e-73 < y < 1.1e18Initial program 72.2%
associate-/l*72.2%
associate-+l+72.2%
associate-/l*66.6%
Simplified66.6%
clear-num66.5%
associate-+r+66.5%
associate-/l*72.2%
associate-/l*72.1%
inv-pow72.1%
associate-+l+72.1%
+-commutative72.1%
*-commutative72.1%
associate-*l/66.6%
*-commutative66.6%
fma-def66.6%
+-commutative66.6%
associate-/l*66.5%
associate-/r/66.6%
fma-def66.6%
Applied egg-rr66.6%
unpow-166.6%
fma-udef66.6%
associate-*l/66.6%
associate-*r/66.5%
fma-udef66.5%
Simplified66.5%
Taylor expanded in b around inf 54.0%
times-frac37.3%
associate-/l*37.3%
Simplified37.3%
Taylor expanded in t around 0 62.1%
Final simplification70.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7.2e+73)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t -2.3e-13)
(+ (/ z b) (* (/ t b) (/ x y)))
(if (<= t -7.5e-172)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= t 2.56e-182)
(+ (/ z b) (/ (* x t) (* y b)))
(/ (+ x (/ y (/ t z))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.2e+73) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= -2.3e-13) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (t <= -7.5e-172) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (t <= 2.56e-182) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (y / (t / z))) / (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 (t <= (-7.2d+73)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (t <= (-2.3d-13)) then
tmp = (z / b) + ((t / b) * (x / y))
else if (t <= (-7.5d-172)) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (t <= 2.56d-182) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = (x + (y / (t / z))) / (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 (t <= -7.2e+73) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= -2.3e-13) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (t <= -7.5e-172) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (t <= 2.56e-182) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (y / (t / z))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.2e+73: tmp = (x + (y * (z / t))) / (a + 1.0) elif t <= -2.3e-13: tmp = (z / b) + ((t / b) * (x / y)) elif t <= -7.5e-172: tmp = (x + ((y * z) / t)) / (a + 1.0) elif t <= 2.56e-182: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = (x + (y / (t / z))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.2e+73) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t <= -2.3e-13) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); elseif (t <= -7.5e-172) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (t <= 2.56e-182) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.2e+73) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (t <= -2.3e-13) tmp = (z / b) + ((t / b) * (x / y)); elseif (t <= -7.5e-172) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (t <= 2.56e-182) tmp = (z / b) + ((x * t) / (y * b)); else tmp = (x + (y / (t / z))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.2e+73], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.3e-13], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.5e-172], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.56e-182], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+73}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-13}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-172}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 2.56 \cdot 10^{-182}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\end{array}
\end{array}
if t < -7.1999999999999998e73Initial program 86.7%
associate-/l*90.6%
associate-+l+90.6%
associate-/l*99.9%
Simplified99.9%
clear-num98.9%
associate-+r+98.9%
associate-/l*89.6%
associate-/l*85.7%
inv-pow85.7%
associate-+l+85.7%
+-commutative85.7%
*-commutative85.7%
associate-*l/91.3%
*-commutative91.3%
fma-def91.3%
+-commutative91.3%
associate-/l*98.9%
associate-/r/98.8%
fma-def98.8%
Applied egg-rr98.8%
unpow-198.8%
fma-udef98.8%
associate-*l/91.3%
associate-*r/98.9%
fma-udef99.0%
Simplified99.0%
Taylor expanded in b around 0 82.6%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in y around 0 82.6%
associate-*r/84.5%
Simplified84.5%
if -7.1999999999999998e73 < t < -2.29999999999999979e-13Initial program 74.8%
associate-/l*69.5%
associate-+l+69.5%
associate-/l*69.7%
Simplified69.7%
clear-num69.7%
associate-+r+69.7%
associate-/l*69.4%
associate-/l*74.9%
inv-pow74.9%
associate-+l+74.9%
+-commutative74.9%
*-commutative74.9%
associate-*l/74.8%
*-commutative74.8%
fma-def74.8%
+-commutative74.8%
associate-/l*69.5%
associate-/r/75.1%
fma-def75.1%
Applied egg-rr75.1%
unpow-175.1%
fma-udef75.1%
associate-*l/74.8%
associate-*r/69.5%
fma-udef69.5%
Simplified69.5%
Taylor expanded in b around inf 47.7%
times-frac49.2%
associate-/l*55.2%
Simplified55.2%
Taylor expanded in t around 0 71.4%
+-commutative71.4%
times-frac72.6%
Simplified72.6%
if -2.29999999999999979e-13 < t < -7.4999999999999999e-172Initial program 87.8%
associate-/l*83.1%
associate-+l+83.1%
associate-/l*80.8%
Simplified80.8%
Taylor expanded in b around 0 60.9%
if -7.4999999999999999e-172 < t < 2.5600000000000001e-182Initial program 46.8%
associate-/l*38.5%
associate-+l+38.5%
associate-/l*34.5%
Simplified34.5%
clear-num34.5%
associate-+r+34.5%
associate-/l*38.5%
associate-/l*46.7%
inv-pow46.7%
associate-+l+46.7%
+-commutative46.7%
*-commutative46.7%
associate-*l/42.7%
*-commutative42.7%
fma-def42.7%
+-commutative42.7%
associate-/l*34.5%
associate-/r/29.6%
fma-def29.6%
Applied egg-rr29.6%
unpow-129.6%
fma-udef29.6%
associate-*l/42.7%
associate-*r/34.5%
fma-udef34.5%
Simplified34.5%
Taylor expanded in b around inf 45.9%
times-frac32.2%
associate-/l*32.2%
Simplified32.2%
Taylor expanded in t around 0 77.8%
if 2.5600000000000001e-182 < t Initial program 74.7%
associate-/l*83.7%
associate-+l+83.7%
associate-/l*88.5%
Simplified88.5%
clear-num88.3%
associate-+r+88.3%
associate-/l*83.5%
associate-/l*74.5%
inv-pow74.5%
associate-+l+74.5%
+-commutative74.5%
*-commutative74.5%
associate-*l/79.3%
*-commutative79.3%
fma-def79.3%
+-commutative79.3%
associate-/l*88.4%
associate-/r/88.3%
fma-def88.3%
Applied egg-rr88.3%
unpow-188.3%
fma-udef88.3%
associate-*l/79.3%
associate-*r/89.2%
fma-udef89.2%
Simplified89.2%
Taylor expanded in b around 0 57.4%
associate-/l*65.3%
Simplified65.3%
Final simplification71.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -49000000000000.0) (not (<= y 2.7e+62))) (+ (/ z b) (* (/ t b) (/ x y))) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -49000000000000.0) || !(y <= 2.7e+62)) {
tmp = (z / b) + ((t / b) * (x / y));
} 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 <= (-49000000000000.0d0)) .or. (.not. (y <= 2.7d+62))) then
tmp = (z / b) + ((t / b) * (x / y))
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 <= -49000000000000.0) || !(y <= 2.7e+62)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -49000000000000.0) or not (y <= 2.7e+62): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -49000000000000.0) || !(y <= 2.7e+62)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); 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 <= -49000000000000.0) || ~((y <= 2.7e+62))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -49000000000000.0], N[Not[LessEqual[y, 2.7e+62]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -49000000000000 \lor \neg \left(y \leq 2.7 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -4.9e13 or 2.7e62 < y Initial program 55.2%
associate-/l*63.5%
associate-+l+63.5%
associate-/l*71.6%
Simplified71.6%
clear-num71.5%
associate-+r+71.5%
associate-/l*63.4%
associate-/l*55.2%
inv-pow55.2%
associate-+l+55.2%
+-commutative55.2%
*-commutative55.2%
associate-*l/61.6%
*-commutative61.6%
fma-def61.6%
+-commutative61.6%
associate-/l*71.5%
associate-/r/63.7%
fma-def63.7%
Applied egg-rr63.7%
unpow-163.7%
fma-udef63.7%
associate-*l/61.6%
associate-*r/72.1%
fma-udef72.2%
Simplified72.2%
Taylor expanded in b around inf 31.2%
times-frac38.9%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in t around 0 57.2%
+-commutative57.2%
times-frac63.9%
Simplified63.9%
if -4.9e13 < y < 2.7e62Initial program 90.4%
associate-/l*86.5%
associate-+l+86.5%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in y around 0 60.4%
Final simplification62.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.5e+44) (not (<= y 4.8e+58))) (+ (/ z b) (* (/ t b) (/ x y))) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.5e+44) || !(y <= 4.8e+58)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
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 <= (-9.5d+44)) .or. (.not. (y <= 4.8d+58))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = x / (1.0d0 + (a + ((y * b) / t)))
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 <= -9.5e+44) || !(y <= 4.8e+58)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.5e+44) or not (y <= 4.8e+58): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.5e+44) || !(y <= 4.8e+58)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9.5e+44) || ~((y <= 4.8e+58))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.5e+44], N[Not[LessEqual[y, 4.8e+58]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+44} \lor \neg \left(y \leq 4.8 \cdot 10^{+58}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -9.5000000000000004e44 or 4.8e58 < y Initial program 52.4%
associate-/l*61.4%
associate-+l+61.4%
associate-/l*70.1%
Simplified70.1%
clear-num70.0%
associate-+r+70.0%
associate-/l*61.3%
associate-/l*52.4%
inv-pow52.4%
associate-+l+52.4%
+-commutative52.4%
*-commutative52.4%
associate-*l/59.3%
*-commutative59.3%
fma-def59.3%
+-commutative59.3%
associate-/l*70.0%
associate-/r/61.6%
fma-def61.6%
Applied egg-rr61.6%
unpow-161.6%
fma-udef61.6%
associate-*l/59.3%
associate-*r/70.7%
fma-udef70.7%
Simplified70.7%
Taylor expanded in b around inf 30.3%
times-frac38.7%
associate-/l*45.1%
Simplified45.1%
Taylor expanded in t around 0 58.5%
+-commutative58.5%
times-frac65.7%
Simplified65.7%
if -9.5000000000000004e44 < y < 4.8e58Initial program 90.4%
associate-/l*86.7%
associate-+l+86.7%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in x around inf 68.1%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.45e+48) (not (<= y 5e+64))) (+ (/ z b) (* (/ t b) (/ x y))) (/ x (+ a (+ 1.0 (* b (/ y t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e+48) || !(y <= 5e+64)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (a + (1.0 + (b * (y / t))));
}
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 <= (-1.45d+48)) .or. (.not. (y <= 5d+64))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = x / (a + (1.0d0 + (b * (y / t))))
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 <= -1.45e+48) || !(y <= 5e+64)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (a + (1.0 + (b * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.45e+48) or not (y <= 5e+64): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / (a + (1.0 + (b * (y / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.45e+48) || !(y <= 5e+64)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(x / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.45e+48) || ~((y <= 5e+64))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = x / (a + (1.0 + (b * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e+48], N[Not[LessEqual[y, 5e+64]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+48} \lor \neg \left(y \leq 5 \cdot 10^{+64}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\end{array}
\end{array}
if y < -1.4499999999999999e48 or 5e64 < y Initial program 52.4%
associate-/l*61.4%
associate-+l+61.4%
associate-/l*70.1%
Simplified70.1%
clear-num70.0%
associate-+r+70.0%
associate-/l*61.3%
associate-/l*52.4%
inv-pow52.4%
associate-+l+52.4%
+-commutative52.4%
*-commutative52.4%
associate-*l/59.3%
*-commutative59.3%
fma-def59.3%
+-commutative59.3%
associate-/l*70.0%
associate-/r/61.6%
fma-def61.6%
Applied egg-rr61.6%
unpow-161.6%
fma-udef61.6%
associate-*l/59.3%
associate-*r/70.7%
fma-udef70.7%
Simplified70.7%
Taylor expanded in b around inf 30.3%
times-frac38.7%
associate-/l*45.1%
Simplified45.1%
Taylor expanded in t around 0 58.5%
+-commutative58.5%
times-frac65.7%
Simplified65.7%
if -1.4499999999999999e48 < y < 5e64Initial program 90.4%
associate-/l*86.7%
associate-+l+86.7%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in x around inf 66.8%
associate-/r/68.1%
Applied egg-rr68.1%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4900000000.0) (/ z b) (if (<= y -3.2e-173) x (if (<= y 3e+58) (/ x a) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4900000000.0) {
tmp = z / b;
} else if (y <= -3.2e-173) {
tmp = x;
} else if (y <= 3e+58) {
tmp = x / a;
} else {
tmp = z / 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 (y <= (-4900000000.0d0)) then
tmp = z / b
else if (y <= (-3.2d-173)) then
tmp = x
else if (y <= 3d+58) then
tmp = x / a
else
tmp = z / 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 (y <= -4900000000.0) {
tmp = z / b;
} else if (y <= -3.2e-173) {
tmp = x;
} else if (y <= 3e+58) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4900000000.0: tmp = z / b elif y <= -3.2e-173: tmp = x elif y <= 3e+58: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4900000000.0) tmp = Float64(z / b); elseif (y <= -3.2e-173) tmp = x; elseif (y <= 3e+58) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4900000000.0) tmp = z / b; elseif (y <= -3.2e-173) tmp = x; elseif (y <= 3e+58) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4900000000.0], N[(z / b), $MachinePrecision], If[LessEqual[y, -3.2e-173], x, If[LessEqual[y, 3e+58], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4900000000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-173}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+58}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.9e9 or 3.0000000000000002e58 < y Initial program 55.2%
associate-/l*63.3%
associate-+l+63.3%
associate-/l*71.2%
Simplified71.2%
Taylor expanded in y around inf 50.7%
if -4.9e9 < y < -3.2e-173Initial program 89.6%
associate-/l*85.6%
associate-+l+85.6%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in x around inf 66.1%
Taylor expanded in a around 0 46.8%
Taylor expanded in b around 0 36.2%
if -3.2e-173 < y < 3.0000000000000002e58Initial program 91.7%
associate-/l*87.8%
associate-+l+87.8%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in x around inf 68.9%
Taylor expanded in a around inf 40.9%
Final simplification44.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.2e+46) (not (<= y 5.8e+59))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e+46) || !(y <= 5.8e+59)) {
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 <= (-6.2d+46)) .or. (.not. (y <= 5.8d+59))) 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 <= -6.2e+46) || !(y <= 5.8e+59)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.2e+46) or not (y <= 5.8e+59): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.2e+46) || !(y <= 5.8e+59)) 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 <= -6.2e+46) || ~((y <= 5.8e+59))) 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, -6.2e+46], N[Not[LessEqual[y, 5.8e+59]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+46} \lor \neg \left(y \leq 5.8 \cdot 10^{+59}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -6.1999999999999995e46 or 5.79999999999999981e59 < y Initial program 52.4%
associate-/l*61.4%
associate-+l+61.4%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in y around inf 54.0%
if -6.1999999999999995e46 < y < 5.79999999999999981e59Initial program 90.4%
associate-/l*86.7%
associate-+l+86.7%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in y around 0 57.9%
Final simplification56.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.98) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.98) || !(a <= 1.0)) {
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 <= (-0.98d0)) .or. (.not. (a <= 1.0d0))) 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 <= -0.98) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.98) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.98) || !(a <= 1.0)) 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 <= -0.98) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.98], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.98 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -0.97999999999999998 or 1 < a Initial program 74.7%
associate-/l*74.8%
associate-+l+74.8%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in x around inf 51.2%
Taylor expanded in a around inf 44.2%
if -0.97999999999999998 < a < 1Initial program 73.4%
associate-/l*76.8%
associate-+l+76.8%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in x around inf 51.0%
Taylor expanded in a around 0 48.0%
Taylor expanded in b around 0 31.9%
Final simplification38.0%
(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 74.1%
associate-/l*75.8%
associate-+l+75.8%
associate-/l*78.5%
Simplified78.5%
Taylor expanded in x around inf 51.1%
Taylor expanded in a around 0 29.6%
Taylor expanded in b around 0 18.0%
Final simplification18.0%
(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 2023332
(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))))