
(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))
(/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0)))
(if (<= t_2 -5e-298)
t_2
(if (<= t_2 0.0)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_2 1e+303)
t_2
(if (<= t_2 INFINITY)
(* (/ y t) (/ z (+ 1.0 (+ a t_1))))
(/ 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 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else if (t_2 <= -5e-298) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_2 <= 1e+303) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (1.0 + (a + t_1)));
} 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 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else if (t_2 <= -5e-298) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_2 <= 1e+303) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / (1.0 + (a + t_1)));
} 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 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) elif t_2 <= -5e-298: tmp = t_2 elif t_2 <= 0.0: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t_2 <= 1e+303: tmp = t_2 elif t_2 <= math.inf: tmp = (y / t) * (z / (1.0 + (a + t_1))) 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(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); elseif (t_2 <= -5e-298) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_2 <= 1e+303) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + t_1)))); 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 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); elseif (t_2 <= -5e-298) tmp = t_2; elseif (t_2 <= 0.0) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t_2 <= 1e+303) tmp = t_2; elseif (t_2 <= Inf) tmp = (y / t) * (z / (1.0 + (a + t_1))); 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[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-298], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+303], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-298}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t\_2 \leq 10^{+303}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + t\_1\right)}\\
\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 52.2%
*-commutative52.2%
associate-*l/86.8%
*-commutative86.8%
associate-*l/86.7%
Simplified86.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-298 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 99.7%
if -5.0000000000000002e-298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 62.9%
*-commutative62.9%
associate-*l/62.8%
*-commutative62.8%
associate-*l/69.3%
Simplified69.3%
Taylor expanded in x around 0 62.9%
Taylor expanded in t around 0 80.4%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.1%
*-commutative31.1%
associate-*l/37.3%
*-commutative37.3%
associate-*l/37.3%
Simplified37.3%
Taylor expanded in x around 0 62.0%
times-frac99.5%
associate-+r+99.5%
associate-/l*93.0%
+-commutative93.0%
associate-/l*99.5%
associate-*r/92.8%
fma-define92.9%
Simplified92.9%
Taylor expanded in z around 0 99.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.3%
*-commutative0.3%
associate-*l/9.7%
Simplified9.7%
Taylor expanded in t around 0 93.8%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.35e-39)
(/ x (+ (* y (/ b t)) (+ a 1.0)))
(if (<= t -2.9e-138)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t -5e-186)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= t 4.8e-107)
(/ z b)
(if (<= t 3.7e-41)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= t 4.55e+24)
(+ (/ x a) (/ (/ y t) (/ a z)))
(/ (+ x (/ (* y z) t)) (+ a 1.0)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.35e-39) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= -2.9e-138) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= -5e-186) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (t <= 4.8e-107) {
tmp = z / b;
} else if (t <= 3.7e-41) {
tmp = x / (1.0 + (b * (y / t)));
} else if (t <= 4.55e+24) {
tmp = (x / a) + ((y / t) / (a / z));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.35d-39)) then
tmp = x / ((y * (b / t)) + (a + 1.0d0))
else if (t <= (-2.9d-138)) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= (-5d-186)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (t <= 4.8d-107) then
tmp = z / b
else if (t <= 3.7d-41) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (t <= 4.55d+24) then
tmp = (x / a) + ((y / t) / (a / z))
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.35e-39) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= -2.9e-138) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= -5e-186) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (t <= 4.8e-107) {
tmp = z / b;
} else if (t <= 3.7e-41) {
tmp = x / (1.0 + (b * (y / t)));
} else if (t <= 4.55e+24) {
tmp = (x / a) + ((y / t) / (a / z));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.35e-39: tmp = x / ((y * (b / t)) + (a + 1.0)) elif t <= -2.9e-138: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= -5e-186: tmp = x / (1.0 + (a + ((y * b) / t))) elif t <= 4.8e-107: tmp = z / b elif t <= 3.7e-41: tmp = x / (1.0 + (b * (y / t))) elif t <= 4.55e+24: tmp = (x / a) + ((y / t) / (a / z)) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.35e-39) tmp = Float64(x / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); elseif (t <= -2.9e-138) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= -5e-186) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (t <= 4.8e-107) tmp = Float64(z / b); elseif (t <= 3.7e-41) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (t <= 4.55e+24) tmp = Float64(Float64(x / a) + Float64(Float64(y / t) / Float64(a / z))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.35e-39) tmp = x / ((y * (b / t)) + (a + 1.0)); elseif (t <= -2.9e-138) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= -5e-186) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (t <= 4.8e-107) tmp = z / b; elseif (t <= 3.7e-41) tmp = x / (1.0 + (b * (y / t))); elseif (t <= 4.55e+24) tmp = (x / a) + ((y / t) / (a / z)); else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.35e-39], N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.9e-138], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-186], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.7e-41], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.55e+24], N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-138}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t \leq 4.55 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{a} + \frac{\frac{y}{t}}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -2.3500000000000001e-39Initial program 83.7%
*-commutative83.7%
associate-*l/86.7%
*-commutative86.7%
associate-*l/92.5%
Simplified92.5%
Taylor expanded in x around inf 73.5%
if -2.3500000000000001e-39 < t < -2.89999999999999973e-138Initial program 64.4%
*-commutative64.4%
associate-*l/64.5%
*-commutative64.5%
associate-*l/64.5%
Simplified64.5%
Taylor expanded in x around 0 59.5%
Taylor expanded in t around 0 64.4%
if -2.89999999999999973e-138 < t < -5e-186Initial program 86.4%
*-commutative86.4%
associate-*l/80.2%
*-commutative80.2%
associate-*l/60.9%
Simplified60.9%
Taylor expanded in x around inf 73.9%
if -5e-186 < t < 4.79999999999999989e-107Initial program 56.0%
*-commutative56.0%
associate-*l/46.2%
*-commutative46.2%
associate-*l/41.9%
Simplified41.9%
Taylor expanded in t around 0 70.5%
if 4.79999999999999989e-107 < t < 3.7000000000000002e-41Initial program 88.8%
*-commutative88.8%
associate-*l/82.9%
*-commutative82.9%
associate-*l/77.3%
Simplified77.3%
Taylor expanded in x around inf 60.4%
Taylor expanded in a around 0 66.1%
associate-*r/66.2%
Simplified66.2%
if 3.7000000000000002e-41 < t < 4.5499999999999997e24Initial program 78.1%
*-commutative78.1%
associate-*l/70.6%
*-commutative70.6%
associate-*l/70.6%
Simplified70.6%
Taylor expanded in a around inf 59.1%
Taylor expanded in x around 0 59.0%
*-commutative59.0%
associate-*l/59.2%
*-commutative59.2%
Simplified59.2%
associate-*r/59.0%
*-commutative59.0%
times-frac77.4%
clear-num77.3%
times-frac77.3%
*-un-lft-identity77.3%
*-commutative77.3%
associate-/r*77.3%
Applied egg-rr77.3%
if 4.5499999999999997e24 < t Initial program 83.0%
*-commutative83.0%
associate-*l/86.4%
*-commutative86.4%
associate-*l/89.9%
Simplified89.9%
Taylor expanded in b around 0 76.2%
Final simplification72.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= z -1.08e-27)
(* (/ y t) (/ z t_1))
(if (<= z 4.1e+38)
(/ x t_1)
(if (or (<= z 1.2e+142) (and (not (<= z 4e+158)) (<= z 9.8e+181)))
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (a + ((y * b) / t));
double tmp;
if (z <= -1.08e-27) {
tmp = (y / t) * (z / t_1);
} else if (z <= 4.1e+38) {
tmp = x / t_1;
} else if ((z <= 1.2e+142) || (!(z <= 4e+158) && (z <= 9.8e+181))) {
tmp = (x + ((y * z) / t)) / (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) :: t_1
real(8) :: tmp
t_1 = 1.0d0 + (a + ((y * b) / t))
if (z <= (-1.08d-27)) then
tmp = (y / t) * (z / t_1)
else if (z <= 4.1d+38) then
tmp = x / t_1
else if ((z <= 1.2d+142) .or. (.not. (z <= 4d+158)) .and. (z <= 9.8d+181)) then
tmp = (x + ((y * z) / t)) / (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 t_1 = 1.0 + (a + ((y * b) / t));
double tmp;
if (z <= -1.08e-27) {
tmp = (y / t) * (z / t_1);
} else if (z <= 4.1e+38) {
tmp = x / t_1;
} else if ((z <= 1.2e+142) || (!(z <= 4e+158) && (z <= 9.8e+181))) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (a + ((y * b) / t)) tmp = 0 if z <= -1.08e-27: tmp = (y / t) * (z / t_1) elif z <= 4.1e+38: tmp = x / t_1 elif (z <= 1.2e+142) or (not (z <= 4e+158) and (z <= 9.8e+181)): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))) tmp = 0.0 if (z <= -1.08e-27) tmp = Float64(Float64(y / t) * Float64(z / t_1)); elseif (z <= 4.1e+38) tmp = Float64(x / t_1); elseif ((z <= 1.2e+142) || (!(z <= 4e+158) && (z <= 9.8e+181))) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 + (a + ((y * b) / t)); tmp = 0.0; if (z <= -1.08e-27) tmp = (y / t) * (z / t_1); elseif (z <= 4.1e+38) tmp = x / t_1; elseif ((z <= 1.2e+142) || (~((z <= 4e+158)) && (z <= 9.8e+181))) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e-27], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+38], N[(x / t$95$1), $MachinePrecision], If[Or[LessEqual[z, 1.2e+142], And[N[Not[LessEqual[z, 4e+158]], $MachinePrecision], LessEqual[z, 9.8e+181]]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(a + \frac{y \cdot b}{t}\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{-27}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_1}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+38}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+142} \lor \neg \left(z \leq 4 \cdot 10^{+158}\right) \land z \leq 9.8 \cdot 10^{+181}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if z < -1.08e-27Initial program 61.1%
*-commutative61.1%
associate-*l/62.9%
*-commutative62.9%
associate-*l/62.9%
Simplified62.9%
Taylor expanded in x around 0 42.0%
times-frac55.3%
associate-+r+55.3%
associate-/l*51.8%
+-commutative51.8%
associate-/l*55.3%
associate-*r/51.8%
fma-define51.8%
Simplified51.8%
Taylor expanded in z around 0 55.3%
if -1.08e-27 < z < 4.1000000000000003e38Initial program 88.0%
*-commutative88.0%
associate-*l/86.6%
*-commutative86.6%
associate-*l/85.8%
Simplified85.8%
Taylor expanded in x around inf 79.4%
if 4.1000000000000003e38 < z < 1.2e142 or 3.99999999999999981e158 < z < 9.79999999999999963e181Initial program 95.6%
*-commutative95.6%
associate-*l/82.8%
*-commutative82.8%
associate-*l/78.6%
Simplified78.6%
Taylor expanded in b around 0 87.1%
if 1.2e142 < z < 3.99999999999999981e158 or 9.79999999999999963e181 < z Initial program 45.8%
*-commutative45.8%
associate-*l/41.9%
*-commutative41.9%
associate-*l/43.8%
Simplified43.8%
Taylor expanded in t around 0 62.1%
Final simplification71.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (* b (/ y t))))) (t_2 (/ x (+ a 1.0))))
(if (<= t -5.2e+36)
t_2
(if (<= t -1.95e-123)
t_1
(if (<= t 2.45e-107)
(/ z b)
(if (<= t 4e-38)
t_1
(if (<= t 5.5e+87) (* (/ y t) (/ z (+ a 1.0))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (b * (y / t)));
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -5.2e+36) {
tmp = t_2;
} else if (t <= -1.95e-123) {
tmp = t_1;
} else if (t <= 2.45e-107) {
tmp = z / b;
} else if (t <= 4e-38) {
tmp = t_1;
} else if (t <= 5.5e+87) {
tmp = (y / t) * (z / (a + 1.0));
} 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 / (1.0d0 + (b * (y / t)))
t_2 = x / (a + 1.0d0)
if (t <= (-5.2d+36)) then
tmp = t_2
else if (t <= (-1.95d-123)) then
tmp = t_1
else if (t <= 2.45d-107) then
tmp = z / b
else if (t <= 4d-38) then
tmp = t_1
else if (t <= 5.5d+87) then
tmp = (y / t) * (z / (a + 1.0d0))
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 / (1.0 + (b * (y / t)));
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -5.2e+36) {
tmp = t_2;
} else if (t <= -1.95e-123) {
tmp = t_1;
} else if (t <= 2.45e-107) {
tmp = z / b;
} else if (t <= 4e-38) {
tmp = t_1;
} else if (t <= 5.5e+87) {
tmp = (y / t) * (z / (a + 1.0));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (b * (y / t))) t_2 = x / (a + 1.0) tmp = 0 if t <= -5.2e+36: tmp = t_2 elif t <= -1.95e-123: tmp = t_1 elif t <= 2.45e-107: tmp = z / b elif t <= 4e-38: tmp = t_1 elif t <= 5.5e+87: tmp = (y / t) * (z / (a + 1.0)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))) t_2 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -5.2e+36) tmp = t_2; elseif (t <= -1.95e-123) tmp = t_1; elseif (t <= 2.45e-107) tmp = Float64(z / b); elseif (t <= 4e-38) tmp = t_1; elseif (t <= 5.5e+87) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + (b * (y / t))); t_2 = x / (a + 1.0); tmp = 0.0; if (t <= -5.2e+36) tmp = t_2; elseif (t <= -1.95e-123) tmp = t_1; elseif (t <= 2.45e-107) tmp = z / b; elseif (t <= 4e-38) tmp = t_1; elseif (t <= 5.5e+87) tmp = (y / t) * (z / (a + 1.0)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+36], t$95$2, If[LessEqual[t, -1.95e-123], t$95$1, If[LessEqual[t, 2.45e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 4e-38], t$95$1, If[LessEqual[t, 5.5e+87], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + b \cdot \frac{y}{t}}\\
t_2 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.95 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.2000000000000003e36 or 5.50000000000000022e87 < t Initial program 82.6%
*-commutative82.6%
associate-*l/87.8%
*-commutative87.8%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in t around inf 69.6%
if -5.2000000000000003e36 < t < -1.94999999999999988e-123 or 2.4499999999999999e-107 < t < 3.9999999999999998e-38Initial program 83.4%
*-commutative83.4%
associate-*l/81.3%
*-commutative81.3%
associate-*l/79.4%
Simplified79.4%
Taylor expanded in x around inf 57.2%
Taylor expanded in a around 0 51.2%
associate-*r/51.2%
Simplified51.2%
if -1.94999999999999988e-123 < t < 2.4499999999999999e-107Initial program 59.8%
*-commutative59.8%
associate-*l/51.1%
*-commutative51.1%
associate-*l/44.5%
Simplified44.5%
Taylor expanded in t around 0 67.1%
if 3.9999999999999998e-38 < t < 5.50000000000000022e87Initial program 81.8%
*-commutative81.8%
associate-*l/74.4%
*-commutative74.4%
associate-*l/74.4%
Simplified74.4%
Taylor expanded in x around 0 55.6%
times-frac70.3%
associate-+r+70.3%
associate-/l*70.3%
+-commutative70.3%
associate-/l*70.3%
associate-*r/70.3%
fma-define70.3%
Simplified70.3%
Taylor expanded in b around 0 58.7%
Final simplification64.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (* y (/ b t)) (+ a 1.0)))))
(if (<= t -1.25e-123)
t_1
(if (<= t 1.1e-106)
(/ z b)
(if (<= t 1.3e-40)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= t 6.6e+43) (+ (/ x a) (/ (/ y t) (/ a z))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -1.25e-123) {
tmp = t_1;
} else if (t <= 1.1e-106) {
tmp = z / b;
} else if (t <= 1.3e-40) {
tmp = x / (1.0 + (b * (y / t)));
} else if (t <= 6.6e+43) {
tmp = (x / a) + ((y / t) / (a / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((y * (b / t)) + (a + 1.0d0))
if (t <= (-1.25d-123)) then
tmp = t_1
else if (t <= 1.1d-106) then
tmp = z / b
else if (t <= 1.3d-40) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (t <= 6.6d+43) then
tmp = (x / a) + ((y / t) / (a / z))
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 * (b / t)) + (a + 1.0));
double tmp;
if (t <= -1.25e-123) {
tmp = t_1;
} else if (t <= 1.1e-106) {
tmp = z / b;
} else if (t <= 1.3e-40) {
tmp = x / (1.0 + (b * (y / t)));
} else if (t <= 6.6e+43) {
tmp = (x / a) + ((y / t) / (a / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((y * (b / t)) + (a + 1.0)) tmp = 0 if t <= -1.25e-123: tmp = t_1 elif t <= 1.1e-106: tmp = z / b elif t <= 1.3e-40: tmp = x / (1.0 + (b * (y / t))) elif t <= 6.6e+43: tmp = (x / a) + ((y / t) / (a / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))) tmp = 0.0 if (t <= -1.25e-123) tmp = t_1; elseif (t <= 1.1e-106) tmp = Float64(z / b); elseif (t <= 1.3e-40) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (t <= 6.6e+43) tmp = Float64(Float64(x / a) + Float64(Float64(y / t) / Float64(a / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((y * (b / t)) + (a + 1.0)); tmp = 0.0; if (t <= -1.25e-123) tmp = t_1; elseif (t <= 1.1e-106) tmp = z / b; elseif (t <= 1.3e-40) tmp = x / (1.0 + (b * (y / t))); elseif (t <= 6.6e+43) tmp = (x / a) + ((y / t) / (a / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.25e-123], t$95$1, If[LessEqual[t, 1.1e-106], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.3e-40], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e+43], N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{a} + \frac{\frac{y}{t}}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.25000000000000007e-123 or 6.6000000000000003e43 < t Initial program 82.4%
*-commutative82.4%
associate-*l/85.4%
*-commutative85.4%
associate-*l/89.7%
Simplified89.7%
Taylor expanded in x around inf 70.4%
if -1.25000000000000007e-123 < t < 1.09999999999999997e-106Initial program 59.8%
*-commutative59.8%
associate-*l/51.1%
*-commutative51.1%
associate-*l/44.5%
Simplified44.5%
Taylor expanded in t around 0 67.1%
if 1.09999999999999997e-106 < t < 1.3000000000000001e-40Initial program 88.8%
*-commutative88.8%
associate-*l/82.9%
*-commutative82.9%
associate-*l/77.3%
Simplified77.3%
Taylor expanded in x around inf 60.4%
Taylor expanded in a around 0 66.1%
associate-*r/66.2%
Simplified66.2%
if 1.3000000000000001e-40 < t < 6.6000000000000003e43Initial program 78.9%
*-commutative78.9%
associate-*l/73.5%
*-commutative73.5%
associate-*l/73.5%
Simplified73.5%
Taylor expanded in a around inf 54.3%
Taylor expanded in x around 0 54.0%
*-commutative54.0%
associate-*l/54.2%
*-commutative54.2%
Simplified54.2%
associate-*r/54.0%
*-commutative54.0%
times-frac72.8%
clear-num72.7%
times-frac72.7%
*-un-lft-identity72.7%
*-commutative72.7%
associate-/r*72.8%
Applied egg-rr72.8%
Final simplification69.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.2e-123)
(/ x (+ (* y (/ b t)) (+ a 1.0)))
(if (<= t 4.6e-107)
(/ z b)
(if (<= t 2.3e-42)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= t 6.5e+43)
(+ (/ x a) (/ (/ y t) (/ a z)))
(/ (+ x (/ (* y z) t)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.2e-123) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= 4.6e-107) {
tmp = z / b;
} else if (t <= 2.3e-42) {
tmp = x / (1.0 + (b * (y / t)));
} else if (t <= 6.5e+43) {
tmp = (x / a) + ((y / t) / (a / z));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.2d-123)) then
tmp = x / ((y * (b / t)) + (a + 1.0d0))
else if (t <= 4.6d-107) then
tmp = z / b
else if (t <= 2.3d-42) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (t <= 6.5d+43) then
tmp = (x / a) + ((y / t) / (a / z))
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.2e-123) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= 4.6e-107) {
tmp = z / b;
} else if (t <= 2.3e-42) {
tmp = x / (1.0 + (b * (y / t)));
} else if (t <= 6.5e+43) {
tmp = (x / a) + ((y / t) / (a / z));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.2e-123: tmp = x / ((y * (b / t)) + (a + 1.0)) elif t <= 4.6e-107: tmp = z / b elif t <= 2.3e-42: tmp = x / (1.0 + (b * (y / t))) elif t <= 6.5e+43: tmp = (x / a) + ((y / t) / (a / z)) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.2e-123) tmp = Float64(x / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); elseif (t <= 4.6e-107) tmp = Float64(z / b); elseif (t <= 2.3e-42) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (t <= 6.5e+43) tmp = Float64(Float64(x / a) + Float64(Float64(y / t) / Float64(a / z))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.2e-123) tmp = x / ((y * (b / t)) + (a + 1.0)); elseif (t <= 4.6e-107) tmp = z / b; elseif (t <= 2.3e-42) tmp = x / (1.0 + (b * (y / t))); elseif (t <= 6.5e+43) tmp = (x / a) + ((y / t) / (a / z)); else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.2e-123], N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.3e-42], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+43], N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-42}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{a} + \frac{\frac{y}{t}}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.2e-123Initial program 81.9%
*-commutative81.9%
associate-*l/84.4%
*-commutative84.4%
associate-*l/89.1%
Simplified89.1%
Taylor expanded in x around inf 67.8%
if -1.2e-123 < t < 4.60000000000000007e-107Initial program 59.8%
*-commutative59.8%
associate-*l/51.1%
*-commutative51.1%
associate-*l/44.5%
Simplified44.5%
Taylor expanded in t around 0 67.1%
if 4.60000000000000007e-107 < t < 2.30000000000000004e-42Initial program 88.8%
*-commutative88.8%
associate-*l/82.9%
*-commutative82.9%
associate-*l/77.3%
Simplified77.3%
Taylor expanded in x around inf 60.4%
Taylor expanded in a around 0 66.1%
associate-*r/66.2%
Simplified66.2%
if 2.30000000000000004e-42 < t < 6.4999999999999998e43Initial program 78.9%
*-commutative78.9%
associate-*l/73.5%
*-commutative73.5%
associate-*l/73.5%
Simplified73.5%
Taylor expanded in a around inf 54.3%
Taylor expanded in x around 0 54.0%
*-commutative54.0%
associate-*l/54.2%
*-commutative54.2%
Simplified54.2%
associate-*r/54.0%
*-commutative54.0%
times-frac72.8%
clear-num72.7%
times-frac72.7%
*-un-lft-identity72.7%
*-commutative72.7%
associate-/r*72.8%
Applied egg-rr72.8%
if 6.4999999999999998e43 < t Initial program 83.2%
*-commutative83.2%
associate-*l/87.0%
*-commutative87.0%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in b around 0 77.7%
Final simplification69.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.2e-123) (not (<= t 4.2e-167))) (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.2e-123) || !(t <= 4.2e-167)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} 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.2d-123)) .or. (.not. (t <= 4.2d-167))) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / b))))
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.2e-123) || !(t <= 4.2e-167)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.2e-123) or not (t <= 4.2e-167): tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.2e-123) || !(t <= 4.2e-167)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); 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.2e-123) || ~((t <= 4.2e-167))) tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.2e-123], N[Not[LessEqual[t, 4.2e-167]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-123} \lor \neg \left(t \leq 4.2 \cdot 10^{-167}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.20000000000000006e-123 or 4.20000000000000035e-167 < t Initial program 81.1%
associate-/l*81.6%
associate-+l+81.6%
associate-/l*83.9%
Simplified83.9%
associate-/r/85.2%
Applied egg-rr85.2%
if -2.20000000000000006e-123 < t < 4.20000000000000035e-167Initial program 58.7%
*-commutative58.7%
associate-*l/49.2%
*-commutative49.2%
associate-*l/42.3%
Simplified42.3%
Taylor expanded in t around 0 68.8%
Final simplification80.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.26e-185)
(/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (* b (/ y t)))))
(if (<= t 7.5e-168)
(/ z b)
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.26e-185) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else if (t <= 7.5e-168) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (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) :: tmp
if (t <= (-1.26d-185)) then
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (b * (y / t))))
else if (t <= 7.5d-168) then
tmp = z / b
else
tmp = (x + (z * (y / t))) / (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 tmp;
if (t <= -1.26e-185) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else if (t <= 7.5e-168) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.26e-185: tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))) elif t <= 7.5e-168: tmp = z / b else: tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.26e-185) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); elseif (t <= 7.5e-168) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.26e-185) tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))); elseif (t <= 7.5e-168) tmp = z / b; else tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.26e-185], 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, 7.5e-168], N[(z / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.26 \cdot 10^{-185}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-168}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\end{array}
\end{array}
if t < -1.2599999999999999e-185Initial program 80.4%
associate-/l*81.5%
associate-+l+81.5%
associate-/l*82.4%
Simplified82.4%
associate-/r/85.3%
Applied egg-rr85.3%
if -1.2599999999999999e-185 < t < 7.4999999999999995e-168Initial program 53.1%
*-commutative53.1%
associate-*l/42.0%
*-commutative42.0%
associate-*l/38.2%
Simplified38.2%
Taylor expanded in t around 0 74.0%
if 7.4999999999999995e-168 < t Initial program 80.4%
associate-/l*79.4%
associate-+l+79.4%
associate-/l*79.7%
Simplified79.7%
associate-/r/81.6%
Applied egg-rr81.6%
Final simplification81.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x a) (/ (/ y t) (/ a z)))))
(if (<= a -8.5e+98)
t_1
(if (<= a -3e+15)
(/ z b)
(if (<= a 2.05e+21) (/ x (+ 1.0 (* b (/ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) / (a / z));
double tmp;
if (a <= -8.5e+98) {
tmp = t_1;
} else if (a <= -3e+15) {
tmp = z / b;
} else if (a <= 2.05e+21) {
tmp = x / (1.0 + (b * (y / t)));
} 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) + ((y / t) / (a / z))
if (a <= (-8.5d+98)) then
tmp = t_1
else if (a <= (-3d+15)) then
tmp = z / b
else if (a <= 2.05d+21) then
tmp = x / (1.0d0 + (b * (y / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) / (a / z));
double tmp;
if (a <= -8.5e+98) {
tmp = t_1;
} else if (a <= -3e+15) {
tmp = z / b;
} else if (a <= 2.05e+21) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) + ((y / t) / (a / z)) tmp = 0 if a <= -8.5e+98: tmp = t_1 elif a <= -3e+15: tmp = z / b elif a <= 2.05e+21: tmp = x / (1.0 + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) + Float64(Float64(y / t) / Float64(a / z))) tmp = 0.0 if (a <= -8.5e+98) tmp = t_1; elseif (a <= -3e+15) tmp = Float64(z / b); elseif (a <= 2.05e+21) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) + ((y / t) / (a / z)); tmp = 0.0; if (a <= -8.5e+98) tmp = t_1; elseif (a <= -3e+15) tmp = z / b; elseif (a <= 2.05e+21) tmp = x / (1.0 + (b * (y / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5e+98], t$95$1, If[LessEqual[a, -3e+15], N[(z / b), $MachinePrecision], If[LessEqual[a, 2.05e+21], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a} + \frac{\frac{y}{t}}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -8.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3 \cdot 10^{+15}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 2.05 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.4999999999999996e98 or 2.05e21 < a Initial program 77.5%
*-commutative77.5%
associate-*l/74.8%
*-commutative74.8%
associate-*l/74.0%
Simplified74.0%
Taylor expanded in a around inf 66.4%
Taylor expanded in x around 0 61.9%
*-commutative61.9%
associate-*l/63.9%
*-commutative63.9%
Simplified63.9%
associate-*r/61.9%
*-commutative61.9%
times-frac73.0%
clear-num73.0%
times-frac70.4%
*-un-lft-identity70.4%
*-commutative70.4%
associate-/r*73.0%
Applied egg-rr73.0%
if -8.4999999999999996e98 < a < -3e15Initial program 48.1%
*-commutative48.1%
associate-*l/42.7%
*-commutative42.7%
associate-*l/48.4%
Simplified48.4%
Taylor expanded in t around 0 71.7%
if -3e15 < a < 2.05e21Initial program 76.1%
*-commutative76.1%
associate-*l/74.7%
*-commutative74.7%
associate-*l/73.9%
Simplified73.9%
Taylor expanded in x around inf 56.7%
Taylor expanded in a around 0 56.7%
associate-*r/58.9%
Simplified58.9%
Final simplification65.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x a) (/ (/ y t) (/ a z)))))
(if (<= a -8.5e+98)
t_1
(if (<= a -2e+31)
(/ z b)
(if (<= a 1.85e+106) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) / (a / z));
double tmp;
if (a <= -8.5e+98) {
tmp = t_1;
} else if (a <= -2e+31) {
tmp = z / b;
} else if (a <= 1.85e+106) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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) + ((y / t) / (a / z))
if (a <= (-8.5d+98)) then
tmp = t_1
else if (a <= (-2d+31)) then
tmp = z / b
else if (a <= 1.85d+106) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) / (a / z));
double tmp;
if (a <= -8.5e+98) {
tmp = t_1;
} else if (a <= -2e+31) {
tmp = z / b;
} else if (a <= 1.85e+106) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) + ((y / t) / (a / z)) tmp = 0 if a <= -8.5e+98: tmp = t_1 elif a <= -2e+31: tmp = z / b elif a <= 1.85e+106: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) + Float64(Float64(y / t) / Float64(a / z))) tmp = 0.0 if (a <= -8.5e+98) tmp = t_1; elseif (a <= -2e+31) tmp = Float64(z / b); elseif (a <= 1.85e+106) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) + ((y / t) / (a / z)); tmp = 0.0; if (a <= -8.5e+98) tmp = t_1; elseif (a <= -2e+31) tmp = z / b; elseif (a <= 1.85e+106) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5e+98], t$95$1, If[LessEqual[a, -2e+31], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.85e+106], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a} + \frac{\frac{y}{t}}{\frac{a}{z}}\\
\mathbf{if}\;a \leq -8.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2 \cdot 10^{+31}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+106}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.4999999999999996e98 or 1.84999999999999997e106 < a Initial program 76.3%
*-commutative76.3%
associate-*l/73.1%
*-commutative73.1%
associate-*l/71.0%
Simplified71.0%
Taylor expanded in a around inf 68.3%
Taylor expanded in x around 0 63.0%
*-commutative63.0%
associate-*l/65.3%
*-commutative65.3%
Simplified65.3%
associate-*r/63.0%
*-commutative63.0%
times-frac76.3%
clear-num76.3%
times-frac74.2%
*-un-lft-identity74.2%
*-commutative74.2%
associate-/r*76.3%
Applied egg-rr76.3%
if -8.4999999999999996e98 < a < -1.9999999999999999e31Initial program 41.3%
*-commutative41.3%
associate-*l/35.2%
*-commutative35.2%
associate-*l/41.6%
Simplified41.6%
Taylor expanded in t around 0 80.8%
if -1.9999999999999999e31 < a < 1.84999999999999997e106Initial program 77.3%
*-commutative77.3%
associate-*l/76.1%
*-commutative76.1%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in x around inf 59.2%
Final simplification66.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) a)))
(if (<= a -2.4e+99)
t_1
(if (<= a -1.5e+15)
(/ z b)
(if (<= a 1.35e+44) (/ x (+ 1.0 (* b (/ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / a;
double tmp;
if (a <= -2.4e+99) {
tmp = t_1;
} else if (a <= -1.5e+15) {
tmp = z / b;
} else if (a <= 1.35e+44) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / a
if (a <= (-2.4d+99)) then
tmp = t_1
else if (a <= (-1.5d+15)) then
tmp = z / b
else if (a <= 1.35d+44) then
tmp = x / (1.0d0 + (b * (y / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / a;
double tmp;
if (a <= -2.4e+99) {
tmp = t_1;
} else if (a <= -1.5e+15) {
tmp = z / b;
} else if (a <= 1.35e+44) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / a tmp = 0 if a <= -2.4e+99: tmp = t_1 elif a <= -1.5e+15: tmp = z / b elif a <= 1.35e+44: tmp = x / (1.0 + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / a) tmp = 0.0 if (a <= -2.4e+99) tmp = t_1; elseif (a <= -1.5e+15) tmp = Float64(z / b); elseif (a <= 1.35e+44) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); 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; tmp = 0.0; if (a <= -2.4e+99) tmp = t_1; elseif (a <= -1.5e+15) tmp = z / b; elseif (a <= 1.35e+44) tmp = x / (1.0 + (b * (y / t))); else tmp = t_1; 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] / a), $MachinePrecision]}, If[LessEqual[a, -2.4e+99], t$95$1, If[LessEqual[a, -1.5e+15], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.35e+44], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{if}\;a \leq -2.4 \cdot 10^{+99}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.4000000000000001e99 or 1.35e44 < a Initial program 78.9%
*-commutative78.9%
associate-*l/76.0%
*-commutative76.0%
associate-*l/74.1%
Simplified74.1%
associate-*l/76.1%
*-commutative76.1%
clear-num76.1%
*-commutative76.1%
Applied egg-rr76.1%
Taylor expanded in a around inf 68.0%
associate-*r/66.9%
Simplified66.9%
if -2.4000000000000001e99 < a < -1.5e15Initial program 48.1%
*-commutative48.1%
associate-*l/42.7%
*-commutative42.7%
associate-*l/48.4%
Simplified48.4%
Taylor expanded in t around 0 71.7%
if -1.5e15 < a < 1.35e44Initial program 75.2%
*-commutative75.2%
associate-*l/73.8%
*-commutative73.8%
associate-*l/73.8%
Simplified73.8%
Taylor expanded in x around inf 56.8%
Taylor expanded in a around 0 54.8%
associate-*r/57.6%
Simplified57.6%
Final simplification62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -8.5e+98)
t_1
(if (<= a -1.8e+15)
(/ z b)
(if (<= a 1.15e+22) (/ x (+ 1.0 (* b (/ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -8.5e+98) {
tmp = t_1;
} else if (a <= -1.8e+15) {
tmp = z / b;
} else if (a <= 1.15e+22) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / a
if (a <= (-8.5d+98)) then
tmp = t_1
else if (a <= (-1.8d+15)) then
tmp = z / b
else if (a <= 1.15d+22) then
tmp = x / (1.0d0 + (b * (y / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -8.5e+98) {
tmp = t_1;
} else if (a <= -1.8e+15) {
tmp = z / b;
} else if (a <= 1.15e+22) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / a tmp = 0 if a <= -8.5e+98: tmp = t_1 elif a <= -1.8e+15: tmp = z / b elif a <= 1.15e+22: tmp = x / (1.0 + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -8.5e+98) tmp = t_1; elseif (a <= -1.8e+15) tmp = Float64(z / b); elseif (a <= 1.15e+22) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); 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; tmp = 0.0; if (a <= -8.5e+98) tmp = t_1; elseif (a <= -1.8e+15) tmp = z / b; elseif (a <= 1.15e+22) tmp = x / (1.0 + (b * (y / t))); 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] / a), $MachinePrecision]}, If[LessEqual[a, -8.5e+98], t$95$1, If[LessEqual[a, -1.8e+15], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.15e+22], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -8.5 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{+15}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.4999999999999996e98 or 1.1500000000000001e22 < a Initial program 77.5%
*-commutative77.5%
associate-*l/74.8%
*-commutative74.8%
associate-*l/74.0%
Simplified74.0%
Taylor expanded in a around inf 66.4%
if -8.4999999999999996e98 < a < -1.8e15Initial program 48.1%
*-commutative48.1%
associate-*l/42.7%
*-commutative42.7%
associate-*l/48.4%
Simplified48.4%
Taylor expanded in t around 0 71.7%
if -1.8e15 < a < 1.1500000000000001e22Initial program 76.1%
*-commutative76.1%
associate-*l/74.7%
*-commutative74.7%
associate-*l/73.9%
Simplified73.9%
Taylor expanded in x around inf 56.7%
Taylor expanded in a around 0 56.7%
associate-*r/58.9%
Simplified58.9%
Final simplification62.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6.5e+36) (/ x a) (if (<= t 8.4e-45) (/ z b) (if (<= t 2.7e+166) (/ x a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.5e+36) {
tmp = x / a;
} else if (t <= 8.4e-45) {
tmp = z / b;
} else if (t <= 2.7e+166) {
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 <= (-6.5d+36)) then
tmp = x / a
else if (t <= 8.4d-45) then
tmp = z / b
else if (t <= 2.7d+166) 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 <= -6.5e+36) {
tmp = x / a;
} else if (t <= 8.4e-45) {
tmp = z / b;
} else if (t <= 2.7e+166) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.5e+36: tmp = x / a elif t <= 8.4e-45: tmp = z / b elif t <= 2.7e+166: tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.5e+36) tmp = Float64(x / a); elseif (t <= 8.4e-45) tmp = Float64(z / b); elseif (t <= 2.7e+166) 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 <= -6.5e+36) tmp = x / a; elseif (t <= 8.4e-45) tmp = z / b; elseif (t <= 2.7e+166) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.5e+36], N[(x / a), $MachinePrecision], If[LessEqual[t, 8.4e-45], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.7e+166], N[(x / a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+36}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{-45}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+166}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.4999999999999998e36 or 8.3999999999999998e-45 < t < 2.70000000000000012e166Initial program 82.8%
*-commutative82.8%
associate-*l/83.8%
*-commutative83.8%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in x around inf 65.5%
Taylor expanded in a around inf 42.8%
if -6.4999999999999998e36 < t < 8.3999999999999998e-45Initial program 67.3%
*-commutative67.3%
associate-*l/60.8%
*-commutative60.8%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in t around 0 55.8%
if 2.70000000000000012e166 < t Initial program 83.1%
*-commutative83.1%
associate-*l/89.9%
*-commutative89.9%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in t around inf 80.4%
Taylor expanded in a around 0 56.9%
Final simplification51.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.8e+36) (not (<= t 1.95e-45))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.8e+36) || !(t <= 1.95e-45)) {
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 <= (-1.8d+36)) .or. (.not. (t <= 1.95d-45))) 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 <= -1.8e+36) || !(t <= 1.95e-45)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.8e+36) or not (t <= 1.95e-45): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.8e+36) || !(t <= 1.95e-45)) 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 <= -1.8e+36) || ~((t <= 1.95e-45))) 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, -1.8e+36], N[Not[LessEqual[t, 1.95e-45]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+36} \lor \neg \left(t \leq 1.95 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.7999999999999999e36 or 1.95e-45 < t Initial program 82.8%
*-commutative82.8%
associate-*l/85.2%
*-commutative85.2%
associate-*l/89.1%
Simplified89.1%
Taylor expanded in t around inf 62.8%
if -1.7999999999999999e36 < t < 1.95e-45Initial program 67.3%
*-commutative67.3%
associate-*l/60.8%
*-commutative60.8%
associate-*l/56.4%
Simplified56.4%
Taylor expanded in t around 0 55.8%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.5e-14) (not (<= a 2.9e-13))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7.5e-14) || !(a <= 2.9e-13)) {
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 <= (-7.5d-14)) .or. (.not. (a <= 2.9d-13))) 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 <= -7.5e-14) || !(a <= 2.9e-13)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7.5e-14) or not (a <= 2.9e-13): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7.5e-14) || !(a <= 2.9e-13)) 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 <= -7.5e-14) || ~((a <= 2.9e-13))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7.5e-14], N[Not[LessEqual[a, 2.9e-13]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-14} \lor \neg \left(a \leq 2.9 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.4999999999999996e-14 or 2.8999999999999998e-13 < a Initial program 73.4%
*-commutative73.4%
associate-*l/70.5%
*-commutative70.5%
associate-*l/70.6%
Simplified70.6%
Taylor expanded in x around inf 52.4%
Taylor expanded in a around inf 42.9%
if -7.4999999999999996e-14 < a < 2.8999999999999998e-13Initial program 76.4%
*-commutative76.4%
associate-*l/74.8%
*-commutative74.8%
associate-*l/74.0%
Simplified74.0%
Taylor expanded in t around inf 34.0%
Taylor expanded in a around 0 34.0%
Final simplification38.6%
(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.8%
*-commutative74.8%
associate-*l/72.6%
*-commutative72.6%
associate-*l/72.2%
Simplified72.2%
Taylor expanded in t around inf 38.6%
Taylor expanded in a around 0 18.5%
Final simplification18.5%
(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 2024034
(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))))