
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -4e+299)
(+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))
(if (<= t_1 -5e-308)
t_1
(if (<= t_1 0.0)
(fma
-1.0
(/ (- (/ t (/ (pow b 2.0) (* z (+ a 1.0)))) (/ t (/ b x))) y)
(/ z b))
(if (<= t_1 5e+262)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (fma y (/ b t) (+ a 1.0))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -4e+299) {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if (t_1 <= -5e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = fma(-1.0, (((t / (pow(b, 2.0) / (z * (a + 1.0)))) - (t / (b / x))) / y), (z / b));
} else if (t_1 <= 5e+262) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / fma(y, (b / t), (a + 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -4e+299) tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); elseif (t_1 <= -5e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = fma(-1.0, Float64(Float64(Float64(t / Float64((b ^ 2.0) / Float64(z * Float64(a + 1.0)))) - Float64(t / Float64(b / x))) / y), Float64(z / b)); elseif (t_1 <= 5e+262) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / fma(y, Float64(b / t), Float64(a + 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+299], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(-1.0 * N[(N[(N[(t / N[(N[Power[b, 2.0], $MachinePrecision] / N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+299}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-308}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{\frac{t}{\frac{{b}^{2}}{z \cdot \left(a + 1\right)}} - \frac{t}{\frac{b}{x}}}{y}, \frac{z}{b}\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(y, \frac{b}{t}, a + 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))) < -4.0000000000000002e299Initial program 39.6%
Taylor expanded in b around 0 39.1%
Taylor expanded in x around 0 49.6%
+-commutative49.6%
times-frac87.8%
Simplified87.8%
if -4.0000000000000002e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999955e-308 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000008e262Initial program 99.7%
if -4.99999999999999955e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 60.2%
Taylor expanded in y around -inf 63.5%
fma-def63.5%
distribute-lft-out--63.5%
associate-/l*65.9%
associate-/l*72.7%
Simplified72.7%
if 5.00000000000000008e262 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 55.2%
Taylor expanded in x around 0 65.0%
times-frac94.8%
associate-+r+94.8%
+-commutative94.8%
+-commutative94.8%
associate-*l/94.8%
*-commutative94.8%
fma-udef94.8%
+-commutative94.8%
Simplified94.8%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 88.0%
Final simplification92.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -4e+299)
(+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))
(if (<= t_1 5e+262)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (fma y (/ b t) (+ a 1.0))))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -4e+299) {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if (t_1 <= 5e+262) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / fma(y, (b / t), (a + 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -4e+299) tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); elseif (t_1 <= 5e+262) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / fma(y, Float64(b / t), Float64(a + 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+299], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+299}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(y, \frac{b}{t}, a + 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))) < -4.0000000000000002e299Initial program 39.6%
Taylor expanded in b around 0 39.1%
Taylor expanded in x around 0 49.6%
+-commutative49.6%
times-frac87.8%
Simplified87.8%
if -4.0000000000000002e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000008e262Initial program 91.1%
if 5.00000000000000008e262 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 55.2%
Taylor expanded in x around 0 65.0%
times-frac94.8%
associate-+r+94.8%
+-commutative94.8%
+-commutative94.8%
associate-*l/94.8%
*-commutative94.8%
fma-udef94.8%
+-commutative94.8%
Simplified94.8%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 88.0%
Final simplification90.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 -4e+299)
(+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))
(if (<= t_1 INFINITY) t_1 (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -4e+299) {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if (t_1 <= ((double) INFINITY)) {
tmp = 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 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -4e+299) {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -4e+299: tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)) elif t_1 <= math.inf: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= -4e+299) tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -4e+299) tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)); elseif (t_1 <= Inf) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+299], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+299}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\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))) < -4.0000000000000002e299Initial program 39.6%
Taylor expanded in b around 0 39.1%
Taylor expanded in x around 0 49.6%
+-commutative49.6%
times-frac87.8%
Simplified87.8%
if -4.0000000000000002e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 87.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 88.0%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y))))
(t_2 (+ (/ x a) (/ z (* t (/ a y)))))
(t_3 (+ x (/ y (/ t z)))))
(if (<= a -2.35e+26)
t_2
(if (<= a -1.8e-10)
t_1
(if (<= a -9.5e-305)
t_3
(if (<= a 8.8e-256)
(/ z b)
(if (<= a 2.1e-189)
(+ x (/ (* y z) t))
(if (<= a 1.15e-156)
t_1
(if (<= a 2.2e-58) t_3 (if (<= a 2e+69) (/ z b) t_2))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double t_2 = (x / a) + (z / (t * (a / y)));
double t_3 = x + (y / (t / z));
double tmp;
if (a <= -2.35e+26) {
tmp = t_2;
} else if (a <= -1.8e-10) {
tmp = t_1;
} else if (a <= -9.5e-305) {
tmp = t_3;
} else if (a <= 8.8e-256) {
tmp = z / b;
} else if (a <= 2.1e-189) {
tmp = x + ((y * z) / t);
} else if (a <= 1.15e-156) {
tmp = t_1;
} else if (a <= 2.2e-58) {
tmp = t_3;
} else if (a <= 2e+69) {
tmp = z / b;
} 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) :: t_3
real(8) :: tmp
t_1 = (z / b) + ((t / b) * (x / y))
t_2 = (x / a) + (z / (t * (a / y)))
t_3 = x + (y / (t / z))
if (a <= (-2.35d+26)) then
tmp = t_2
else if (a <= (-1.8d-10)) then
tmp = t_1
else if (a <= (-9.5d-305)) then
tmp = t_3
else if (a <= 8.8d-256) then
tmp = z / b
else if (a <= 2.1d-189) then
tmp = x + ((y * z) / t)
else if (a <= 1.15d-156) then
tmp = t_1
else if (a <= 2.2d-58) then
tmp = t_3
else if (a <= 2d+69) then
tmp = z / b
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) + ((t / b) * (x / y));
double t_2 = (x / a) + (z / (t * (a / y)));
double t_3 = x + (y / (t / z));
double tmp;
if (a <= -2.35e+26) {
tmp = t_2;
} else if (a <= -1.8e-10) {
tmp = t_1;
} else if (a <= -9.5e-305) {
tmp = t_3;
} else if (a <= 8.8e-256) {
tmp = z / b;
} else if (a <= 2.1e-189) {
tmp = x + ((y * z) / t);
} else if (a <= 1.15e-156) {
tmp = t_1;
} else if (a <= 2.2e-58) {
tmp = t_3;
} else if (a <= 2e+69) {
tmp = z / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) t_2 = (x / a) + (z / (t * (a / y))) t_3 = x + (y / (t / z)) tmp = 0 if a <= -2.35e+26: tmp = t_2 elif a <= -1.8e-10: tmp = t_1 elif a <= -9.5e-305: tmp = t_3 elif a <= 8.8e-256: tmp = z / b elif a <= 2.1e-189: tmp = x + ((y * z) / t) elif a <= 1.15e-156: tmp = t_1 elif a <= 2.2e-58: tmp = t_3 elif a <= 2e+69: tmp = z / b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) t_2 = Float64(Float64(x / a) + Float64(z / Float64(t * Float64(a / y)))) t_3 = Float64(x + Float64(y / Float64(t / z))) tmp = 0.0 if (a <= -2.35e+26) tmp = t_2; elseif (a <= -1.8e-10) tmp = t_1; elseif (a <= -9.5e-305) tmp = t_3; elseif (a <= 8.8e-256) tmp = Float64(z / b); elseif (a <= 2.1e-189) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 1.15e-156) tmp = t_1; elseif (a <= 2.2e-58) tmp = t_3; elseif (a <= 2e+69) tmp = Float64(z / b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / b) * (x / y)); t_2 = (x / a) + (z / (t * (a / y))); t_3 = x + (y / (t / z)); tmp = 0.0; if (a <= -2.35e+26) tmp = t_2; elseif (a <= -1.8e-10) tmp = t_1; elseif (a <= -9.5e-305) tmp = t_3; elseif (a <= 8.8e-256) tmp = z / b; elseif (a <= 2.1e-189) tmp = x + ((y * z) / t); elseif (a <= 1.15e-156) tmp = t_1; elseif (a <= 2.2e-58) tmp = t_3; elseif (a <= 2e+69) tmp = z / b; 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[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / a), $MachinePrecision] + N[(z / N[(t * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.35e+26], t$95$2, If[LessEqual[a, -1.8e-10], t$95$1, If[LessEqual[a, -9.5e-305], t$95$3, If[LessEqual[a, 8.8e-256], N[(z / b), $MachinePrecision], If[LessEqual[a, 2.1e-189], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e-156], t$95$1, If[LessEqual[a, 2.2e-58], t$95$3, If[LessEqual[a, 2e+69], N[(z / b), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
t_2 := \frac{x}{a} + \frac{z}{t \cdot \frac{a}{y}}\\
t_3 := x + \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;a \leq -2.35 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-10}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-305}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-256}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-189}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-58}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -2.3499999999999999e26 or 2.0000000000000001e69 < a Initial program 78.1%
Taylor expanded in x around 0 78.3%
Taylor expanded in a around inf 70.1%
times-frac68.8%
Simplified68.8%
Taylor expanded in a around inf 65.6%
clear-num65.5%
frac-times69.4%
*-un-lft-identity69.4%
Applied egg-rr69.4%
if -2.3499999999999999e26 < a < -1.8e-10 or 2.10000000000000016e-189 < a < 1.15e-156Initial program 61.9%
Taylor expanded in b around inf 53.9%
Taylor expanded in t around 0 83.7%
times-frac91.0%
Simplified91.0%
if -1.8e-10 < a < -9.49999999999999902e-305 or 1.15e-156 < a < 2.20000000000000006e-58Initial program 87.4%
Taylor expanded in b around 0 68.2%
Taylor expanded in a around 0 68.2%
associate-/l*70.9%
Simplified70.9%
if -9.49999999999999902e-305 < a < 8.80000000000000039e-256 or 2.20000000000000006e-58 < a < 2.0000000000000001e69Initial program 53.1%
Taylor expanded in y around inf 66.3%
if 8.80000000000000039e-256 < a < 2.10000000000000016e-189Initial program 81.5%
Taylor expanded in b around 0 74.7%
Taylor expanded in a around 0 74.7%
Final simplification70.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x a) (/ z (* t (/ a y)))))
(t_2 (+ (/ z b) (/ (* x t) (* y b))))
(t_3 (+ x (/ y (/ t z)))))
(if (<= a -1.8e+26)
t_1
(if (<= a -2.8e-7)
(+ (/ z b) (* (/ t b) (/ x y)))
(if (<= a -2.7e-305)
t_3
(if (<= a 8.8e-256)
(/ z b)
(if (<= a 1.25e-189)
(+ x (/ (* y z) t))
(if (<= a 2.25e-157)
t_2
(if (<= a 4.8e-64) t_3 (if (<= a 8.8e+70) t_2 t_1))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + (z / (t * (a / y)));
double t_2 = (z / b) + ((x * t) / (y * b));
double t_3 = x + (y / (t / z));
double tmp;
if (a <= -1.8e+26) {
tmp = t_1;
} else if (a <= -2.8e-7) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (a <= -2.7e-305) {
tmp = t_3;
} else if (a <= 8.8e-256) {
tmp = z / b;
} else if (a <= 1.25e-189) {
tmp = x + ((y * z) / t);
} else if (a <= 2.25e-157) {
tmp = t_2;
} else if (a <= 4.8e-64) {
tmp = t_3;
} else if (a <= 8.8e+70) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (x / a) + (z / (t * (a / y)))
t_2 = (z / b) + ((x * t) / (y * b))
t_3 = x + (y / (t / z))
if (a <= (-1.8d+26)) then
tmp = t_1
else if (a <= (-2.8d-7)) then
tmp = (z / b) + ((t / b) * (x / y))
else if (a <= (-2.7d-305)) then
tmp = t_3
else if (a <= 8.8d-256) then
tmp = z / b
else if (a <= 1.25d-189) then
tmp = x + ((y * z) / t)
else if (a <= 2.25d-157) then
tmp = t_2
else if (a <= 4.8d-64) then
tmp = t_3
else if (a <= 8.8d+70) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + (z / (t * (a / y)));
double t_2 = (z / b) + ((x * t) / (y * b));
double t_3 = x + (y / (t / z));
double tmp;
if (a <= -1.8e+26) {
tmp = t_1;
} else if (a <= -2.8e-7) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (a <= -2.7e-305) {
tmp = t_3;
} else if (a <= 8.8e-256) {
tmp = z / b;
} else if (a <= 1.25e-189) {
tmp = x + ((y * z) / t);
} else if (a <= 2.25e-157) {
tmp = t_2;
} else if (a <= 4.8e-64) {
tmp = t_3;
} else if (a <= 8.8e+70) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) + (z / (t * (a / y))) t_2 = (z / b) + ((x * t) / (y * b)) t_3 = x + (y / (t / z)) tmp = 0 if a <= -1.8e+26: tmp = t_1 elif a <= -2.8e-7: tmp = (z / b) + ((t / b) * (x / y)) elif a <= -2.7e-305: tmp = t_3 elif a <= 8.8e-256: tmp = z / b elif a <= 1.25e-189: tmp = x + ((y * z) / t) elif a <= 2.25e-157: tmp = t_2 elif a <= 4.8e-64: tmp = t_3 elif a <= 8.8e+70: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) + Float64(z / Float64(t * Float64(a / y)))) t_2 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_3 = Float64(x + Float64(y / Float64(t / z))) tmp = 0.0 if (a <= -1.8e+26) tmp = t_1; elseif (a <= -2.8e-7) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); elseif (a <= -2.7e-305) tmp = t_3; elseif (a <= 8.8e-256) tmp = Float64(z / b); elseif (a <= 1.25e-189) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 2.25e-157) tmp = t_2; elseif (a <= 4.8e-64) tmp = t_3; elseif (a <= 8.8e+70) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) + (z / (t * (a / y))); t_2 = (z / b) + ((x * t) / (y * b)); t_3 = x + (y / (t / z)); tmp = 0.0; if (a <= -1.8e+26) tmp = t_1; elseif (a <= -2.8e-7) tmp = (z / b) + ((t / b) * (x / y)); elseif (a <= -2.7e-305) tmp = t_3; elseif (a <= 8.8e-256) tmp = z / b; elseif (a <= 1.25e-189) tmp = x + ((y * z) / t); elseif (a <= 2.25e-157) tmp = t_2; elseif (a <= 4.8e-64) tmp = t_3; elseif (a <= 8.8e+70) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] + N[(z / N[(t * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.8e+26], t$95$1, If[LessEqual[a, -2.8e-7], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.7e-305], t$95$3, If[LessEqual[a, 8.8e-256], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.25e-189], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.25e-157], t$95$2, If[LessEqual[a, 4.8e-64], t$95$3, If[LessEqual[a, 8.8e+70], t$95$2, t$95$1]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a} + \frac{z}{t \cdot \frac{a}{y}}\\
t_2 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_3 := x + \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-305}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-256}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-189}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-157}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-64}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{+70}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.80000000000000012e26 or 8.80000000000000003e70 < a Initial program 78.1%
Taylor expanded in x around 0 78.3%
Taylor expanded in a around inf 70.1%
times-frac68.8%
Simplified68.8%
Taylor expanded in a around inf 65.6%
clear-num65.5%
frac-times69.4%
*-un-lft-identity69.4%
Applied egg-rr69.4%
if -1.80000000000000012e26 < a < -2.80000000000000019e-7Initial program 66.4%
Taylor expanded in b around inf 65.2%
Taylor expanded in t around 0 81.3%
times-frac97.5%
Simplified97.5%
if -2.80000000000000019e-7 < a < -2.6999999999999999e-305 or 2.24999999999999999e-157 < a < 4.79999999999999997e-64Initial program 87.4%
Taylor expanded in b around 0 68.2%
Taylor expanded in a around 0 68.2%
associate-/l*70.9%
Simplified70.9%
if -2.6999999999999999e-305 < a < 8.80000000000000039e-256Initial program 47.7%
Taylor expanded in y around inf 90.9%
if 8.80000000000000039e-256 < a < 1.2499999999999999e-189Initial program 81.5%
Taylor expanded in b around 0 74.7%
Taylor expanded in a around 0 74.7%
if 1.2499999999999999e-189 < a < 2.24999999999999999e-157 or 4.79999999999999997e-64 < a < 8.80000000000000003e70Initial program 55.9%
Taylor expanded in b around inf 47.3%
Taylor expanded in t around 0 70.9%
Final simplification71.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t z)))) (t_2 (+ (/ x a) (/ z (* t (/ a y))))))
(if (<= a -22000000000.0)
t_2
(if (<= a -1e-304)
t_1
(if (<= a 1.75e-255)
(/ z b)
(if (<= a 2.2e-58) t_1 (if (<= a 2.15e+67) (/ z b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double t_2 = (x / a) + (z / (t * (a / y)));
double tmp;
if (a <= -22000000000.0) {
tmp = t_2;
} else if (a <= -1e-304) {
tmp = t_1;
} else if (a <= 1.75e-255) {
tmp = z / b;
} else if (a <= 2.2e-58) {
tmp = t_1;
} else if (a <= 2.15e+67) {
tmp = z / b;
} 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 / (t / z))
t_2 = (x / a) + (z / (t * (a / y)))
if (a <= (-22000000000.0d0)) then
tmp = t_2
else if (a <= (-1d-304)) then
tmp = t_1
else if (a <= 1.75d-255) then
tmp = z / b
else if (a <= 2.2d-58) then
tmp = t_1
else if (a <= 2.15d+67) then
tmp = z / b
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 / (t / z));
double t_2 = (x / a) + (z / (t * (a / y)));
double tmp;
if (a <= -22000000000.0) {
tmp = t_2;
} else if (a <= -1e-304) {
tmp = t_1;
} else if (a <= 1.75e-255) {
tmp = z / b;
} else if (a <= 2.2e-58) {
tmp = t_1;
} else if (a <= 2.15e+67) {
tmp = z / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / (t / z)) t_2 = (x / a) + (z / (t * (a / y))) tmp = 0 if a <= -22000000000.0: tmp = t_2 elif a <= -1e-304: tmp = t_1 elif a <= 1.75e-255: tmp = z / b elif a <= 2.2e-58: tmp = t_1 elif a <= 2.15e+67: tmp = z / b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(t / z))) t_2 = Float64(Float64(x / a) + Float64(z / Float64(t * Float64(a / y)))) tmp = 0.0 if (a <= -22000000000.0) tmp = t_2; elseif (a <= -1e-304) tmp = t_1; elseif (a <= 1.75e-255) tmp = Float64(z / b); elseif (a <= 2.2e-58) tmp = t_1; elseif (a <= 2.15e+67) tmp = Float64(z / b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / (t / z)); t_2 = (x / a) + (z / (t * (a / y))); tmp = 0.0; if (a <= -22000000000.0) tmp = t_2; elseif (a <= -1e-304) tmp = t_1; elseif (a <= 1.75e-255) tmp = z / b; elseif (a <= 2.2e-58) tmp = t_1; elseif (a <= 2.15e+67) tmp = z / b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / a), $MachinePrecision] + N[(z / N[(t * N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -22000000000.0], t$95$2, If[LessEqual[a, -1e-304], t$95$1, If[LessEqual[a, 1.75e-255], N[(z / b), $MachinePrecision], If[LessEqual[a, 2.2e-58], t$95$1, If[LessEqual[a, 2.15e+67], N[(z / b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
t_2 := \frac{x}{a} + \frac{z}{t \cdot \frac{a}{y}}\\
\mathbf{if}\;a \leq -22000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-255}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{+67}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -2.2e10 or 2.1500000000000001e67 < a Initial program 77.8%
Taylor expanded in x around 0 78.1%
Taylor expanded in a around inf 68.6%
times-frac67.2%
Simplified67.2%
Taylor expanded in a around inf 64.1%
clear-num64.0%
frac-times67.8%
*-un-lft-identity67.8%
Applied egg-rr67.8%
if -2.2e10 < a < -9.99999999999999971e-305 or 1.74999999999999989e-255 < a < 2.20000000000000006e-58Initial program 83.7%
Taylor expanded in b around 0 63.4%
Taylor expanded in a around 0 63.4%
associate-/l*64.5%
Simplified64.5%
if -9.99999999999999971e-305 < a < 1.74999999999999989e-255 or 2.20000000000000006e-58 < a < 2.1500000000000001e67Initial program 53.1%
Taylor expanded in y around inf 66.3%
Final simplification66.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1450.0) (not (<= b 1.3e+105))) (+ (/ z b) (/ x (+ (+ a (/ (* y b) t)) 1.0))) (/ (+ x (* z (/ y t))) (+ (+ a (* y (/ b t))) 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1450.0) || !(b <= 1.3e+105)) {
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0));
} else {
tmp = (x + (z * (y / t))) / ((a + (y * (b / t))) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1450.0d0)) .or. (.not. (b <= 1.3d+105))) then
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0d0))
else
tmp = (x + (z * (y / t))) / ((a + (y * (b / t))) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1450.0) || !(b <= 1.3e+105)) {
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0));
} else {
tmp = (x + (z * (y / t))) / ((a + (y * (b / t))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1450.0) or not (b <= 1.3e+105): tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0)) else: tmp = (x + (z * (y / t))) / ((a + (y * (b / t))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1450.0) || !(b <= 1.3e+105)) tmp = Float64(Float64(z / b) + Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1450.0) || ~((b <= 1.3e+105))) tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0)); else tmp = (x + (z * (y / t))) / ((a + (y * (b / t))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1450.0], N[Not[LessEqual[b, 1.3e+105]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1450 \lor \neg \left(b \leq 1.3 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\
\end{array}
\end{array}
if b < -1450 or 1.3000000000000001e105 < b Initial program 60.2%
Taylor expanded in x around 0 59.7%
Taylor expanded in y around inf 84.5%
if -1450 < b < 1.3000000000000001e105Initial program 87.0%
*-commutative87.0%
associate-/l*87.7%
+-commutative87.7%
associate-+l+87.7%
associate-*r/87.7%
*-commutative87.7%
Simplified87.7%
div-inv87.6%
clear-num87.7%
Applied egg-rr87.7%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -400.0) (not (<= b 8e+97))) (+ (/ z b) (/ x (+ (+ a (/ (* y b) t)) 1.0))) (/ (+ x (/ z (/ t y))) (+ (+ a (/ y (/ t b))) 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -400.0) || !(b <= 8e+97)) {
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0));
} else {
tmp = (x + (z / (t / y))) / ((a + (y / (t / b))) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-400.0d0)) .or. (.not. (b <= 8d+97))) then
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0d0))
else
tmp = (x + (z / (t / y))) / ((a + (y / (t / b))) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -400.0) || !(b <= 8e+97)) {
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0));
} else {
tmp = (x + (z / (t / y))) / ((a + (y / (t / b))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -400.0) or not (b <= 8e+97): tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0)) else: tmp = (x + (z / (t / y))) / ((a + (y / (t / b))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -400.0) || !(b <= 8e+97)) tmp = Float64(Float64(z / b) + Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0))); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -400.0) || ~((b <= 8e+97))) tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0)); else tmp = (x + (z / (t / y))) / ((a + (y / (t / b))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -400.0], N[Not[LessEqual[b, 8e+97]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -400 \lor \neg \left(b \leq 8 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\
\end{array}
\end{array}
if b < -400 or 8.0000000000000006e97 < b Initial program 60.2%
Taylor expanded in x around 0 59.7%
Taylor expanded in y around inf 84.5%
if -400 < b < 8.0000000000000006e97Initial program 87.0%
*-commutative87.0%
associate-/l*87.7%
+-commutative87.7%
associate-+l+87.7%
associate-*r/87.7%
*-commutative87.7%
Simplified87.7%
associate-*l/87.7%
*-commutative87.7%
associate-/l*87.7%
Applied egg-rr87.7%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t z)))) (t_2 (/ t_1 a)))
(if (<= a -22000000000.0)
t_2
(if (<= a -1.1e-306)
t_1
(if (<= a 8e-256)
(/ z b)
(if (<= a 1.28e-61) t_1 (if (<= a 1.2e+69) (/ z b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double t_2 = t_1 / a;
double tmp;
if (a <= -22000000000.0) {
tmp = t_2;
} else if (a <= -1.1e-306) {
tmp = t_1;
} else if (a <= 8e-256) {
tmp = z / b;
} else if (a <= 1.28e-61) {
tmp = t_1;
} else if (a <= 1.2e+69) {
tmp = z / b;
} 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 / (t / z))
t_2 = t_1 / a
if (a <= (-22000000000.0d0)) then
tmp = t_2
else if (a <= (-1.1d-306)) then
tmp = t_1
else if (a <= 8d-256) then
tmp = z / b
else if (a <= 1.28d-61) then
tmp = t_1
else if (a <= 1.2d+69) then
tmp = z / b
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 / (t / z));
double t_2 = t_1 / a;
double tmp;
if (a <= -22000000000.0) {
tmp = t_2;
} else if (a <= -1.1e-306) {
tmp = t_1;
} else if (a <= 8e-256) {
tmp = z / b;
} else if (a <= 1.28e-61) {
tmp = t_1;
} else if (a <= 1.2e+69) {
tmp = z / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / (t / z)) t_2 = t_1 / a tmp = 0 if a <= -22000000000.0: tmp = t_2 elif a <= -1.1e-306: tmp = t_1 elif a <= 8e-256: tmp = z / b elif a <= 1.28e-61: tmp = t_1 elif a <= 1.2e+69: tmp = z / b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(t / z))) t_2 = Float64(t_1 / a) tmp = 0.0 if (a <= -22000000000.0) tmp = t_2; elseif (a <= -1.1e-306) tmp = t_1; elseif (a <= 8e-256) tmp = Float64(z / b); elseif (a <= 1.28e-61) tmp = t_1; elseif (a <= 1.2e+69) tmp = Float64(z / b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / (t / z)); t_2 = t_1 / a; tmp = 0.0; if (a <= -22000000000.0) tmp = t_2; elseif (a <= -1.1e-306) tmp = t_1; elseif (a <= 8e-256) tmp = z / b; elseif (a <= 1.28e-61) tmp = t_1; elseif (a <= 1.2e+69) tmp = z / b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / a), $MachinePrecision]}, If[LessEqual[a, -22000000000.0], t$95$2, If[LessEqual[a, -1.1e-306], t$95$1, If[LessEqual[a, 8e-256], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.28e-61], t$95$1, If[LessEqual[a, 1.2e+69], N[(z / b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
t_2 := \frac{t_1}{a}\\
\mathbf{if}\;a \leq -22000000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.1 \cdot 10^{-306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-256}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.28 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -2.2e10 or 1.2000000000000001e69 < a Initial program 77.8%
Taylor expanded in b around 0 63.1%
Taylor expanded in a around inf 63.1%
associate-/l*64.9%
Simplified64.9%
if -2.2e10 < a < -1.10000000000000008e-306 or 7.99999999999999982e-256 < a < 1.28000000000000009e-61Initial program 83.7%
Taylor expanded in b around 0 63.4%
Taylor expanded in a around 0 63.4%
associate-/l*64.5%
Simplified64.5%
if -1.10000000000000008e-306 < a < 7.99999999999999982e-256 or 1.28000000000000009e-61 < a < 1.2000000000000001e69Initial program 53.1%
Taylor expanded in y around inf 66.3%
Final simplification64.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ 1.0 (* (/ t y) (/ (+ a 1.0) z)))))
(if (<= z -1.65e+217)
(/ z b)
(if (<= z -3.5e+118)
t_1
(if (<= z 2.8e+69)
(/ x (+ (+ a (/ (* y b) t)) 1.0))
(if (<= z 4e+136) (+ (/ z b) (/ (* x t) (* y b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 / ((t / y) * ((a + 1.0) / z));
double tmp;
if (z <= -1.65e+217) {
tmp = z / b;
} else if (z <= -3.5e+118) {
tmp = t_1;
} else if (z <= 2.8e+69) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (z <= 4e+136) {
tmp = (z / b) + ((x * t) / (y * 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 / ((t / y) * ((a + 1.0d0) / z))
if (z <= (-1.65d+217)) then
tmp = z / b
else if (z <= (-3.5d+118)) then
tmp = t_1
else if (z <= 2.8d+69) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
else if (z <= 4d+136) then
tmp = (z / b) + ((x * t) / (y * 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 / ((t / y) * ((a + 1.0) / z));
double tmp;
if (z <= -1.65e+217) {
tmp = z / b;
} else if (z <= -3.5e+118) {
tmp = t_1;
} else if (z <= 2.8e+69) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else if (z <= 4e+136) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 / ((t / y) * ((a + 1.0) / z)) tmp = 0 if z <= -1.65e+217: tmp = z / b elif z <= -3.5e+118: tmp = t_1 elif z <= 2.8e+69: tmp = x / ((a + ((y * b) / t)) + 1.0) elif z <= 4e+136: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 / Float64(Float64(t / y) * Float64(Float64(a + 1.0) / z))) tmp = 0.0 if (z <= -1.65e+217) tmp = Float64(z / b); elseif (z <= -3.5e+118) tmp = t_1; elseif (z <= 2.8e+69) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); elseif (z <= 4e+136) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 / ((t / y) * ((a + 1.0) / z)); tmp = 0.0; if (z <= -1.65e+217) tmp = z / b; elseif (z <= -3.5e+118) tmp = t_1; elseif (z <= 2.8e+69) tmp = x / ((a + ((y * b) / t)) + 1.0); elseif (z <= 4e+136) tmp = (z / b) + ((x * t) / (y * 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[(t / y), $MachinePrecision] * N[(N[(a + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+217], N[(z / b), $MachinePrecision], If[LessEqual[z, -3.5e+118], t$95$1, If[LessEqual[z, 2.8e+69], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+136], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{t}{y} \cdot \frac{a + 1}{z}}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+217}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+69}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+136}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.65e217Initial program 57.1%
Taylor expanded in y around inf 59.0%
if -1.65e217 < z < -3.50000000000000016e118 or 4.00000000000000023e136 < z Initial program 63.5%
Taylor expanded in b around 0 59.7%
clear-num59.6%
inv-pow59.6%
associate-/l*63.4%
Applied egg-rr63.4%
unpow-163.4%
Simplified63.4%
Taylor expanded in x around 0 44.0%
times-frac56.5%
*-commutative56.5%
Simplified56.5%
if -3.50000000000000016e118 < z < 2.79999999999999982e69Initial program 85.6%
Taylor expanded in x around inf 72.9%
if 2.79999999999999982e69 < z < 4.00000000000000023e136Initial program 62.9%
Taylor expanded in b around inf 39.0%
Taylor expanded in t around 0 63.8%
Final simplification67.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.6e+72) (not (<= b 6.5e+191))) (+ (/ z b) (/ (* x t) (* y b))) (+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.6e+72) || !(b <= 6.5e+191)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-3.6d+72)) .or. (.not. (b <= 6.5d+191))) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = ((y / t) * (z / (a + 1.0d0))) + (x / (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.6e+72) || !(b <= 6.5e+191)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.6e+72) or not (b <= 6.5e+191): tmp = (z / b) + ((x * t) / (y * b)) else: tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.6e+72) || !(b <= 6.5e+191)) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.6e+72) || ~((b <= 6.5e+191))) tmp = (z / b) + ((x * t) / (y * b)); else tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.6e+72], N[Not[LessEqual[b, 6.5e+191]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+72} \lor \neg \left(b \leq 6.5 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\end{array}
\end{array}
if b < -3.60000000000000035e72 or 6.50000000000000008e191 < b Initial program 57.7%
Taylor expanded in b around inf 45.1%
Taylor expanded in t around 0 68.8%
if -3.60000000000000035e72 < b < 6.50000000000000008e191Initial program 84.8%
Taylor expanded in b around 0 74.8%
Taylor expanded in x around 0 74.8%
+-commutative74.8%
times-frac79.7%
Simplified79.7%
Final simplification76.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8.5e-8) (not (<= b 45000.0))) (+ (/ z b) (/ x (+ (+ a (/ (* y b) t)) 1.0))) (+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.5e-8) || !(b <= 45000.0)) {
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0));
} else {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-8.5d-8)) .or. (.not. (b <= 45000.0d0))) then
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0d0))
else
tmp = ((y / t) * (z / (a + 1.0d0))) + (x / (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8.5e-8) || !(b <= 45000.0)) {
tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0));
} else {
tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8.5e-8) or not (b <= 45000.0): tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0)) else: tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8.5e-8) || !(b <= 45000.0)) tmp = Float64(Float64(z / b) + Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0))); else tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8.5e-8) || ~((b <= 45000.0))) tmp = (z / b) + (x / ((a + ((y * b) / t)) + 1.0)); else tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8.5e-8], N[Not[LessEqual[b, 45000.0]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-8} \lor \neg \left(b \leq 45000\right):\\
\;\;\;\;\frac{z}{b} + \frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\
\end{array}
\end{array}
if b < -8.49999999999999935e-8 or 45000 < b Initial program 62.9%
Taylor expanded in x around 0 61.7%
Taylor expanded in y around inf 83.3%
if -8.49999999999999935e-8 < b < 45000Initial program 86.8%
Taylor expanded in b around 0 77.9%
Taylor expanded in x around 0 79.2%
+-commutative79.2%
times-frac83.2%
Simplified83.2%
Final simplification83.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5e+69) (not (<= b 8.4e+191))) (+ (/ z b) (/ (* x t) (* y b))) (/ (+ x (* z (/ y t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5e+69) || !(b <= 8.4e+191)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5d+69)) .or. (.not. (b <= 8.4d+191))) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = (x + (z * (y / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5e+69) || !(b <= 8.4e+191)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5e+69) or not (b <= 8.4e+191): tmp = (z / b) + ((x * t) / (y * b)) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5e+69) || !(b <= 8.4e+191)) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5e+69) || ~((b <= 8.4e+191))) tmp = (z / b) + ((x * t) / (y * b)); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5e+69], N[Not[LessEqual[b, 8.4e+191]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+69} \lor \neg \left(b \leq 8.4 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if b < -5.00000000000000036e69 or 8.4000000000000003e191 < b Initial program 57.7%
Taylor expanded in b around inf 45.1%
Taylor expanded in t around 0 68.8%
if -5.00000000000000036e69 < b < 8.4000000000000003e191Initial program 84.8%
Taylor expanded in b around 0 74.8%
associate-/l*75.1%
associate-/r/77.1%
Applied egg-rr77.1%
Final simplification74.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -22000000000.0)
(/ x a)
(if (<= a -7.5e-303)
x
(if (<= a 1.75e-255)
(/ z b)
(if (<= a 5.5e-200) x (if (<= a 1.08e+71) (/ z b) (/ x a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -22000000000.0) {
tmp = x / a;
} else if (a <= -7.5e-303) {
tmp = x;
} else if (a <= 1.75e-255) {
tmp = z / b;
} else if (a <= 5.5e-200) {
tmp = x;
} else if (a <= 1.08e+71) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-22000000000.0d0)) then
tmp = x / a
else if (a <= (-7.5d-303)) then
tmp = x
else if (a <= 1.75d-255) then
tmp = z / b
else if (a <= 5.5d-200) then
tmp = x
else if (a <= 1.08d+71) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -22000000000.0) {
tmp = x / a;
} else if (a <= -7.5e-303) {
tmp = x;
} else if (a <= 1.75e-255) {
tmp = z / b;
} else if (a <= 5.5e-200) {
tmp = x;
} else if (a <= 1.08e+71) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -22000000000.0: tmp = x / a elif a <= -7.5e-303: tmp = x elif a <= 1.75e-255: tmp = z / b elif a <= 5.5e-200: tmp = x elif a <= 1.08e+71: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -22000000000.0) tmp = Float64(x / a); elseif (a <= -7.5e-303) tmp = x; elseif (a <= 1.75e-255) tmp = Float64(z / b); elseif (a <= 5.5e-200) tmp = x; elseif (a <= 1.08e+71) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -22000000000.0) tmp = x / a; elseif (a <= -7.5e-303) tmp = x; elseif (a <= 1.75e-255) tmp = z / b; elseif (a <= 5.5e-200) tmp = x; elseif (a <= 1.08e+71) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -22000000000.0], N[(x / a), $MachinePrecision], If[LessEqual[a, -7.5e-303], x, If[LessEqual[a, 1.75e-255], N[(z / b), $MachinePrecision], If[LessEqual[a, 5.5e-200], x, If[LessEqual[a, 1.08e+71], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -22000000000:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-303}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-255}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-200}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.08 \cdot 10^{+71}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -2.2e10 or 1.08e71 < a Initial program 77.8%
Taylor expanded in y around 0 50.9%
Taylor expanded in a around inf 50.9%
if -2.2e10 < a < -7.49999999999999972e-303 or 1.74999999999999989e-255 < a < 5.4999999999999996e-200Initial program 86.3%
Taylor expanded in y around 0 51.4%
Taylor expanded in a around 0 51.4%
if -7.49999999999999972e-303 < a < 1.74999999999999989e-255 or 5.4999999999999996e-200 < a < 1.08e71Initial program 64.8%
Taylor expanded in y around inf 56.5%
Final simplification52.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.36e-80) (not (<= t 1.45e-88))) (/ 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.36e-80) || !(t <= 1.45e-88)) {
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.36d-80)) .or. (.not. (t <= 1.45d-88))) 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.36e-80) || !(t <= 1.45e-88)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.36e-80) or not (t <= 1.45e-88): 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.36e-80) || !(t <= 1.45e-88)) 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.36e-80) || ~((t <= 1.45e-88))) 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.36e-80], N[Not[LessEqual[t, 1.45e-88]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.36 \cdot 10^{-80} \lor \neg \left(t \leq 1.45 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.3599999999999999e-80 or 1.4500000000000001e-88 < t Initial program 83.5%
Taylor expanded in y around 0 57.4%
if -1.3599999999999999e-80 < t < 1.4500000000000001e-88Initial program 64.9%
Taylor expanded in y around inf 53.6%
Final simplification55.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -22000000000.0) (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 <= -22000000000.0) || !(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 <= (-22000000000.0d0)) .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 <= -22000000000.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -22000000000.0) 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 <= -22000000000.0) || !(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 <= -22000000000.0) || ~((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, -22000000000.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -22000000000 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.2e10 or 1 < a Initial program 74.8%
Taylor expanded in y around 0 46.8%
Taylor expanded in a around inf 46.3%
if -2.2e10 < a < 1Initial program 78.4%
Taylor expanded in y around 0 40.3%
Taylor expanded in a around 0 39.8%
Final simplification43.3%
(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.4%
Taylor expanded in y around 0 43.8%
Taylor expanded in a around 0 20.3%
Final simplification20.3%
(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 2024019
(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))))