
(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 16 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 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(/ (* y z) (* t (+ (+ a t_1) 1.0)))
(if (<= t_2 -5e-314)
t_2
(if (<= t_2 0.0)
(+ (/ z b) (/ (* t (+ (/ x b) (* z (/ (- -1.0 a) (pow b 2.0))))) y))
(if (<= t_2 1e+269) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y * z) / (t * ((a + t_1) + 1.0));
} else if (t_2 <= -5e-314) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) + (z * ((-1.0 - a) / pow(b, 2.0))))) / y);
} else if (t_2 <= 1e+269) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) / (t * ((a + t_1) + 1.0));
} else if (t_2 <= -5e-314) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) + (z * ((-1.0 - a) / Math.pow(b, 2.0))))) / y);
} else if (t_2 <= 1e+269) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = (y * z) / (t * ((a + t_1) + 1.0)) elif t_2 <= -5e-314: tmp = t_2 elif t_2 <= 0.0: tmp = (z / b) + ((t * ((x / b) + (z * ((-1.0 - a) / math.pow(b, 2.0))))) / y) elif t_2 <= 1e+269: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(t * Float64(Float64(a + t_1) + 1.0))); elseif (t_2 <= -5e-314) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(Float64(x / b) + Float64(z * Float64(Float64(-1.0 - a) / (b ^ 2.0))))) / y)); elseif (t_2 <= 1e+269) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y * z) / (t * ((a + t_1) + 1.0)); elseif (t_2 <= -5e-314) tmp = t_2; elseif (t_2 <= 0.0) tmp = (z / b) + ((t * ((x / b) + (z * ((-1.0 - a) / (b ^ 2.0))))) / y); elseif (t_2 <= 1e+269) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(t * N[(N[(a + t$95$1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-314], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(N[(x / b), $MachinePrecision] + N[(z * N[(N[(-1.0 - a), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+269], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1 + \left(a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(\left(a + t\_1\right) + 1\right)}\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-314}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \left(\frac{x}{b} + z \cdot \frac{-1 - a}{{b}^{2}}\right)}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+269}:\\
\;\;\;\;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.0Initial program 45.2%
associate-/l*52.6%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in x around 0 92.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999982e-314 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e269Initial program 99.7%
if -4.99999999982e-314 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 52.6%
associate-/l*55.1%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in y around -inf 68.8%
+-commutative68.8%
mul-1-neg68.8%
unsub-neg68.8%
distribute-lft-out--68.8%
mul-1-neg68.8%
associate-/l*70.5%
associate-/l*75.9%
distribute-lft-out--75.9%
associate-/l*73.3%
Simplified73.3%
if 1e269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 9.9%
associate-/l*17.6%
associate-/l*22.7%
Simplified22.7%
Taylor expanded in y around inf 79.7%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(/ (* y z) (* t (+ (+ a t_1) 1.0)))
(if (<= t_2 -1e-260)
t_2
(if (<= t_2 0.0)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_2 1e+269) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y * z) / (t * ((a + t_1) + 1.0));
} else if (t_2 <= -1e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_2 <= 1e+269) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) / (t * ((a + t_1) + 1.0));
} else if (t_2 <= -1e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_2 <= 1e+269) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = (y * z) / (t * ((a + t_1) + 1.0)) elif t_2 <= -1e-260: tmp = t_2 elif t_2 <= 0.0: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) elif t_2 <= 1e+269: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(t * Float64(Float64(a + t_1) + 1.0))); elseif (t_2 <= -1e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_2 <= 1e+269) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y * z) / (t * ((a + t_1) + 1.0)); elseif (t_2 <= -1e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); elseif (t_2 <= 1e+269) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(t * N[(N[(a + t$95$1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-260], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+269], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1 + \left(a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(\left(a + t\_1\right) + 1\right)}\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-260}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_2 \leq 10^{+269}:\\
\;\;\;\;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.0Initial program 45.2%
associate-/l*52.6%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in x around 0 92.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.99999999999999961e-261 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e269Initial program 99.7%
if -9.99999999999999961e-261 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 60.9%
associate-/l*62.9%
associate-/l*75.3%
Simplified75.3%
clear-num75.4%
un-div-inv75.4%
Applied egg-rr75.4%
if 1e269 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 9.9%
associate-/l*17.6%
associate-/l*22.7%
Simplified22.7%
Taylor expanded in y around inf 79.7%
Final simplification92.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b))))
(t_2 (/ (+ x (/ (* y z) t)) (+ a 1.0))))
(if (<= t -1.3e+52)
t_2
(if (<= t -6.6e+34)
t_1
(if (<= t -8.5e-78)
t_2
(if (<= t 6.2e-189)
t_1
(if (<= t 1.5e-86)
(/ (* y z) (* t (+ (+ a (/ (* y b) t)) 1.0)))
(if (<= t 1.45e-69)
t_1
(if (or (<= t 2.4e+89) (not (<= t 1.4e+213)))
(/ x (- (* b (/ y t)) (- -1.0 a)))
t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (t <= -1.3e+52) {
tmp = t_2;
} else if (t <= -6.6e+34) {
tmp = t_1;
} else if (t <= -8.5e-78) {
tmp = t_2;
} else if (t <= 6.2e-189) {
tmp = t_1;
} else if (t <= 1.5e-86) {
tmp = (y * z) / (t * ((a + ((y * b) / t)) + 1.0));
} else if (t <= 1.45e-69) {
tmp = t_1;
} else if ((t <= 2.4e+89) || !(t <= 1.4e+213)) {
tmp = x / ((b * (y / t)) - (-1.0 - a));
} 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 / b) + ((x * t) / (y * b))
t_2 = (x + ((y * z) / t)) / (a + 1.0d0)
if (t <= (-1.3d+52)) then
tmp = t_2
else if (t <= (-6.6d+34)) then
tmp = t_1
else if (t <= (-8.5d-78)) then
tmp = t_2
else if (t <= 6.2d-189) then
tmp = t_1
else if (t <= 1.5d-86) then
tmp = (y * z) / (t * ((a + ((y * b) / t)) + 1.0d0))
else if (t <= 1.45d-69) then
tmp = t_1
else if ((t <= 2.4d+89) .or. (.not. (t <= 1.4d+213))) then
tmp = x / ((b * (y / t)) - ((-1.0d0) - a))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (t <= -1.3e+52) {
tmp = t_2;
} else if (t <= -6.6e+34) {
tmp = t_1;
} else if (t <= -8.5e-78) {
tmp = t_2;
} else if (t <= 6.2e-189) {
tmp = t_1;
} else if (t <= 1.5e-86) {
tmp = (y * z) / (t * ((a + ((y * b) / t)) + 1.0));
} else if (t <= 1.45e-69) {
tmp = t_1;
} else if ((t <= 2.4e+89) || !(t <= 1.4e+213)) {
tmp = x / ((b * (y / t)) - (-1.0 - a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = (x + ((y * z) / t)) / (a + 1.0) tmp = 0 if t <= -1.3e+52: tmp = t_2 elif t <= -6.6e+34: tmp = t_1 elif t <= -8.5e-78: tmp = t_2 elif t <= 6.2e-189: tmp = t_1 elif t <= 1.5e-86: tmp = (y * z) / (t * ((a + ((y * b) / t)) + 1.0)) elif t <= 1.45e-69: tmp = t_1 elif (t <= 2.4e+89) or not (t <= 1.4e+213): tmp = x / ((b * (y / t)) - (-1.0 - a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.3e+52) tmp = t_2; elseif (t <= -6.6e+34) tmp = t_1; elseif (t <= -8.5e-78) tmp = t_2; elseif (t <= 6.2e-189) tmp = t_1; elseif (t <= 1.5e-86) tmp = Float64(Float64(y * z) / Float64(t * Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0))); elseif (t <= 1.45e-69) tmp = t_1; elseif ((t <= 2.4e+89) || !(t <= 1.4e+213)) tmp = Float64(x / Float64(Float64(b * Float64(y / t)) - Float64(-1.0 - a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = (x + ((y * z) / t)) / (a + 1.0); tmp = 0.0; if (t <= -1.3e+52) tmp = t_2; elseif (t <= -6.6e+34) tmp = t_1; elseif (t <= -8.5e-78) tmp = t_2; elseif (t <= 6.2e-189) tmp = t_1; elseif (t <= 1.5e-86) tmp = (y * z) / (t * ((a + ((y * b) / t)) + 1.0)); elseif (t <= 1.45e-69) tmp = t_1; elseif ((t <= 2.4e+89) || ~((t <= 1.4e+213))) tmp = x / ((b * (y / t)) - (-1.0 - a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+52], t$95$2, If[LessEqual[t, -6.6e+34], t$95$1, If[LessEqual[t, -8.5e-78], t$95$2, If[LessEqual[t, 6.2e-189], t$95$1, If[LessEqual[t, 1.5e-86], N[(N[(y * z), $MachinePrecision] / N[(t * N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-69], t$95$1, If[Or[LessEqual[t, 2.4e+89], N[Not[LessEqual[t, 1.4e+213]], $MachinePrecision]], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] - N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-78}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-86}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(\left(a + \frac{y \cdot b}{t}\right) + 1\right)}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+89} \lor \neg \left(t \leq 1.4 \cdot 10^{+213}\right):\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} - \left(-1 - a\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.3e52 or -6.59999999999999976e34 < t < -8.49999999999999957e-78 or 2.40000000000000004e89 < t < 1.39999999999999995e213Initial program 90.8%
associate-/l*88.8%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in b around 0 84.7%
if -1.3e52 < t < -6.59999999999999976e34 or -8.49999999999999957e-78 < t < 6.2000000000000001e-189 or 1.5e-86 < t < 1.4499999999999999e-69Initial program 56.7%
associate-/l*49.4%
associate-/l*43.3%
Simplified43.3%
Taylor expanded in b around inf 42.7%
*-commutative42.7%
+-commutative42.7%
associate-*r/37.7%
fma-undefine37.7%
*-commutative37.7%
associate-/l*29.0%
associate-/r*27.4%
Simplified27.4%
Taylor expanded in y around 0 73.3%
if 6.2000000000000001e-189 < t < 1.5e-86Initial program 68.2%
associate-/l*53.9%
associate-/l*50.3%
Simplified50.3%
Taylor expanded in x around 0 67.8%
if 1.4499999999999999e-69 < t < 2.40000000000000004e89 or 1.39999999999999995e213 < t Initial program 85.9%
associate-/l*89.3%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 78.9%
associate-+r+78.9%
associate-*r/82.4%
Simplified82.4%
Final simplification78.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b))))
(t_2 (/ (+ x (/ (* y z) t)) (+ a 1.0))))
(if (<= t -1.3e+52)
t_2
(if (<= t -2.55e+36)
t_1
(if (<= t -1.6e-78)
t_2
(if (<= t 1.02e-69)
t_1
(if (or (<= t 1.4e+92) (not (<= t 6.5e+212)))
(/ x (- (* b (/ y t)) (- -1.0 a)))
t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (t <= -1.3e+52) {
tmp = t_2;
} else if (t <= -2.55e+36) {
tmp = t_1;
} else if (t <= -1.6e-78) {
tmp = t_2;
} else if (t <= 1.02e-69) {
tmp = t_1;
} else if ((t <= 1.4e+92) || !(t <= 6.5e+212)) {
tmp = x / ((b * (y / t)) - (-1.0 - a));
} 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 / b) + ((x * t) / (y * b))
t_2 = (x + ((y * z) / t)) / (a + 1.0d0)
if (t <= (-1.3d+52)) then
tmp = t_2
else if (t <= (-2.55d+36)) then
tmp = t_1
else if (t <= (-1.6d-78)) then
tmp = t_2
else if (t <= 1.02d-69) then
tmp = t_1
else if ((t <= 1.4d+92) .or. (.not. (t <= 6.5d+212))) then
tmp = x / ((b * (y / t)) - ((-1.0d0) - a))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (t <= -1.3e+52) {
tmp = t_2;
} else if (t <= -2.55e+36) {
tmp = t_1;
} else if (t <= -1.6e-78) {
tmp = t_2;
} else if (t <= 1.02e-69) {
tmp = t_1;
} else if ((t <= 1.4e+92) || !(t <= 6.5e+212)) {
tmp = x / ((b * (y / t)) - (-1.0 - a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = (x + ((y * z) / t)) / (a + 1.0) tmp = 0 if t <= -1.3e+52: tmp = t_2 elif t <= -2.55e+36: tmp = t_1 elif t <= -1.6e-78: tmp = t_2 elif t <= 1.02e-69: tmp = t_1 elif (t <= 1.4e+92) or not (t <= 6.5e+212): tmp = x / ((b * (y / t)) - (-1.0 - a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.3e+52) tmp = t_2; elseif (t <= -2.55e+36) tmp = t_1; elseif (t <= -1.6e-78) tmp = t_2; elseif (t <= 1.02e-69) tmp = t_1; elseif ((t <= 1.4e+92) || !(t <= 6.5e+212)) tmp = Float64(x / Float64(Float64(b * Float64(y / t)) - Float64(-1.0 - a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = (x + ((y * z) / t)) / (a + 1.0); tmp = 0.0; if (t <= -1.3e+52) tmp = t_2; elseif (t <= -2.55e+36) tmp = t_1; elseif (t <= -1.6e-78) tmp = t_2; elseif (t <= 1.02e-69) tmp = t_1; elseif ((t <= 1.4e+92) || ~((t <= 6.5e+212))) tmp = x / ((b * (y / t)) - (-1.0 - a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+52], t$95$2, If[LessEqual[t, -2.55e+36], t$95$1, If[LessEqual[t, -1.6e-78], t$95$2, If[LessEqual[t, 1.02e-69], t$95$1, If[Or[LessEqual[t, 1.4e+92], N[Not[LessEqual[t, 6.5e+212]], $MachinePrecision]], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] - N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-78}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+92} \lor \neg \left(t \leq 6.5 \cdot 10^{+212}\right):\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} - \left(-1 - a\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.3e52 or -2.54999999999999986e36 < t < -1.6e-78 or 1.4e92 < t < 6.49999999999999997e212Initial program 90.8%
associate-/l*88.8%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in b around 0 84.7%
if -1.3e52 < t < -2.54999999999999986e36 or -1.6e-78 < t < 1.02000000000000005e-69Initial program 59.6%
associate-/l*50.5%
associate-/l*45.1%
Simplified45.1%
Taylor expanded in b around inf 41.7%
*-commutative41.7%
+-commutative41.7%
associate-*r/37.1%
fma-undefine37.1%
*-commutative37.1%
associate-/l*29.7%
associate-/r*27.6%
Simplified27.6%
Taylor expanded in y around 0 67.3%
if 1.02000000000000005e-69 < t < 1.4e92 or 6.49999999999999997e212 < t Initial program 85.9%
associate-/l*89.3%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in x around inf 78.9%
associate-+r+78.9%
associate-*r/82.4%
Simplified82.4%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b)))) (t_2 (/ x (+ a 1.0))))
(if (<= t -3e+53)
t_2
(if (<= t 3.3e+27)
t_1
(if (<= t 5.2e+61)
t_2
(if (<= t 4.6e+67)
t_1
(if (<= t 1.08e+105) (/ (+ x (/ (* y z) t)) a) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -3e+53) {
tmp = t_2;
} else if (t <= 3.3e+27) {
tmp = t_1;
} else if (t <= 5.2e+61) {
tmp = t_2;
} else if (t <= 4.6e+67) {
tmp = t_1;
} else if (t <= 1.08e+105) {
tmp = (x + ((y * z) / t)) / a;
} 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 / b) + ((x * t) / (y * b))
t_2 = x / (a + 1.0d0)
if (t <= (-3d+53)) then
tmp = t_2
else if (t <= 3.3d+27) then
tmp = t_1
else if (t <= 5.2d+61) then
tmp = t_2
else if (t <= 4.6d+67) then
tmp = t_1
else if (t <= 1.08d+105) then
tmp = (x + ((y * z) / t)) / a
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -3e+53) {
tmp = t_2;
} else if (t <= 3.3e+27) {
tmp = t_1;
} else if (t <= 5.2e+61) {
tmp = t_2;
} else if (t <= 4.6e+67) {
tmp = t_1;
} else if (t <= 1.08e+105) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = x / (a + 1.0) tmp = 0 if t <= -3e+53: tmp = t_2 elif t <= 3.3e+27: tmp = t_1 elif t <= 5.2e+61: tmp = t_2 elif t <= 4.6e+67: tmp = t_1 elif t <= 1.08e+105: tmp = (x + ((y * z) / t)) / a else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -3e+53) tmp = t_2; elseif (t <= 3.3e+27) tmp = t_1; elseif (t <= 5.2e+61) tmp = t_2; elseif (t <= 4.6e+67) tmp = t_1; elseif (t <= 1.08e+105) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = x / (a + 1.0); tmp = 0.0; if (t <= -3e+53) tmp = t_2; elseif (t <= 3.3e+27) tmp = t_1; elseif (t <= 5.2e+61) tmp = t_2; elseif (t <= 4.6e+67) tmp = t_1; elseif (t <= 1.08e+105) tmp = (x + ((y * z) / t)) / a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+53], t$95$2, If[LessEqual[t, 3.3e+27], t$95$1, If[LessEqual[t, 5.2e+61], t$95$2, If[LessEqual[t, 4.6e+67], t$95$1, If[LessEqual[t, 1.08e+105], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+53}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+61}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+105}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.99999999999999998e53 or 3.2999999999999998e27 < t < 5.19999999999999945e61 or 1.07999999999999994e105 < t Initial program 86.2%
associate-/l*89.1%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in y around 0 71.6%
if -2.99999999999999998e53 < t < 3.2999999999999998e27 or 5.19999999999999945e61 < t < 4.5999999999999997e67Initial program 69.5%
associate-/l*61.0%
associate-/l*57.0%
Simplified57.0%
Taylor expanded in b around inf 42.6%
*-commutative42.6%
+-commutative42.6%
associate-*r/38.7%
fma-undefine38.7%
*-commutative38.7%
associate-/l*33.6%
associate-/r*31.5%
Simplified31.5%
Taylor expanded in y around 0 62.1%
if 4.5999999999999997e67 < t < 1.07999999999999994e105Initial program 91.2%
associate-/l*91.2%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in a around inf 73.7%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (/ (* y b) t) 1.0))) (t_2 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -2.3)
t_2
(if (<= a 8.4e-106)
t_1
(if (<= a 9e-35) (/ z b) (if (<= a 0.0125) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (((y * b) / t) + 1.0);
double t_2 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -2.3) {
tmp = t_2;
} else if (a <= 8.4e-106) {
tmp = t_1;
} else if (a <= 9e-35) {
tmp = z / b;
} else if (a <= 0.0125) {
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 * b) / t) + 1.0d0)
t_2 = (x + ((y * z) / t)) / a
if (a <= (-2.3d0)) then
tmp = t_2
else if (a <= 8.4d-106) then
tmp = t_1
else if (a <= 9d-35) then
tmp = z / b
else if (a <= 0.0125d0) 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 * b) / t) + 1.0);
double t_2 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -2.3) {
tmp = t_2;
} else if (a <= 8.4e-106) {
tmp = t_1;
} else if (a <= 9e-35) {
tmp = z / b;
} else if (a <= 0.0125) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (((y * b) / t) + 1.0) t_2 = (x + ((y * z) / t)) / a tmp = 0 if a <= -2.3: tmp = t_2 elif a <= 8.4e-106: tmp = t_1 elif a <= 9e-35: tmp = z / b elif a <= 0.0125: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(Float64(y * b) / t) + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -2.3) tmp = t_2; elseif (a <= 8.4e-106) tmp = t_1; elseif (a <= 9e-35) tmp = Float64(z / b); elseif (a <= 0.0125) 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 * b) / t) + 1.0); t_2 = (x + ((y * z) / t)) / a; tmp = 0.0; if (a <= -2.3) tmp = t_2; elseif (a <= 8.4e-106) tmp = t_1; elseif (a <= 9e-35) tmp = z / b; elseif (a <= 0.0125) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -2.3], t$95$2, If[LessEqual[a, 8.4e-106], t$95$1, If[LessEqual[a, 9e-35], N[(z / b), $MachinePrecision], If[LessEqual[a, 0.0125], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{y \cdot b}{t} + 1}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -2.3:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-35}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 0.0125:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.2999999999999998 or 0.012500000000000001 < a Initial program 75.6%
associate-/l*73.5%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in a around inf 62.9%
if -2.2999999999999998 < a < 8.40000000000000013e-106 or 9.0000000000000002e-35 < a < 0.012500000000000001Initial program 80.1%
associate-/l*74.7%
associate-/l*76.3%
Simplified76.3%
Taylor expanded in x around inf 57.8%
associate-+r+57.8%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 57.4%
if 8.40000000000000013e-106 < a < 9.0000000000000002e-35Initial program 57.1%
associate-/l*46.8%
associate-/l*46.6%
Simplified46.6%
Taylor expanded in y around inf 67.0%
Final simplification60.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.05e-196) (not (<= t 9.2e-107))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.05e-196) || !(t <= 9.2e-107)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} 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 <= (-1.05d-196)) .or. (.not. (t <= 9.2d-107))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
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 <= -1.05e-196) || !(t <= 9.2e-107)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.05e-196) or not (t <= 9.2e-107): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.05e-196) || !(t <= 9.2e-107)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); 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 <= -1.05e-196) || ~((t <= 9.2e-107))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.05e-196], N[Not[LessEqual[t, 9.2e-107]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $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 -1.05 \cdot 10^{-196} \lor \neg \left(t \leq 9.2 \cdot 10^{-107}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.04999999999999994e-196 or 9.20000000000000014e-107 < t Initial program 85.8%
associate-/l*85.2%
associate-/l*89.9%
Simplified89.9%
if -1.04999999999999994e-196 < t < 9.20000000000000014e-107Initial program 54.0%
associate-/l*41.9%
associate-/l*33.8%
Simplified33.8%
Taylor expanded in b around inf 43.1%
*-commutative43.1%
+-commutative43.1%
associate-*r/36.4%
fma-undefine36.4%
*-commutative36.4%
associate-/l*28.1%
associate-/r*25.1%
Simplified25.1%
Taylor expanded in y around 0 70.3%
Final simplification84.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.1e-196) (not (<= t 7e-106))) (/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.1e-196) || !(t <= 7e-106)) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} 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 <= (-3.1d-196)) .or. (.not. (t <= 7d-106))) then
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
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 <= -3.1e-196) || !(t <= 7e-106)) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.1e-196) or not (t <= 7e-106): tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.1e-196) || !(t <= 7e-106)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); 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 <= -3.1e-196) || ~((t <= 7e-106))) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.1e-196], N[Not[LessEqual[t, 7e-106]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $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 -3.1 \cdot 10^{-196} \lor \neg \left(t \leq 7 \cdot 10^{-106}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -3.09999999999999993e-196 or 7e-106 < t Initial program 85.8%
associate-/l*85.2%
associate-/l*89.9%
Simplified89.9%
clear-num89.9%
un-div-inv90.4%
Applied egg-rr90.4%
if -3.09999999999999993e-196 < t < 7e-106Initial program 54.0%
associate-/l*41.9%
associate-/l*33.8%
Simplified33.8%
Taylor expanded in b around inf 43.1%
*-commutative43.1%
+-commutative43.1%
associate-*r/36.4%
fma-undefine36.4%
*-commutative36.4%
associate-/l*28.1%
associate-/r*25.1%
Simplified25.1%
Taylor expanded in y around 0 70.3%
Final simplification84.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -2.9e-196)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 5.3e-107)
(+ (/ z b) (/ (* x t) (* y b)))
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -2.9e-196) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t <= 5.3e-107) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-2.9d-196)) then
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 5.3d-107) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
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));
double tmp;
if (t <= -2.9e-196) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t <= 5.3e-107) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -2.9e-196: tmp = t_1 / ((a + 1.0) + (y * (b / t))) elif t <= 5.3e-107: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = t_1 / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -2.9e-196) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 5.3e-107) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -2.9e-196) tmp = t_1 / ((a + 1.0) + (y * (b / t))); elseif (t <= 5.3e-107) tmp = (z / b) + ((x * t) / (y * b)); else tmp = t_1 / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e-196], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.3e-107], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{-196}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -2.89999999999999987e-196Initial program 85.4%
associate-/l*83.4%
associate-/l*87.5%
Simplified87.5%
if -2.89999999999999987e-196 < t < 5.3e-107Initial program 54.0%
associate-/l*41.9%
associate-/l*33.8%
Simplified33.8%
Taylor expanded in b around inf 43.1%
*-commutative43.1%
+-commutative43.1%
associate-*r/36.4%
fma-undefine36.4%
*-commutative36.4%
associate-/l*28.1%
associate-/r*25.1%
Simplified25.1%
Taylor expanded in y around 0 70.3%
if 5.3e-107 < t Initial program 86.1%
associate-/l*87.1%
associate-/l*92.3%
Simplified92.3%
clear-num92.3%
un-div-inv92.4%
Applied egg-rr92.4%
Final simplification84.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.3e-56)
t_1
(if (<= t 1.65e-215)
(/ z b)
(if (<= t 5.6e-146)
(/ (* y z) (* t (+ a 1.0)))
(if (<= t 1.35e-48) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -6.3e-56) {
tmp = t_1;
} else if (t <= 1.65e-215) {
tmp = z / b;
} else if (t <= 5.6e-146) {
tmp = (y * z) / (t * (a + 1.0));
} else if (t <= 1.35e-48) {
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 = x / (a + 1.0d0)
if (t <= (-6.3d-56)) then
tmp = t_1
else if (t <= 1.65d-215) then
tmp = z / b
else if (t <= 5.6d-146) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (t <= 1.35d-48) 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 = x / (a + 1.0);
double tmp;
if (t <= -6.3e-56) {
tmp = t_1;
} else if (t <= 1.65e-215) {
tmp = z / b;
} else if (t <= 5.6e-146) {
tmp = (y * z) / (t * (a + 1.0));
} else if (t <= 1.35e-48) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -6.3e-56: tmp = t_1 elif t <= 1.65e-215: tmp = z / b elif t <= 5.6e-146: tmp = (y * z) / (t * (a + 1.0)) elif t <= 1.35e-48: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -6.3e-56) tmp = t_1; elseif (t <= 1.65e-215) tmp = Float64(z / b); elseif (t <= 5.6e-146) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (t <= 1.35e-48) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -6.3e-56) tmp = t_1; elseif (t <= 1.65e-215) tmp = z / b; elseif (t <= 5.6e-146) tmp = (y * z) / (t * (a + 1.0)); elseif (t <= 1.35e-48) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.3e-56], t$95$1, If[LessEqual[t, 1.65e-215], N[(z / b), $MachinePrecision], If[LessEqual[t, 5.6e-146], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-48], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.3 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-215}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-146}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-48}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.2999999999999997e-56 or 1.35000000000000006e-48 < t Initial program 88.1%
associate-/l*89.4%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around 0 61.2%
if -6.2999999999999997e-56 < t < 1.6499999999999999e-215 or 5.60000000000000006e-146 < t < 1.35000000000000006e-48Initial program 61.0%
associate-/l*51.7%
associate-/l*45.5%
Simplified45.5%
Taylor expanded in y around inf 58.3%
if 1.6499999999999999e-215 < t < 5.60000000000000006e-146Initial program 66.9%
associate-/l*50.0%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in x around 0 59.2%
times-frac53.0%
associate-+r+53.0%
associate-*r/46.2%
Simplified46.2%
Taylor expanded in y around 0 49.6%
Final simplification59.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.5e+43)
(/ x a)
(if (<= t 9.8e-48)
(/ z b)
(if (or (<= t 2.2e+226) (not (<= t 1.65e+268))) (/ x a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.5e+43) {
tmp = x / a;
} else if (t <= 9.8e-48) {
tmp = z / b;
} else if ((t <= 2.2e+226) || !(t <= 1.65e+268)) {
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 (t <= (-4.5d+43)) then
tmp = x / a
else if (t <= 9.8d-48) then
tmp = z / b
else if ((t <= 2.2d+226) .or. (.not. (t <= 1.65d+268))) 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 (t <= -4.5e+43) {
tmp = x / a;
} else if (t <= 9.8e-48) {
tmp = z / b;
} else if ((t <= 2.2e+226) || !(t <= 1.65e+268)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.5e+43: tmp = x / a elif t <= 9.8e-48: tmp = z / b elif (t <= 2.2e+226) or not (t <= 1.65e+268): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.5e+43) tmp = Float64(x / a); elseif (t <= 9.8e-48) tmp = Float64(z / b); elseif ((t <= 2.2e+226) || !(t <= 1.65e+268)) 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 (t <= -4.5e+43) tmp = x / a; elseif (t <= 9.8e-48) tmp = z / b; elseif ((t <= 2.2e+226) || ~((t <= 1.65e+268))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.5e+43], N[(x / a), $MachinePrecision], If[LessEqual[t, 9.8e-48], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, 2.2e+226], N[Not[LessEqual[t, 1.65e+268]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{-48}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+226} \lor \neg \left(t \leq 1.65 \cdot 10^{+268}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.5e43 or 9.8000000000000005e-48 < t < 2.19999999999999994e226 or 1.65e268 < t Initial program 88.7%
associate-/l*91.1%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in x around inf 71.3%
associate-+r+71.3%
associate-*r/75.3%
Simplified75.3%
Taylor expanded in a around inf 42.8%
if -4.5e43 < t < 9.8000000000000005e-48Initial program 65.5%
associate-/l*55.6%
associate-/l*51.1%
Simplified51.1%
Taylor expanded in y around inf 50.9%
if 2.19999999999999994e226 < t < 1.65e268Initial program 78.0%
associate-/l*78.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 78.7%
Taylor expanded in a around 0 68.0%
Final simplification47.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1e-78) (not (<= t 6.4e-68))) (/ x (+ (+ a (/ (* y b) t)) 1.0)) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e-78) || !(t <= 6.4e-68)) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} 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 <= (-1d-78)) .or. (.not. (t <= 6.4d-68))) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
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 <= -1e-78) || !(t <= 6.4e-68)) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1e-78) or not (t <= 6.4e-68): tmp = x / ((a + ((y * b) / t)) + 1.0) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1e-78) || !(t <= 6.4e-68)) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); 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 <= -1e-78) || ~((t <= 6.4e-68))) tmp = x / ((a + ((y * b) / t)) + 1.0); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1e-78], N[Not[LessEqual[t, 6.4e-68]], $MachinePrecision]], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $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 -1 \cdot 10^{-78} \lor \neg \left(t \leq 6.4 \cdot 10^{-68}\right):\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -9.99999999999999999e-79 or 6.3999999999999998e-68 < t Initial program 88.3%
associate-/l*88.3%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x around inf 69.6%
if -9.99999999999999999e-79 < t < 6.3999999999999998e-68Initial program 58.3%
associate-/l*48.5%
associate-/l*42.5%
Simplified42.5%
Taylor expanded in b around inf 40.4%
*-commutative40.4%
+-commutative40.4%
associate-*r/35.4%
fma-undefine35.4%
*-commutative35.4%
associate-/l*27.4%
associate-/r*25.1%
Simplified25.1%
Taylor expanded in y around 0 67.2%
Final simplification68.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.2e-78) (not (<= t 1e-64))) (/ x (- (* b (/ y t)) (- -1.0 a))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.2e-78) || !(t <= 1e-64)) {
tmp = x / ((b * (y / t)) - (-1.0 - a));
} 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 <= (-8.2d-78)) .or. (.not. (t <= 1d-64))) then
tmp = x / ((b * (y / t)) - ((-1.0d0) - a))
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 <= -8.2e-78) || !(t <= 1e-64)) {
tmp = x / ((b * (y / t)) - (-1.0 - a));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.2e-78) or not (t <= 1e-64): tmp = x / ((b * (y / t)) - (-1.0 - a)) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.2e-78) || !(t <= 1e-64)) tmp = Float64(x / Float64(Float64(b * Float64(y / t)) - Float64(-1.0 - a))); 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 <= -8.2e-78) || ~((t <= 1e-64))) tmp = x / ((b * (y / t)) - (-1.0 - a)); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.2e-78], N[Not[LessEqual[t, 1e-64]], $MachinePrecision]], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] - N[(-1.0 - a), $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 -8.2 \cdot 10^{-78} \lor \neg \left(t \leq 10^{-64}\right):\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} - \left(-1 - a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -8.1999999999999996e-78 or 9.99999999999999965e-65 < t Initial program 88.3%
associate-/l*88.3%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in x around inf 69.6%
associate-+r+69.6%
associate-*r/73.2%
Simplified73.2%
if -8.1999999999999996e-78 < t < 9.99999999999999965e-65Initial program 58.3%
associate-/l*48.5%
associate-/l*42.5%
Simplified42.5%
Taylor expanded in b around inf 40.4%
*-commutative40.4%
+-commutative40.4%
associate-*r/35.4%
fma-undefine35.4%
*-commutative35.4%
associate-/l*27.4%
associate-/r*25.1%
Simplified25.1%
Taylor expanded in y around 0 67.2%
Final simplification70.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.85e-55) (not (<= t 1.2e-44))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.85e-55) || !(t <= 1.2e-44)) {
tmp = x / (a + 1.0);
} 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 ((t <= (-2.85d-55)) .or. (.not. (t <= 1.2d-44))) then
tmp = x / (a + 1.0d0)
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 ((t <= -2.85e-55) || !(t <= 1.2e-44)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.85e-55) or not (t <= 1.2e-44): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.85e-55) || !(t <= 1.2e-44)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.85e-55) || ~((t <= 1.2e-44))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.85e-55], N[Not[LessEqual[t, 1.2e-44]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.85 \cdot 10^{-55} \lor \neg \left(t \leq 1.2 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.8500000000000001e-55 or 1.20000000000000004e-44 < t Initial program 88.1%
associate-/l*89.4%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in y around 0 61.2%
if -2.8500000000000001e-55 < t < 1.20000000000000004e-44Initial program 61.9%
associate-/l*51.4%
associate-/l*46.1%
Simplified46.1%
Taylor expanded in y around inf 53.0%
Final simplification57.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.55e-33) (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 <= -2.55e-33) || !(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 <= (-2.55d-33)) .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 <= -2.55e-33) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.55e-33) 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 <= -2.55e-33) || !(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 <= -2.55e-33) || ~((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, -2.55e-33], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.55 \cdot 10^{-33} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.55000000000000004e-33 or 1 < a Initial program 75.2%
associate-/l*73.2%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in x around inf 52.3%
associate-+r+52.3%
associate-*r/55.0%
Simplified55.0%
Taylor expanded in a around inf 46.0%
if -2.55000000000000004e-33 < a < 1Initial program 78.8%
associate-/l*72.9%
associate-/l*73.6%
Simplified73.6%
Taylor expanded in y around 0 35.7%
Taylor expanded in a around 0 34.7%
Final simplification40.9%
(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 76.8%
associate-/l*73.1%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in y around 0 41.5%
Taylor expanded in a around 0 17.8%
Final simplification17.8%
(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 2024047
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(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))))