
(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 18 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 (+ t_1 (+ a 1.0)))
(t_3 (/ (+ x (/ (* y z) t)) t_2)))
(if (<= t_3 -5e-319)
(/ (+ x (* z (/ y t))) t_2)
(if (<= t_3 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_3 1e+307)
t_3
(if (<= t_3 INFINITY)
(*
z
(+
(/ x (* z (+ 1.0 (+ a t_1))))
(/ y (+ (* 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 = (y * b) / t;
double t_2 = t_1 + (a + 1.0);
double t_3 = (x + ((y * z) / t)) / t_2;
double tmp;
if (t_3 <= -5e-319) {
tmp = (x + (z * (y / t))) / t_2;
} else if (t_3 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_3 <= 1e+307) {
tmp = t_3;
} else if (t_3 <= ((double) INFINITY)) {
tmp = z * ((x / (z * (1.0 + (a + t_1)))) + (y / ((y * b) + (t * (a + 1.0)))));
} 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 = t_1 + (a + 1.0);
double t_3 = (x + ((y * z) / t)) / t_2;
double tmp;
if (t_3 <= -5e-319) {
tmp = (x + (z * (y / t))) / t_2;
} else if (t_3 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_3 <= 1e+307) {
tmp = t_3;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * (1.0 + (a + t_1)))) + (y / ((y * b) + (t * (a + 1.0)))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = t_1 + (a + 1.0) t_3 = (x + ((y * z) / t)) / t_2 tmp = 0 if t_3 <= -5e-319: tmp = (x + (z * (y / t))) / t_2 elif t_3 <= 0.0: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t_3 <= 1e+307: tmp = t_3 elif t_3 <= math.inf: tmp = z * ((x / (z * (1.0 + (a + t_1)))) + (y / ((y * b) + (t * (a + 1.0))))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(t_1 + Float64(a + 1.0)) t_3 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_2) tmp = 0.0 if (t_3 <= -5e-319) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_2); elseif (t_3 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_3 <= 1e+307) tmp = t_3; elseif (t_3 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * Float64(1.0 + Float64(a + t_1)))) + Float64(y / Float64(Float64(y * b) + Float64(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 = (y * b) / t; t_2 = t_1 + (a + 1.0); t_3 = (x + ((y * z) / t)) / t_2; tmp = 0.0; if (t_3 <= -5e-319) tmp = (x + (z * (y / t))) / t_2; elseif (t_3 <= 0.0) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t_3 <= 1e+307) tmp = t_3; elseif (t_3 <= Inf) tmp = z * ((x / (z * (1.0 + (a + t_1)))) + (y / ((y * b) + (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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-319], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$3, 1e+307], t$95$3, If[LessEqual[t$95$3, Infinity], N[(z * N[(N[(x / N[(z * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := t\_1 + \left(a + 1\right)\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{t\_2}\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-319}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_2}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_3 \leq 10^{+307}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot \left(1 + \left(a + t\_1\right)\right)} + \frac{y}{y \cdot b + t \cdot \left(a + 1\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.9999937e-319Initial program 90.8%
*-commutative90.8%
associate-/l*92.8%
Applied egg-rr92.8%
if -4.9999937e-319 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 45.6%
associate-/l*45.5%
associate-/l*56.9%
Simplified56.9%
Taylor expanded in b around inf 49.5%
times-frac63.0%
+-commutative63.0%
associate-*r/63.0%
fma-undefine63.0%
Simplified63.0%
Taylor expanded in x around inf 45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in y around 0 73.1%
associate-/l*79.0%
associate-/l*79.2%
Simplified79.2%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999986e306Initial program 98.7%
if 9.99999999999999986e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 29.5%
associate-/l*53.1%
associate-/l*53.1%
Simplified53.1%
Taylor expanded in z around inf 99.6%
Taylor expanded in t around 0 99.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.0%
associate-/l*0.3%
Simplified0.3%
Taylor expanded in y around inf 94.5%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 -5e-319)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_2 0.0)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t_2 1e+307)
t_2
(if (<= t_2 INFINITY)
(* y (/ z (* t (+ 1.0 (+ a (* y (/ b t)))))))
(/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -5e-319) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_2 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_2 <= 1e+307) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = y * (z / (t * (1.0 + (a + (y * (b / t))))));
} 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) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -5e-319) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_2 <= 0.0) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t_2 <= 1e+307) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = y * (z / (t * (1.0 + (a + (y * (b / t))))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -5e-319: tmp = (x + (z * (y / t))) / t_1 elif t_2 <= 0.0: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t_2 <= 1e+307: tmp = t_2 elif t_2 <= math.inf: tmp = y * (z / (t * (1.0 + (a + (y * (b / t)))))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= -5e-319) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t_2 <= 1e+307) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(y * Float64(z / Float64(t * Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -5e-319) tmp = (x + (z * (y / t))) / t_1; elseif (t_2 <= 0.0) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t_2 <= 1e+307) tmp = t_2; elseif (t_2 <= Inf) tmp = y * (z / (t * (1.0 + (a + (y * (b / t)))))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-319], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$2, 1e+307], t$95$2, If[LessEqual[t$95$2, Infinity], N[(y * N[(z / N[(t * N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-319}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(1 + \left(a + y \cdot \frac{b}{t}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.9999937e-319Initial program 90.8%
*-commutative90.8%
associate-/l*92.8%
Applied egg-rr92.8%
if -4.9999937e-319 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 45.6%
associate-/l*45.5%
associate-/l*56.9%
Simplified56.9%
Taylor expanded in b around inf 49.5%
times-frac63.0%
+-commutative63.0%
associate-*r/63.0%
fma-undefine63.0%
Simplified63.0%
Taylor expanded in x around inf 45.5%
*-commutative45.5%
Simplified45.5%
Taylor expanded in y around 0 73.1%
associate-/l*79.0%
associate-/l*79.2%
Simplified79.2%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999986e306Initial program 98.7%
if 9.99999999999999986e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 29.5%
*-commutative29.5%
associate-/l*14.7%
Applied egg-rr14.7%
Taylor expanded in x around 0 41.5%
associate-/l*99.8%
*-commutative99.8%
associate-/l*99.5%
Simplified99.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.0%
associate-/l*0.3%
Simplified0.3%
Taylor expanded in y around inf 94.5%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (/ (* y b) t))))) (t_2 (+ x (/ (* y z) t))))
(if (<= t -1.22e+97)
t_1
(if (<= t -2.8e-58)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= t -6.5e-140)
t_1
(if (<= t 6.2e-82)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 3.2e+29) (/ t_2 a) (if (<= t 1.8e+43) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + ((y * b) / t)));
double t_2 = x + ((y * z) / t);
double tmp;
if (t <= -1.22e+97) {
tmp = t_1;
} else if (t <= -2.8e-58) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -6.5e-140) {
tmp = t_1;
} else if (t <= 6.2e-82) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 3.2e+29) {
tmp = t_2 / a;
} else if (t <= 1.8e+43) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / (1.0d0 + (a + ((y * b) / t)))
t_2 = x + ((y * z) / t)
if (t <= (-1.22d+97)) then
tmp = t_1
else if (t <= (-2.8d-58)) then
tmp = (t / b) * ((z / t) + (x / y))
else if (t <= (-6.5d-140)) then
tmp = t_1
else if (t <= 6.2d-82) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 3.2d+29) then
tmp = t_2 / a
else if (t <= 1.8d+43) 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 / (1.0 + (a + ((y * b) / t)));
double t_2 = x + ((y * z) / t);
double tmp;
if (t <= -1.22e+97) {
tmp = t_1;
} else if (t <= -2.8e-58) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -6.5e-140) {
tmp = t_1;
} else if (t <= 6.2e-82) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 3.2e+29) {
tmp = t_2 / a;
} else if (t <= 1.8e+43) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + ((y * b) / t))) t_2 = x + ((y * z) / t) tmp = 0 if t <= -1.22e+97: tmp = t_1 elif t <= -2.8e-58: tmp = (t / b) * ((z / t) + (x / y)) elif t <= -6.5e-140: tmp = t_1 elif t <= 6.2e-82: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 3.2e+29: tmp = t_2 / a elif t <= 1.8e+43: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))) t_2 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (t <= -1.22e+97) tmp = t_1; elseif (t <= -2.8e-58) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (t <= -6.5e-140) tmp = t_1; elseif (t <= 6.2e-82) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 3.2e+29) tmp = Float64(t_2 / a); elseif (t <= 1.8e+43) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + (a + ((y * b) / t))); t_2 = x + ((y * z) / t); tmp = 0.0; if (t <= -1.22e+97) tmp = t_1; elseif (t <= -2.8e-58) tmp = (t / b) * ((z / t) + (x / y)); elseif (t <= -6.5e-140) tmp = t_1; elseif (t <= 6.2e-82) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 3.2e+29) tmp = t_2 / a; elseif (t <= 1.8e+43) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.22e+97], t$95$1, If[LessEqual[t, -2.8e-58], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-140], t$95$1, If[LessEqual[t, 6.2e-82], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+29], N[(t$95$2 / a), $MachinePrecision], If[LessEqual[t, 1.8e+43], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
t_2 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-58}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-82}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+29}:\\
\;\;\;\;\frac{t\_2}{a}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.21999999999999997e97 or -2.8000000000000001e-58 < t < -6.4999999999999995e-140 or 1.80000000000000005e43 < t Initial program 85.0%
associate-/l*89.3%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in x around inf 65.8%
if -1.21999999999999997e97 < t < -2.8000000000000001e-58Initial program 77.1%
associate-/l*82.1%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in b around inf 37.3%
times-frac47.1%
+-commutative47.1%
associate-*r/49.6%
fma-undefine49.6%
Simplified49.6%
Taylor expanded in y around inf 52.2%
if -6.4999999999999995e-140 < t < 6.19999999999999999e-82Initial program 57.0%
associate-/l*47.2%
associate-/l*41.1%
Simplified41.1%
Taylor expanded in b around inf 49.2%
times-frac37.9%
+-commutative37.9%
associate-*r/37.9%
fma-undefine37.9%
Simplified37.9%
Taylor expanded in t around 0 73.6%
if 6.19999999999999999e-82 < t < 3.19999999999999987e29Initial program 91.6%
associate-/l*87.4%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in a around inf 64.1%
if 3.19999999999999987e29 < t < 1.80000000000000005e43Initial program 99.8%
associate-/l*99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in b around 0 83.9%
Taylor expanded in a around 0 83.9%
Final simplification66.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (* b (/ y t))))) (t_2 (+ x (/ (* y z) t))))
(if (<= t -1.22e+97)
t_1
(if (<= t -5e-58)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= t -6.5e-140)
t_1
(if (<= t 1.56e-80)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 2.8e+29) (/ t_2 a) (if (<= t 1.85e+43) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (b * (y / t)));
double t_2 = x + ((y * z) / t);
double tmp;
if (t <= -1.22e+97) {
tmp = t_1;
} else if (t <= -5e-58) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -6.5e-140) {
tmp = t_1;
} else if (t <= 1.56e-80) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 2.8e+29) {
tmp = t_2 / a;
} else if (t <= 1.85e+43) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / ((a + 1.0d0) + (b * (y / t)))
t_2 = x + ((y * z) / t)
if (t <= (-1.22d+97)) then
tmp = t_1
else if (t <= (-5d-58)) then
tmp = (t / b) * ((z / t) + (x / y))
else if (t <= (-6.5d-140)) then
tmp = t_1
else if (t <= 1.56d-80) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 2.8d+29) then
tmp = t_2 / a
else if (t <= 1.85d+43) 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 + 1.0) + (b * (y / t)));
double t_2 = x + ((y * z) / t);
double tmp;
if (t <= -1.22e+97) {
tmp = t_1;
} else if (t <= -5e-58) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -6.5e-140) {
tmp = t_1;
} else if (t <= 1.56e-80) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 2.8e+29) {
tmp = t_2 / a;
} else if (t <= 1.85e+43) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + (b * (y / t))) t_2 = x + ((y * z) / t) tmp = 0 if t <= -1.22e+97: tmp = t_1 elif t <= -5e-58: tmp = (t / b) * ((z / t) + (x / y)) elif t <= -6.5e-140: tmp = t_1 elif t <= 1.56e-80: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 2.8e+29: tmp = t_2 / a elif t <= 1.85e+43: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))) t_2 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (t <= -1.22e+97) tmp = t_1; elseif (t <= -5e-58) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (t <= -6.5e-140) tmp = t_1; elseif (t <= 1.56e-80) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 2.8e+29) tmp = Float64(t_2 / a); elseif (t <= 1.85e+43) 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 + 1.0) + (b * (y / t))); t_2 = x + ((y * z) / t); tmp = 0.0; if (t <= -1.22e+97) tmp = t_1; elseif (t <= -5e-58) tmp = (t / b) * ((z / t) + (x / y)); elseif (t <= -6.5e-140) tmp = t_1; elseif (t <= 1.56e-80) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 2.8e+29) tmp = t_2 / a; elseif (t <= 1.85e+43) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.22e+97], t$95$1, If[LessEqual[t, -5e-58], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-140], t$95$1, If[LessEqual[t, 1.56e-80], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+29], N[(t$95$2 / a), $MachinePrecision], If[LessEqual[t, 1.85e+43], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
t_2 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-58}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{-80}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+29}:\\
\;\;\;\;\frac{t\_2}{a}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.21999999999999997e97 or -4.99999999999999977e-58 < t < -6.4999999999999995e-140 or 1.85e43 < t Initial program 85.0%
*-commutative85.0%
associate-/l*89.4%
Applied egg-rr89.4%
Taylor expanded in x around inf 70.2%
if -1.21999999999999997e97 < t < -4.99999999999999977e-58Initial program 77.1%
associate-/l*82.1%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in b around inf 37.3%
times-frac47.1%
+-commutative47.1%
associate-*r/49.6%
fma-undefine49.6%
Simplified49.6%
Taylor expanded in y around inf 52.2%
if -6.4999999999999995e-140 < t < 1.55999999999999994e-80Initial program 57.0%
associate-/l*47.2%
associate-/l*41.1%
Simplified41.1%
Taylor expanded in b around inf 49.2%
times-frac37.9%
+-commutative37.9%
associate-*r/37.9%
fma-undefine37.9%
Simplified37.9%
Taylor expanded in t around 0 73.6%
if 1.55999999999999994e-80 < t < 2.8e29Initial program 91.6%
associate-/l*87.4%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in a around inf 64.1%
if 2.8e29 < t < 1.85e43Initial program 99.8%
associate-/l*99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in b around 0 83.9%
Taylor expanded in a around 0 83.9%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (* b (/ y t))))) (t_2 (+ x (/ (* y z) t))))
(if (<= t -2.2e+97)
t_1
(if (<= t -2.35e-58)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= t -6e-140)
t_1
(if (<= t 5.5e-81)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 1.36e+29)
(/ t_2 a)
(if (<= t 1.8e+43) t_2 (/ x (+ (+ a 1.0) (* y (/ b t))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (b * (y / t)));
double t_2 = x + ((y * z) / t);
double tmp;
if (t <= -2.2e+97) {
tmp = t_1;
} else if (t <= -2.35e-58) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -6e-140) {
tmp = t_1;
} else if (t <= 5.5e-81) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 1.36e+29) {
tmp = t_2 / a;
} else if (t <= 1.8e+43) {
tmp = t_2;
} else {
tmp = x / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x / ((a + 1.0d0) + (b * (y / t)))
t_2 = x + ((y * z) / t)
if (t <= (-2.2d+97)) then
tmp = t_1
else if (t <= (-2.35d-58)) then
tmp = (t / b) * ((z / t) + (x / y))
else if (t <= (-6d-140)) then
tmp = t_1
else if (t <= 5.5d-81) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 1.36d+29) then
tmp = t_2 / a
else if (t <= 1.8d+43) then
tmp = t_2
else
tmp = x / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (b * (y / t)));
double t_2 = x + ((y * z) / t);
double tmp;
if (t <= -2.2e+97) {
tmp = t_1;
} else if (t <= -2.35e-58) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -6e-140) {
tmp = t_1;
} else if (t <= 5.5e-81) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 1.36e+29) {
tmp = t_2 / a;
} else if (t <= 1.8e+43) {
tmp = t_2;
} else {
tmp = x / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + (b * (y / t))) t_2 = x + ((y * z) / t) tmp = 0 if t <= -2.2e+97: tmp = t_1 elif t <= -2.35e-58: tmp = (t / b) * ((z / t) + (x / y)) elif t <= -6e-140: tmp = t_1 elif t <= 5.5e-81: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 1.36e+29: tmp = t_2 / a elif t <= 1.8e+43: tmp = t_2 else: tmp = x / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))) t_2 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (t <= -2.2e+97) tmp = t_1; elseif (t <= -2.35e-58) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (t <= -6e-140) tmp = t_1; elseif (t <= 5.5e-81) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 1.36e+29) tmp = Float64(t_2 / a); elseif (t <= 1.8e+43) tmp = t_2; else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((a + 1.0) + (b * (y / t))); t_2 = x + ((y * z) / t); tmp = 0.0; if (t <= -2.2e+97) tmp = t_1; elseif (t <= -2.35e-58) tmp = (t / b) * ((z / t) + (x / y)); elseif (t <= -6e-140) tmp = t_1; elseif (t <= 5.5e-81) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 1.36e+29) tmp = t_2 / a; elseif (t <= 1.8e+43) tmp = t_2; else tmp = x / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+97], t$95$1, If[LessEqual[t, -2.35e-58], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-140], t$95$1, If[LessEqual[t, 5.5e-81], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e+29], N[(t$95$2 / a), $MachinePrecision], If[LessEqual[t, 1.8e+43], t$95$2, N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
t_2 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.35 \cdot 10^{-58}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-81}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+29}:\\
\;\;\;\;\frac{t\_2}{a}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+43}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -2.2000000000000001e97 or -2.34999999999999997e-58 < t < -6.00000000000000037e-140Initial program 81.3%
*-commutative81.3%
associate-/l*88.1%
Applied egg-rr88.1%
Taylor expanded in x around inf 72.5%
if -2.2000000000000001e97 < t < -2.34999999999999997e-58Initial program 77.1%
associate-/l*82.1%
associate-/l*84.7%
Simplified84.7%
Taylor expanded in b around inf 37.3%
times-frac47.1%
+-commutative47.1%
associate-*r/49.6%
fma-undefine49.6%
Simplified49.6%
Taylor expanded in y around inf 52.2%
if -6.00000000000000037e-140 < t < 5.50000000000000026e-81Initial program 57.0%
associate-/l*47.2%
associate-/l*41.1%
Simplified41.1%
Taylor expanded in b around inf 49.2%
times-frac37.9%
+-commutative37.9%
associate-*r/37.9%
fma-undefine37.9%
Simplified37.9%
Taylor expanded in t around 0 73.6%
if 5.50000000000000026e-81 < t < 1.36e29Initial program 91.6%
associate-/l*87.4%
associate-/l*87.3%
Simplified87.3%
Taylor expanded in a around inf 64.1%
if 1.36e29 < t < 1.80000000000000005e43Initial program 99.8%
associate-/l*99.3%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in b around 0 83.9%
Taylor expanded in a around 0 83.9%
if 1.80000000000000005e43 < t Initial program 88.9%
associate-/l*95.9%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in x around inf 67.7%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ x (+ a 1.0))))
(if (<= t -1.22e+97)
t_2
(if (<= t -1.6e-20)
(/ z b)
(if (<= t -3e-78)
t_1
(if (<= t -8.8e-118)
(* t (/ (/ x b) y))
(if (<= t -5.8e-140) t_1 (if (<= t 4.5e-88) (/ z b) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -1.22e+97) {
tmp = t_2;
} else if (t <= -1.6e-20) {
tmp = z / b;
} else if (t <= -3e-78) {
tmp = t_1;
} else if (t <= -8.8e-118) {
tmp = t * ((x / b) / y);
} else if (t <= -5.8e-140) {
tmp = t_1;
} else if (t <= 4.5e-88) {
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 * z) / t)
t_2 = x / (a + 1.0d0)
if (t <= (-1.22d+97)) then
tmp = t_2
else if (t <= (-1.6d-20)) then
tmp = z / b
else if (t <= (-3d-78)) then
tmp = t_1
else if (t <= (-8.8d-118)) then
tmp = t * ((x / b) / y)
else if (t <= (-5.8d-140)) then
tmp = t_1
else if (t <= 4.5d-88) 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 * z) / t);
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -1.22e+97) {
tmp = t_2;
} else if (t <= -1.6e-20) {
tmp = z / b;
} else if (t <= -3e-78) {
tmp = t_1;
} else if (t <= -8.8e-118) {
tmp = t * ((x / b) / y);
} else if (t <= -5.8e-140) {
tmp = t_1;
} else if (t <= 4.5e-88) {
tmp = z / b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = x / (a + 1.0) tmp = 0 if t <= -1.22e+97: tmp = t_2 elif t <= -1.6e-20: tmp = z / b elif t <= -3e-78: tmp = t_1 elif t <= -8.8e-118: tmp = t * ((x / b) / y) elif t <= -5.8e-140: tmp = t_1 elif t <= 4.5e-88: tmp = z / b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.22e+97) tmp = t_2; elseif (t <= -1.6e-20) tmp = Float64(z / b); elseif (t <= -3e-78) tmp = t_1; elseif (t <= -8.8e-118) tmp = Float64(t * Float64(Float64(x / b) / y)); elseif (t <= -5.8e-140) tmp = t_1; elseif (t <= 4.5e-88) 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 * z) / t); t_2 = x / (a + 1.0); tmp = 0.0; if (t <= -1.22e+97) tmp = t_2; elseif (t <= -1.6e-20) tmp = z / b; elseif (t <= -3e-78) tmp = t_1; elseif (t <= -8.8e-118) tmp = t * ((x / b) / y); elseif (t <= -5.8e-140) tmp = t_1; elseif (t <= 4.5e-88) 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[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.22e+97], t$95$2, If[LessEqual[t, -1.6e-20], N[(z / b), $MachinePrecision], If[LessEqual[t, -3e-78], t$95$1, If[LessEqual[t, -8.8e-118], N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e-140], t$95$1, If[LessEqual[t, 4.5e-88], N[(z / b), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-20}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-88}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.21999999999999997e97 or 4.49999999999999991e-88 < t Initial program 88.7%
associate-/l*92.6%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in y around 0 61.7%
if -1.21999999999999997e97 < t < -1.59999999999999985e-20 or -5.79999999999999995e-140 < t < 4.49999999999999991e-88Initial program 59.6%
associate-/l*54.0%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in y around inf 55.8%
if -1.59999999999999985e-20 < t < -2.99999999999999988e-78 or -8.79999999999999934e-118 < t < -5.79999999999999995e-140Initial program 91.8%
associate-/l*87.6%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in b around 0 71.3%
Taylor expanded in a around 0 50.4%
if -2.99999999999999988e-78 < t < -8.79999999999999934e-118Initial program 57.6%
associate-/l*57.6%
associate-/l*36.5%
Simplified36.5%
Taylor expanded in b around inf 57.0%
times-frac61.6%
+-commutative61.6%
associate-*r/61.8%
fma-undefine61.8%
Simplified61.8%
Taylor expanded in x around inf 46.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in x around inf 39.7%
associate-/l*39.7%
associate-/r*63.5%
Simplified63.5%
Final simplification58.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -1.4e-46)
t_1
(if (<= t -1.75e-168)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (* b (/ y t))))
(if (<= t 1.85e-89) (+ (/ 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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.4e-46) {
tmp = t_1;
} else if (t <= -1.75e-168) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else if (t <= 1.85e-89) {
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 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-1.4d-46)) then
tmp = t_1
else if (t <= (-1.75d-168)) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (b * (y / t)))
else if (t <= 1.85d-89) 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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.4e-46) {
tmp = t_1;
} else if (t <= -1.75e-168) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else if (t <= 1.85e-89) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -1.4e-46: tmp = t_1 elif t <= -1.75e-168: tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))) elif t <= 1.85e-89: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1.4e-46) tmp = t_1; elseif (t <= -1.75e-168) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t <= 1.85e-89) 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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -1.4e-46) tmp = t_1; elseif (t <= -1.75e-168) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))); elseif (t <= 1.85e-89) 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[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-46], t$95$1, If[LessEqual[t, -1.75e-168], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e-89], 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{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-168}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-89}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.3999999999999999e-46 or 1.8499999999999999e-89 < t Initial program 85.5%
associate-/l*89.8%
associate-/l*93.5%
Simplified93.5%
if -1.3999999999999999e-46 < t < -1.74999999999999991e-168Initial program 78.5%
*-commutative78.5%
associate-/l*78.6%
Applied egg-rr78.6%
if -1.74999999999999991e-168 < t < 1.8499999999999999e-89Initial program 55.5%
associate-/l*46.1%
associate-/l*39.4%
Simplified39.4%
Taylor expanded in b around inf 51.1%
times-frac37.8%
+-commutative37.8%
associate-*r/37.8%
fma-undefine37.8%
Simplified37.8%
Taylor expanded in t around 0 75.3%
Final simplification86.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ a 1.0))))
(if (<= t -1.2e+55)
t_1
(if (<= t -8.5e-17)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (or (<= t -5.9e-140) (not (<= t 4.2e-88)))
t_1
(+ (/ z b) (/ (* x t) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (t <= -1.2e+55) {
tmp = t_1;
} else if (t <= -8.5e-17) {
tmp = (t / b) * ((z / t) + (x / y));
} else if ((t <= -5.9e-140) || !(t <= 4.2e-88)) {
tmp = t_1;
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (z * (y / t))) / (a + 1.0d0)
if (t <= (-1.2d+55)) then
tmp = t_1
else if (t <= (-8.5d-17)) then
tmp = (t / b) * ((z / t) + (x / y))
else if ((t <= (-5.9d-140)) .or. (.not. (t <= 4.2d-88))) then
tmp = t_1
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (t <= -1.2e+55) {
tmp = t_1;
} else if (t <= -8.5e-17) {
tmp = (t / b) * ((z / t) + (x / y));
} else if ((t <= -5.9e-140) || !(t <= 4.2e-88)) {
tmp = t_1;
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / (a + 1.0) tmp = 0 if t <= -1.2e+55: tmp = t_1 elif t <= -8.5e-17: tmp = (t / b) * ((z / t) + (x / y)) elif (t <= -5.9e-140) or not (t <= 4.2e-88): tmp = t_1 else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.2e+55) tmp = t_1; elseif (t <= -8.5e-17) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif ((t <= -5.9e-140) || !(t <= 4.2e-88)) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / (a + 1.0); tmp = 0.0; if (t <= -1.2e+55) tmp = t_1; elseif (t <= -8.5e-17) tmp = (t / b) * ((z / t) + (x / y)); elseif ((t <= -5.9e-140) || ~((t <= 4.2e-88))) tmp = t_1; else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e+55], t$95$1, If[LessEqual[t, -8.5e-17], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -5.9e-140], N[Not[LessEqual[t, 4.2e-88]], $MachinePrecision]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-17}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;t \leq -5.9 \cdot 10^{-140} \lor \neg \left(t \leq 4.2 \cdot 10^{-88}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.2e55 or -8.5e-17 < t < -5.9000000000000002e-140 or 4.1999999999999999e-88 < t Initial program 86.3%
associate-/l*89.8%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in b around 0 75.9%
*-commutative86.3%
associate-/l*88.1%
Applied egg-rr77.1%
if -1.2e55 < t < -8.5e-17Initial program 68.3%
associate-/l*68.4%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in b around inf 48.7%
times-frac67.4%
+-commutative67.4%
associate-*r/67.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in y around inf 73.9%
if -5.9000000000000002e-140 < t < 4.1999999999999999e-88Initial program 56.4%
associate-/l*46.5%
associate-/l*40.4%
Simplified40.4%
Taylor expanded in b around inf 49.7%
times-frac38.2%
+-commutative38.2%
associate-*r/38.2%
fma-undefine38.2%
Simplified38.2%
Taylor expanded in t around 0 74.4%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ a 1.0))))
(if (<= t -5.2e+54)
t_1
(if (<= t -4e-17)
(* (/ t b) (+ (/ z t) (/ x y)))
(if (<= t -5e-140)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= t 1.1e-88) (+ (/ 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 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (t <= -5.2e+54) {
tmp = t_1;
} else if (t <= -4e-17) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -5e-140) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (t <= 1.1e-88) {
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 = (x + (z * (y / t))) / (a + 1.0d0)
if (t <= (-5.2d+54)) then
tmp = t_1
else if (t <= (-4d-17)) then
tmp = (t / b) * ((z / t) + (x / y))
else if (t <= (-5d-140)) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (t <= 1.1d-88) 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 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (t <= -5.2e+54) {
tmp = t_1;
} else if (t <= -4e-17) {
tmp = (t / b) * ((z / t) + (x / y));
} else if (t <= -5e-140) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (t <= 1.1e-88) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / (a + 1.0) tmp = 0 if t <= -5.2e+54: tmp = t_1 elif t <= -4e-17: tmp = (t / b) * ((z / t) + (x / y)) elif t <= -5e-140: tmp = (x + ((y * z) / t)) / (a + 1.0) elif t <= 1.1e-88: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -5.2e+54) tmp = t_1; elseif (t <= -4e-17) tmp = Float64(Float64(t / b) * Float64(Float64(z / t) + Float64(x / y))); elseif (t <= -5e-140) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (t <= 1.1e-88) 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 = (x + (z * (y / t))) / (a + 1.0); tmp = 0.0; if (t <= -5.2e+54) tmp = t_1; elseif (t <= -4e-17) tmp = (t / b) * ((z / t) + (x / y)); elseif (t <= -5e-140) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (t <= 1.1e-88) 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[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+54], t$95$1, If[LessEqual[t, -4e-17], N[(N[(t / b), $MachinePrecision] * N[(N[(z / t), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5e-140], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-88], 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{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-17}:\\
\;\;\;\;\frac{t}{b} \cdot \left(\frac{z}{t} + \frac{x}{y}\right)\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-140}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-88}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.20000000000000013e54 or 1.10000000000000002e-88 < t Initial program 87.2%
associate-/l*92.3%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in b around 0 80.1%
*-commutative87.2%
associate-/l*90.3%
Applied egg-rr81.7%
if -5.20000000000000013e54 < t < -4.00000000000000029e-17Initial program 68.3%
associate-/l*68.4%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in b around inf 48.7%
times-frac67.4%
+-commutative67.4%
associate-*r/67.4%
fma-undefine67.4%
Simplified67.4%
Taylor expanded in y around inf 73.9%
if -4.00000000000000029e-17 < t < -5.00000000000000015e-140Initial program 83.0%
associate-/l*80.0%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in b around 0 60.0%
if -5.00000000000000015e-140 < t < 1.10000000000000002e-88Initial program 56.4%
associate-/l*46.5%
associate-/l*40.4%
Simplified40.4%
Taylor expanded in b around inf 49.7%
times-frac38.2%
+-commutative38.2%
associate-*r/38.2%
fma-undefine38.2%
Simplified38.2%
Taylor expanded in t around 0 74.4%
Final simplification76.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 a)))
(if (<= a -0.0135)
t_2
(if (<= a 1.2e-276)
t_1
(if (<= a 4.3e-213) (/ z b) (if (<= a 0.017) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / a;
double tmp;
if (a <= -0.0135) {
tmp = t_2;
} else if (a <= 1.2e-276) {
tmp = t_1;
} else if (a <= 4.3e-213) {
tmp = z / b;
} else if (a <= 0.017) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = t_1 / a
if (a <= (-0.0135d0)) then
tmp = t_2
else if (a <= 1.2d-276) then
tmp = t_1
else if (a <= 4.3d-213) then
tmp = z / b
else if (a <= 0.017d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / a;
double tmp;
if (a <= -0.0135) {
tmp = t_2;
} else if (a <= 1.2e-276) {
tmp = t_1;
} else if (a <= 4.3e-213) {
tmp = z / b;
} else if (a <= 0.017) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / a tmp = 0 if a <= -0.0135: tmp = t_2 elif a <= 1.2e-276: tmp = t_1 elif a <= 4.3e-213: tmp = z / b elif a <= 0.017: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / a) tmp = 0.0 if (a <= -0.0135) tmp = t_2; elseif (a <= 1.2e-276) tmp = t_1; elseif (a <= 4.3e-213) tmp = Float64(z / b); elseif (a <= 0.017) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / a; tmp = 0.0; if (a <= -0.0135) tmp = t_2; elseif (a <= 1.2e-276) tmp = t_1; elseif (a <= 4.3e-213) tmp = z / b; elseif (a <= 0.017) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / a), $MachinePrecision]}, If[LessEqual[a, -0.0135], t$95$2, If[LessEqual[a, 1.2e-276], t$95$1, If[LessEqual[a, 4.3e-213], N[(z / b), $MachinePrecision], If[LessEqual[a, 0.017], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{a}\\
\mathbf{if}\;a \leq -0.0135:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-213}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 0.017:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -0.0134999999999999998 or 0.017000000000000001 < a Initial program 74.0%
associate-/l*72.5%
associate-/l*72.5%
Simplified72.5%
Taylor expanded in a around inf 63.3%
if -0.0134999999999999998 < a < 1.19999999999999991e-276 or 4.3000000000000003e-213 < a < 0.017000000000000001Initial program 79.3%
associate-/l*79.1%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in b around 0 55.8%
Taylor expanded in a around 0 55.2%
if 1.19999999999999991e-276 < a < 4.3000000000000003e-213Initial program 69.7%
associate-/l*69.3%
associate-/l*63.7%
Simplified63.7%
Taylor expanded in y around inf 63.3%
Final simplification59.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.6e-141) (not (<= t 2.05e-89))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.6e-141) || !(t <= 2.05e-89)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8.6d-141)) .or. (.not. (t <= 2.05d-89))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.6e-141) || !(t <= 2.05e-89)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.6e-141) or not (t <= 2.05e-89): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.6e-141) || !(t <= 2.05e-89)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.6e-141) || ~((t <= 2.05e-89))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.6e-141], N[Not[LessEqual[t, 2.05e-89]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{-141} \lor \neg \left(t \leq 2.05 \cdot 10^{-89}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -8.59999999999999948e-141 or 2.0499999999999999e-89 < t Initial program 84.8%
associate-/l*88.0%
associate-/l*89.6%
Simplified89.6%
if -8.59999999999999948e-141 < t < 2.0499999999999999e-89Initial program 56.4%
associate-/l*46.5%
associate-/l*40.4%
Simplified40.4%
Taylor expanded in b around inf 49.7%
times-frac38.2%
+-commutative38.2%
associate-*r/38.2%
fma-undefine38.2%
Simplified38.2%
Taylor expanded in t around 0 74.4%
Final simplification84.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ a 1.0))))
(if (<= t -1.56e+53)
t_1
(if (<= t -3.8e-140)
(/ (+ x (/ (* y z) t)) (+ 1.0 (/ (* y b) t)))
(if (<= t 8.8e-89) (+ (/ 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 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (t <= -1.56e+53) {
tmp = t_1;
} else if (t <= -3.8e-140) {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
} else if (t <= 8.8e-89) {
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 = (x + (z * (y / t))) / (a + 1.0d0)
if (t <= (-1.56d+53)) then
tmp = t_1
else if (t <= (-3.8d-140)) then
tmp = (x + ((y * z) / t)) / (1.0d0 + ((y * b) / t))
else if (t <= 8.8d-89) 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 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (t <= -1.56e+53) {
tmp = t_1;
} else if (t <= -3.8e-140) {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
} else if (t <= 8.8e-89) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / (a + 1.0) tmp = 0 if t <= -1.56e+53: tmp = t_1 elif t <= -3.8e-140: tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)) elif t <= 8.8e-89: tmp = (z / b) + ((x * t) / (y * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.56e+53) tmp = t_1; elseif (t <= -3.8e-140) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 8.8e-89) 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 = (x + (z * (y / t))) / (a + 1.0); tmp = 0.0; if (t <= -1.56e+53) tmp = t_1; elseif (t <= -3.8e-140) tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)); elseif (t <= 8.8e-89) 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[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.56e+53], t$95$1, If[LessEqual[t, -3.8e-140], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e-89], 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{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{if}\;t \leq -1.56 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-140}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-89}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.56e53 or 8.80000000000000048e-89 < t Initial program 86.6%
associate-/l*91.6%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in b around 0 79.5%
*-commutative86.6%
associate-/l*89.6%
Applied egg-rr81.1%
if -1.56e53 < t < -3.79999999999999998e-140Initial program 80.1%
associate-/l*78.1%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in a around 0 63.9%
if -3.79999999999999998e-140 < t < 8.80000000000000048e-89Initial program 56.4%
associate-/l*46.5%
associate-/l*40.4%
Simplified40.4%
Taylor expanded in b around inf 49.7%
times-frac38.2%
+-commutative38.2%
associate-*r/38.2%
fma-undefine38.2%
Simplified38.2%
Taylor expanded in t around 0 74.4%
Final simplification75.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.22e+97)
(not
(or (<= t -1.6e-58) (and (not (<= t -6.5e-140)) (<= t 3.8e-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.22e+97) || !((t <= -1.6e-58) || (!(t <= -6.5e-140) && (t <= 3.8e-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.22d+97)) .or. (.not. (t <= (-1.6d-58)) .or. (.not. (t <= (-6.5d-140))) .and. (t <= 3.8d-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.22e+97) || !((t <= -1.6e-58) || (!(t <= -6.5e-140) && (t <= 3.8e-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.22e+97) or not ((t <= -1.6e-58) or (not (t <= -6.5e-140) and (t <= 3.8e-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.22e+97) || !((t <= -1.6e-58) || (!(t <= -6.5e-140) && (t <= 3.8e-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.22e+97) || ~(((t <= -1.6e-58) || (~((t <= -6.5e-140)) && (t <= 3.8e-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.22e+97], N[Not[Or[LessEqual[t, -1.6e-58], And[N[Not[LessEqual[t, -6.5e-140]], $MachinePrecision], LessEqual[t, 3.8e-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.22 \cdot 10^{+97} \lor \neg \left(t \leq -1.6 \cdot 10^{-58} \lor \neg \left(t \leq -6.5 \cdot 10^{-140}\right) \land t \leq 3.8 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.21999999999999997e97 or -1.6e-58 < t < -6.4999999999999995e-140 or 3.80000000000000011e-88 < t Initial program 86.9%
associate-/l*89.5%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 58.9%
if -1.21999999999999997e97 < t < -1.6e-58 or -6.4999999999999995e-140 < t < 3.80000000000000011e-88Initial program 63.2%
associate-/l*58.2%
associate-/l*54.9%
Simplified54.9%
Taylor expanded in y around inf 53.2%
Final simplification56.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.22e+97)
t_1
(if (<= t 1.25e-80)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 1.65e+30) (/ (+ x (/ (* y z) t)) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.22e+97) {
tmp = t_1;
} else if (t <= 1.25e-80) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 1.65e+30) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.22d+97)) then
tmp = t_1
else if (t <= 1.25d-80) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 1.65d+30) then
tmp = (x + ((y * z) / t)) / a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.22e+97) {
tmp = t_1;
} else if (t <= 1.25e-80) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 1.65e+30) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.22e+97: tmp = t_1 elif t <= 1.25e-80: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 1.65e+30: tmp = (x + ((y * z) / t)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.22e+97) tmp = t_1; elseif (t <= 1.25e-80) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 1.65e+30) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.22e+97) tmp = t_1; elseif (t <= 1.25e-80) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 1.65e+30) tmp = (x + ((y * z) / t)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.22e+97], t$95$1, If[LessEqual[t, 1.25e-80], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+30], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-80}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.21999999999999997e97 or 1.65000000000000013e30 < t Initial program 87.8%
associate-/l*93.7%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in y around 0 66.5%
if -1.21999999999999997e97 < t < 1.25e-80Initial program 65.4%
associate-/l*60.4%
associate-/l*55.6%
Simplified55.6%
Taylor expanded in b around inf 42.8%
times-frac39.3%
+-commutative39.3%
associate-*r/40.0%
fma-undefine40.0%
Simplified40.0%
Taylor expanded in t around 0 60.4%
if 1.25e-80 < t < 1.65000000000000013e30Initial program 92.0%
associate-/l*87.9%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in a around inf 61.5%
Final simplification62.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.8e-83)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= b 2850000000000.0)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(/ (+ (* t (/ x b)) (* y (/ z b))) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.8e-83) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (b <= 2850000000000.0) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-4.8d-83)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (b <= 2850000000000.0d0) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = ((t * (x / b)) + (y * (z / b))) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.8e-83) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (b <= 2850000000000.0) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.8e-83: tmp = (z / b) + ((x * t) / (y * b)) elif b <= 2850000000000.0: tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = ((t * (x / b)) + (y * (z / b))) / y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.8e-83) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (b <= 2850000000000.0) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.8e-83) tmp = (z / b) + ((x * t) / (y * b)); elseif (b <= 2850000000000.0) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = ((t * (x / b)) + (y * (z / b))) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.8e-83], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2850000000000.0], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;b \leq 2850000000000:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\end{array}
\end{array}
if b < -4.8000000000000002e-83Initial program 63.4%
associate-/l*64.5%
associate-/l*65.7%
Simplified65.7%
Taylor expanded in b around inf 38.0%
times-frac36.6%
+-commutative36.6%
associate-*r/39.0%
fma-undefine39.0%
Simplified39.0%
Taylor expanded in t around 0 60.3%
if -4.8000000000000002e-83 < b < 2.85e12Initial program 89.8%
associate-/l*87.4%
associate-/l*87.4%
Simplified87.4%
Taylor expanded in b around 0 79.9%
*-commutative89.8%
associate-/l*88.1%
Applied egg-rr81.1%
if 2.85e12 < b Initial program 62.2%
associate-/l*62.2%
associate-/l*56.4%
Simplified56.4%
Taylor expanded in b around inf 43.9%
times-frac38.7%
+-commutative38.7%
associate-*r/38.7%
fma-undefine38.7%
Simplified38.7%
Taylor expanded in x around inf 48.4%
*-commutative48.4%
Simplified48.4%
Taylor expanded in y around 0 59.2%
associate-/l*61.3%
associate-/l*67.4%
Simplified67.4%
Final simplification71.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.22e+97) (/ x a) (if (<= t 1.05e-59) (/ z b) (if (<= t 2.8e+139) (/ x a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.22e+97) {
tmp = x / a;
} else if (t <= 1.05e-59) {
tmp = z / b;
} else if (t <= 2.8e+139) {
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 <= (-1.22d+97)) then
tmp = x / a
else if (t <= 1.05d-59) then
tmp = z / b
else if (t <= 2.8d+139) 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 <= -1.22e+97) {
tmp = x / a;
} else if (t <= 1.05e-59) {
tmp = z / b;
} else if (t <= 2.8e+139) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.22e+97: tmp = x / a elif t <= 1.05e-59: tmp = z / b elif t <= 2.8e+139: tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.22e+97) tmp = Float64(x / a); elseif (t <= 1.05e-59) tmp = Float64(z / b); elseif (t <= 2.8e+139) 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 <= -1.22e+97) tmp = x / a; elseif (t <= 1.05e-59) tmp = z / b; elseif (t <= 2.8e+139) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.22e+97], N[(x / a), $MachinePrecision], If[LessEqual[t, 1.05e-59], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.8e+139], N[(x / a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+97}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-59}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+139}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.21999999999999997e97 or 1.04999999999999998e-59 < t < 2.7999999999999998e139Initial program 87.5%
associate-/l*92.4%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around 0 61.6%
Taylor expanded in a around inf 41.2%
if -1.21999999999999997e97 < t < 1.04999999999999998e-59Initial program 66.6%
associate-/l*61.3%
associate-/l*56.7%
Simplified56.7%
Taylor expanded in y around inf 47.4%
if 2.7999999999999998e139 < t Initial program 91.3%
associate-/l*96.7%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in y around 0 66.0%
Taylor expanded in a around 0 46.6%
Final simplification45.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6.8e-30) (not (<= a 98.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -6.8e-30) || !(a <= 98.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 <= (-6.8d-30)) .or. (.not. (a <= 98.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 <= -6.8e-30) || !(a <= 98.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6.8e-30) or not (a <= 98.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6.8e-30) || !(a <= 98.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 <= -6.8e-30) || ~((a <= 98.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -6.8e-30], N[Not[LessEqual[a, 98.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-30} \lor \neg \left(a \leq 98\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.8000000000000006e-30 or 98 < a Initial program 74.8%
associate-/l*73.3%
associate-/l*73.3%
Simplified73.3%
Taylor expanded in y around 0 47.3%
Taylor expanded in a around inf 46.8%
if -6.8000000000000006e-30 < a < 98Initial program 77.4%
associate-/l*77.2%
associate-/l*75.8%
Simplified75.8%
Taylor expanded in y around 0 32.3%
Taylor expanded in a around 0 32.3%
Final simplification39.2%
(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.2%
associate-/l*75.3%
associate-/l*74.6%
Simplified74.6%
Taylor expanded in y around 0 39.5%
Taylor expanded in a around 0 18.9%
Final simplification18.9%
(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 2024067
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))