
(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)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 -2e-316)
t_1
(if (<= t_1 0.0)
(+
(/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
(/ z b))
(if (<= t_1 5e+286)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ (+ a (/ y (/ t b))) 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -2e-316) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / pow(b, 2.0))) / y) + (z / b);
} else if (t_1 <= 5e+286) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / ((a + (y / (t / b))) + 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 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -2e-316) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / Math.pow(b, 2.0))) / y) + (z / b);
} else if (t_1 <= 5e+286) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + (y / (t / b))) + 1.0));
} else {
tmp = z / b;
}
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 <= -2e-316: tmp = t_1 elif t_1 <= 0.0: tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / math.pow(b, 2.0))) / y) + (z / b) elif t_1 <= 5e+286: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / ((a + (y / (t / b))) + 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(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= -2e-316) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(Float64(x * t) / b) + Float64(Float64(t * Float64(z * Float64(-1.0 - a))) / (b ^ 2.0))) / y) + Float64(z / b)); elseif (t_1 <= 5e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0))); 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)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -2e-316) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / (b ^ 2.0))) / y) + (z / b); elseif (t_1 <= 5e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / ((a + (y / (t / b))) + 1.0)); 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-316], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] + N[(N[(t * N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+286], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-316}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\frac{x \cdot t}{b} + \frac{t \cdot \left(z \cdot \left(-1 - a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + \frac{y}{\frac{t}{b}}\right) + 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))) < -2.000000017e-316 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000004e286Initial program 96.1%
if -2.000000017e-316 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 54.8%
*-commutative54.8%
associate-*l/54.6%
*-commutative54.6%
associate-*l/65.5%
Simplified65.5%
Taylor expanded in y around -inf 69.7%
if 5.0000000000000004e286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 13.2%
associate-/l*68.6%
associate-+l+68.6%
associate-/l*68.6%
Simplified68.6%
associate-/l*68.6%
*-commutative68.6%
associate-*l/68.6%
div-inv68.6%
associate-*l*60.2%
Applied egg-rr60.2%
Taylor expanded in x around 0 43.9%
times-frac92.0%
*-commutative92.0%
associate-/l*91.9%
Simplified91.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%
*-commutative0.0%
associate-*l/0.5%
*-commutative0.5%
associate-*l/14.3%
Simplified14.3%
Taylor expanded in t around 0 91.2%
Final simplification90.1%
(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 -3e-218)
t_1
(if (<= t_1 0.0)
(/ (+ x (/ y (/ t z))) (+ a (+ (* b (* y (/ 1.0 t))) 1.0)))
(if (<= t_1 5e+286)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ (+ a (/ y (/ t b))) 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -3e-218) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (x + (y / (t / z))) / (a + ((b * (y * (1.0 / t))) + 1.0));
} else if (t_1 <= 5e+286) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / ((a + (y / (t / b))) + 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 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -3e-218) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (x + (y / (t / z))) / (a + ((b * (y * (1.0 / t))) + 1.0));
} else if (t_1 <= 5e+286) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + (y / (t / b))) + 1.0));
} else {
tmp = z / b;
}
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 <= -3e-218: tmp = t_1 elif t_1 <= 0.0: tmp = (x + (y / (t / z))) / (a + ((b * (y * (1.0 / t))) + 1.0)) elif t_1 <= 5e+286: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / ((a + (y / (t / b))) + 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(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= -3e-218) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(Float64(b * Float64(y * Float64(1.0 / t))) + 1.0))); elseif (t_1 <= 5e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0))); 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)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -3e-218) tmp = t_1; elseif (t_1 <= 0.0) tmp = (x + (y / (t / z))) / (a + ((b * (y * (1.0 / t))) + 1.0)); elseif (t_1 <= 5e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / ((a + (y / (t / b))) + 1.0)); 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -3e-218], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(b * N[(y * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+286], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq -3 \cdot 10^{-218}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(b \cdot \left(y \cdot \frac{1}{t}\right) + 1\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + \frac{y}{\frac{t}{b}}\right) + 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))) < -2.9999999999999998e-218 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000004e286Initial program 96.9%
if -2.9999999999999998e-218 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 59.9%
associate-/l*61.7%
associate-+l+61.7%
associate-/l*70.0%
Simplified70.0%
associate-/l*61.7%
*-commutative61.7%
associate-*l/69.2%
div-inv69.2%
associate-*l*70.7%
Applied egg-rr70.7%
if 5.0000000000000004e286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 13.2%
associate-/l*68.6%
associate-+l+68.6%
associate-/l*68.6%
Simplified68.6%
associate-/l*68.6%
*-commutative68.6%
associate-*l/68.6%
div-inv68.6%
associate-*l*60.2%
Applied egg-rr60.2%
Taylor expanded in x around 0 43.9%
times-frac92.0%
*-commutative92.0%
associate-/l*91.9%
Simplified91.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%
*-commutative0.0%
associate-*l/0.5%
*-commutative0.5%
associate-*l/14.3%
Simplified14.3%
Taylor expanded in t around 0 91.2%
Final simplification89.7%
(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 5e+286)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ (+ a (/ y (/ t b))) 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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= 5e+286) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / ((a + (y / (t / b))) + 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 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= 5e+286) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + (y / (t / b))) + 1.0));
} else {
tmp = z / b;
}
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 <= 5e+286: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / ((a + (y / (t / b))) + 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(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= 5e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0))); 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)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= 5e+286) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / ((a + (y / (t / b))) + 1.0)); 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+286], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + \frac{y}{\frac{t}{b}}\right) + 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))) < 5.0000000000000004e286Initial program 86.5%
if 5.0000000000000004e286 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 13.2%
associate-/l*68.6%
associate-+l+68.6%
associate-/l*68.6%
Simplified68.6%
associate-/l*68.6%
*-commutative68.6%
associate-*l/68.6%
div-inv68.6%
associate-*l*60.2%
Applied egg-rr60.2%
Taylor expanded in x around 0 43.9%
times-frac92.0%
*-commutative92.0%
associate-/l*91.9%
Simplified91.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%
*-commutative0.0%
associate-*l/0.5%
*-commutative0.5%
associate-*l/14.3%
Simplified14.3%
Taylor expanded in t around 0 91.2%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= (+ a 1.0) -4e+136)
(/ t_1 a)
(if (<= (+ a 1.0) -1e+109)
(/ z b)
(if (<= (+ a 1.0) -2000000000000.0)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= (+ a 1.0) 1.0)
(/ t_1 (+ (/ (* y b) t) 1.0))
(/ t_1 (+ a 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double tmp;
if ((a + 1.0) <= -4e+136) {
tmp = t_1 / a;
} else if ((a + 1.0) <= -1e+109) {
tmp = z / b;
} else if ((a + 1.0) <= -2000000000000.0) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if ((a + 1.0) <= 1.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} else {
tmp = t_1 / (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) :: t_1
real(8) :: tmp
t_1 = x + ((y * z) / t)
if ((a + 1.0d0) <= (-4d+136)) then
tmp = t_1 / a
else if ((a + 1.0d0) <= (-1d+109)) then
tmp = z / b
else if ((a + 1.0d0) <= (-2000000000000.0d0)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if ((a + 1.0d0) <= 1.0d0) then
tmp = t_1 / (((y * b) / t) + 1.0d0)
else
tmp = t_1 / (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 t_1 = x + ((y * z) / t);
double tmp;
if ((a + 1.0) <= -4e+136) {
tmp = t_1 / a;
} else if ((a + 1.0) <= -1e+109) {
tmp = z / b;
} else if ((a + 1.0) <= -2000000000000.0) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if ((a + 1.0) <= 1.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if (a + 1.0) <= -4e+136: tmp = t_1 / a elif (a + 1.0) <= -1e+109: tmp = z / b elif (a + 1.0) <= -2000000000000.0: tmp = x / ((a + 1.0) + (y * (b / t))) elif (a + 1.0) <= 1.0: tmp = t_1 / (((y * b) / t) + 1.0) else: tmp = t_1 / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (Float64(a + 1.0) <= -4e+136) tmp = Float64(t_1 / a); elseif (Float64(a + 1.0) <= -1e+109) tmp = Float64(z / b); elseif (Float64(a + 1.0) <= -2000000000000.0) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (Float64(a + 1.0) <= 1.0) tmp = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + 1.0)); else tmp = Float64(t_1 / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); tmp = 0.0; if ((a + 1.0) <= -4e+136) tmp = t_1 / a; elseif ((a + 1.0) <= -1e+109) tmp = z / b; elseif ((a + 1.0) <= -2000000000000.0) tmp = x / ((a + 1.0) + (y * (b / t))); elseif ((a + 1.0) <= 1.0) tmp = t_1 / (((y * b) / t) + 1.0); else tmp = t_1 / (a + 1.0); 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]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -4e+136], N[(t$95$1 / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], -1e+109], N[(z / b), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], -2000000000000.0], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1.0], N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a + 1 \leq -4 \cdot 10^{+136}:\\
\;\;\;\;\frac{t_1}{a}\\
\mathbf{elif}\;a + 1 \leq -1 \cdot 10^{+109}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a + 1 \leq -2000000000000:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a + 1 \leq 1:\\
\;\;\;\;\frac{t_1}{\frac{y \cdot b}{t} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a + 1}\\
\end{array}
\end{array}
if (+.f64 a 1) < -4.00000000000000023e136Initial program 85.7%
*-commutative85.7%
associate-*l/80.0%
*-commutative80.0%
associate-*l/77.2%
Simplified77.2%
Taylor expanded in a around inf 73.1%
if -4.00000000000000023e136 < (+.f64 a 1) < -9.99999999999999982e108Initial program 16.0%
*-commutative16.0%
associate-*l/15.7%
*-commutative15.7%
associate-*l/15.4%
Simplified15.4%
Taylor expanded in t around 0 68.0%
if -9.99999999999999982e108 < (+.f64 a 1) < -2e12Initial program 82.9%
*-commutative82.9%
associate-*l/83.0%
*-commutative83.0%
associate-*l/94.4%
Simplified94.4%
Taylor expanded in x around inf 88.7%
if -2e12 < (+.f64 a 1) < 1Initial program 78.9%
*-commutative78.9%
associate-*l/80.3%
*-commutative80.3%
associate-*l/79.6%
Simplified79.6%
Taylor expanded in a around 0 78.9%
if 1 < (+.f64 a 1) Initial program 71.5%
*-commutative71.5%
associate-*l/72.0%
*-commutative72.0%
associate-*l/72.0%
Simplified72.0%
Taylor expanded in b around 0 59.5%
Final simplification72.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -6.5e-103)
(not
(or (<= t -5.5e-203) (and (not (<= t -9.5e-270)) (<= t 1.55e-201)))))
(/ (+ x (* z (/ y t))) (+ a (+ (/ y (/ t b)) 1.0)))
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.5e-103) || !((t <= -5.5e-203) || (!(t <= -9.5e-270) && (t <= 1.55e-201)))) {
tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 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 <= (-6.5d-103)) .or. (.not. (t <= (-5.5d-203)) .or. (.not. (t <= (-9.5d-270))) .and. (t <= 1.55d-201))) then
tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 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 <= -6.5e-103) || !((t <= -5.5e-203) || (!(t <= -9.5e-270) && (t <= 1.55e-201)))) {
tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.5e-103) or not ((t <= -5.5e-203) or (not (t <= -9.5e-270) and (t <= 1.55e-201))): tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.5e-103) || !((t <= -5.5e-203) || (!(t <= -9.5e-270) && (t <= 1.55e-201)))) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(Float64(y / Float64(t / b)) + 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 <= -6.5e-103) || ~(((t <= -5.5e-203) || (~((t <= -9.5e-270)) && (t <= 1.55e-201))))) tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.5e-103], N[Not[Or[LessEqual[t, -5.5e-203], And[N[Not[LessEqual[t, -9.5e-270]], $MachinePrecision], LessEqual[t, 1.55e-201]]]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{-103} \lor \neg \left(t \leq -5.5 \cdot 10^{-203} \lor \neg \left(t \leq -9.5 \cdot 10^{-270}\right) \land t \leq 1.55 \cdot 10^{-201}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(\frac{y}{\frac{t}{b}} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -6.49999999999999966e-103 or -5.5000000000000002e-203 < t < -9.5000000000000006e-270 or 1.5499999999999999e-201 < t Initial program 81.4%
associate-/l*83.5%
associate-+l+83.5%
associate-/l*85.8%
Simplified85.8%
associate-/r/85.1%
Applied egg-rr85.1%
if -6.49999999999999966e-103 < t < -5.5000000000000002e-203 or -9.5000000000000006e-270 < t < 1.5499999999999999e-201Initial program 51.2%
*-commutative51.2%
associate-*l/44.7%
*-commutative44.7%
associate-*l/36.2%
Simplified36.2%
Taylor expanded in t around 0 72.7%
Final simplification82.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+174)
(/ z b)
(if (<= y -1.42e+106)
(* z (/ (/ y t) (+ a 1.0)))
(if (<= y -2.2e+49)
(/ z b)
(if (<= y -2.1e-224)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= y 2e+125) (/ x (+ (+ a (/ (* y b) t)) 1.0)) (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.42e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if (y <= -2.2e+49) {
tmp = z / b;
} else if (y <= -2.1e-224) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 2e+125) {
tmp = x / ((a + ((y * b) / t)) + 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 (y <= (-3.8d+174)) then
tmp = z / b
else if (y <= (-1.42d+106)) then
tmp = z * ((y / t) / (a + 1.0d0))
else if (y <= (-2.2d+49)) then
tmp = z / b
else if (y <= (-2.1d-224)) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (y <= 2d+125) then
tmp = x / ((a + ((y * b) / t)) + 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 (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.42e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if (y <= -2.2e+49) {
tmp = z / b;
} else if (y <= -2.1e-224) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 2e+125) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+174: tmp = z / b elif y <= -1.42e+106: tmp = z * ((y / t) / (a + 1.0)) elif y <= -2.2e+49: tmp = z / b elif y <= -2.1e-224: tmp = (x + ((y * z) / t)) / (a + 1.0) elif y <= 2e+125: tmp = x / ((a + ((y * b) / t)) + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+174) tmp = Float64(z / b); elseif (y <= -1.42e+106) tmp = Float64(z * Float64(Float64(y / t) / Float64(a + 1.0))); elseif (y <= -2.2e+49) tmp = Float64(z / b); elseif (y <= -2.1e-224) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (y <= 2e+125) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 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 (y <= -3.8e+174) tmp = z / b; elseif (y <= -1.42e+106) tmp = z * ((y / t) / (a + 1.0)); elseif (y <= -2.2e+49) tmp = z / b; elseif (y <= -2.1e-224) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (y <= 2e+125) tmp = x / ((a + ((y * b) / t)) + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+174], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.42e+106], N[(z * N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.2e+49], N[(z / b), $MachinePrecision], If[LessEqual[y, -2.1e-224], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+125], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.42 \cdot 10^{+106}:\\
\;\;\;\;z \cdot \frac{\frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq -2.2 \cdot 10^{+49}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-224}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+125}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -3.8000000000000002e174 or -1.4200000000000001e106 < y < -2.2000000000000001e49 or 1.9999999999999998e125 < y Initial program 45.5%
*-commutative45.5%
associate-*l/51.1%
*-commutative51.1%
associate-*l/59.7%
Simplified59.7%
Taylor expanded in t around 0 60.6%
if -3.8000000000000002e174 < y < -1.4200000000000001e106Initial program 41.5%
*-commutative41.5%
associate-*l/63.0%
*-commutative63.0%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in x around 0 52.7%
associate-/r*41.5%
associate-*r/56.1%
associate-+r+56.1%
*-commutative56.1%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in y around 0 45.8%
associate-/r*42.1%
associate-/l*56.8%
Simplified56.8%
associate-/r/56.9%
*-commutative56.9%
*-un-lft-identity56.9%
times-frac71.2%
+-commutative71.2%
Applied egg-rr71.2%
if -2.2000000000000001e49 < y < -2.10000000000000006e-224Initial program 93.1%
*-commutative93.1%
associate-*l/89.6%
*-commutative89.6%
associate-*l/87.9%
Simplified87.9%
Taylor expanded in b around 0 76.4%
if -2.10000000000000006e-224 < y < 1.9999999999999998e125Initial program 93.0%
*-commutative93.0%
associate-*l/88.4%
*-commutative88.4%
associate-*l/81.3%
Simplified81.3%
Taylor expanded in x around inf 81.7%
Final simplification73.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+174)
(/ z b)
(if (<= y -1.15e+106)
(* z (/ (/ y t) (+ a 1.0)))
(if (or (<= y -3.6e+45) (not (<= y 3.3e+123)))
(/ z b)
(/ x (+ (+ a (/ b (/ t y))) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.15e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if ((y <= -3.6e+45) || !(y <= 3.3e+123)) {
tmp = z / b;
} else {
tmp = x / ((a + (b / (t / y))) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.8d+174)) then
tmp = z / b
else if (y <= (-1.15d+106)) then
tmp = z * ((y / t) / (a + 1.0d0))
else if ((y <= (-3.6d+45)) .or. (.not. (y <= 3.3d+123))) then
tmp = z / b
else
tmp = x / ((a + (b / (t / y))) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.15e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if ((y <= -3.6e+45) || !(y <= 3.3e+123)) {
tmp = z / b;
} else {
tmp = x / ((a + (b / (t / y))) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+174: tmp = z / b elif y <= -1.15e+106: tmp = z * ((y / t) / (a + 1.0)) elif (y <= -3.6e+45) or not (y <= 3.3e+123): tmp = z / b else: tmp = x / ((a + (b / (t / y))) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+174) tmp = Float64(z / b); elseif (y <= -1.15e+106) tmp = Float64(z * Float64(Float64(y / t) / Float64(a + 1.0))); elseif ((y <= -3.6e+45) || !(y <= 3.3e+123)) tmp = Float64(z / b); else tmp = Float64(x / Float64(Float64(a + Float64(b / Float64(t / y))) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+174) tmp = z / b; elseif (y <= -1.15e+106) tmp = z * ((y / t) / (a + 1.0)); elseif ((y <= -3.6e+45) || ~((y <= 3.3e+123))) tmp = z / b; else tmp = x / ((a + (b / (t / y))) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+174], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.15e+106], N[(z * N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.6e+45], N[Not[LessEqual[y, 3.3e+123]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(N[(a + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{+106}:\\
\;\;\;\;z \cdot \frac{\frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{+45} \lor \neg \left(y \leq 3.3 \cdot 10^{+123}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + \frac{b}{\frac{t}{y}}\right) + 1}\\
\end{array}
\end{array}
if y < -3.8000000000000002e174 or -1.1500000000000001e106 < y < -3.6e45 or 3.30000000000000003e123 < y Initial program 45.5%
*-commutative45.5%
associate-*l/51.1%
*-commutative51.1%
associate-*l/59.7%
Simplified59.7%
Taylor expanded in t around 0 60.6%
if -3.8000000000000002e174 < y < -1.1500000000000001e106Initial program 41.5%
*-commutative41.5%
associate-*l/63.0%
*-commutative63.0%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in x around 0 52.7%
associate-/r*41.5%
associate-*r/56.1%
associate-+r+56.1%
*-commutative56.1%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in y around 0 45.8%
associate-/r*42.1%
associate-/l*56.8%
Simplified56.8%
associate-/r/56.9%
*-commutative56.9%
*-un-lft-identity56.9%
times-frac71.2%
+-commutative71.2%
Applied egg-rr71.2%
if -3.6e45 < y < 3.30000000000000003e123Initial program 93.0%
associate-/l*89.6%
associate-+l+89.6%
associate-/l*85.0%
Simplified85.0%
associate-/r/87.4%
Applied egg-rr87.4%
Taylor expanded in x around inf 76.5%
associate-/l*76.5%
Simplified76.5%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+174)
(/ z b)
(if (<= y -1.68e+106)
(* z (/ (/ y t) (+ a 1.0)))
(if (or (<= y -6.2e+49) (not (<= y 5.2e+121)))
(/ z b)
(/ x (+ (+ a (/ (* y b) t)) 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if ((y <= -6.2e+49) || !(y <= 5.2e+121)) {
tmp = z / b;
} else {
tmp = x / ((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 (y <= (-3.8d+174)) then
tmp = z / b
else if (y <= (-1.68d+106)) then
tmp = z * ((y / t) / (a + 1.0d0))
else if ((y <= (-6.2d+49)) .or. (.not. (y <= 5.2d+121))) then
tmp = z / b
else
tmp = x / ((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 (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if ((y <= -6.2e+49) || !(y <= 5.2e+121)) {
tmp = z / b;
} else {
tmp = x / ((a + ((y * b) / t)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+174: tmp = z / b elif y <= -1.68e+106: tmp = z * ((y / t) / (a + 1.0)) elif (y <= -6.2e+49) or not (y <= 5.2e+121): tmp = z / b else: tmp = x / ((a + ((y * b) / t)) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+174) tmp = Float64(z / b); elseif (y <= -1.68e+106) tmp = Float64(z * Float64(Float64(y / t) / Float64(a + 1.0))); elseif ((y <= -6.2e+49) || !(y <= 5.2e+121)) tmp = Float64(z / b); else tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+174) tmp = z / b; elseif (y <= -1.68e+106) tmp = z * ((y / t) / (a + 1.0)); elseif ((y <= -6.2e+49) || ~((y <= 5.2e+121))) tmp = z / b; else tmp = x / ((a + ((y * b) / t)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+174], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.68e+106], N[(z * N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -6.2e+49], N[Not[LessEqual[y, 5.2e+121]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.68 \cdot 10^{+106}:\\
\;\;\;\;z \cdot \frac{\frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+49} \lor \neg \left(y \leq 5.2 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\end{array}
\end{array}
if y < -3.8000000000000002e174 or -1.68000000000000008e106 < y < -6.19999999999999985e49 or 5.1999999999999998e121 < y Initial program 45.5%
*-commutative45.5%
associate-*l/51.1%
*-commutative51.1%
associate-*l/59.7%
Simplified59.7%
Taylor expanded in t around 0 60.6%
if -3.8000000000000002e174 < y < -1.68000000000000008e106Initial program 41.5%
*-commutative41.5%
associate-*l/63.0%
*-commutative63.0%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in x around 0 52.7%
associate-/r*41.5%
associate-*r/56.1%
associate-+r+56.1%
*-commutative56.1%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in y around 0 45.8%
associate-/r*42.1%
associate-/l*56.8%
Simplified56.8%
associate-/r/56.9%
*-commutative56.9%
*-un-lft-identity56.9%
times-frac71.2%
+-commutative71.2%
Applied egg-rr71.2%
if -6.19999999999999985e49 < y < 5.1999999999999998e121Initial program 93.0%
*-commutative93.0%
associate-*l/88.8%
*-commutative88.8%
associate-*l/83.6%
Simplified83.6%
Taylor expanded in x around inf 76.5%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.1e-271) (not (<= t 1.28e-201))) (/ (+ x (/ y (/ t z))) (+ a (+ (/ y (/ t b)) 1.0))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.1e-271) || !(t <= 1.28e-201)) {
tmp = (x + (y / (t / z))) / (a + ((y / (t / b)) + 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 <= (-3.1d-271)) .or. (.not. (t <= 1.28d-201))) then
tmp = (x + (y / (t / z))) / (a + ((y / (t / b)) + 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 <= -3.1e-271) || !(t <= 1.28e-201)) {
tmp = (x + (y / (t / z))) / (a + ((y / (t / b)) + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.1e-271) or not (t <= 1.28e-201): tmp = (x + (y / (t / z))) / (a + ((y / (t / b)) + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.1e-271) || !(t <= 1.28e-201)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(Float64(y / Float64(t / b)) + 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 <= -3.1e-271) || ~((t <= 1.28e-201))) tmp = (x + (y / (t / z))) / (a + ((y / (t / b)) + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.1e-271], N[Not[LessEqual[t, 1.28e-201]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{-271} \lor \neg \left(t \leq 1.28 \cdot 10^{-201}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(\frac{y}{\frac{t}{b}} + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.0999999999999999e-271 or 1.28e-201 < t Initial program 78.9%
associate-/l*80.9%
associate-+l+80.9%
associate-/l*82.6%
Simplified82.6%
if -3.0999999999999999e-271 < t < 1.28e-201Initial program 52.7%
*-commutative52.7%
associate-*l/42.5%
*-commutative42.5%
associate-*l/32.5%
Simplified32.5%
Taylor expanded in t around 0 79.8%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1e-101)
(/ (+ x (* z (/ y t))) (+ a (+ (/ y (/ t b)) 1.0)))
(if (<= t 8.2e-202)
(/ z b)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e-101) {
tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0));
} else if (t <= 8.2e-202) {
tmp = z / b;
} else {
tmp = (x + (y * (z / t))) / ((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) :: tmp
if (t <= (-1d-101)) then
tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0d0))
else if (t <= 8.2d-202) then
tmp = z / b
else
tmp = (x + (y * (z / t))) / ((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 tmp;
if (t <= -1e-101) {
tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0));
} else if (t <= 8.2e-202) {
tmp = z / b;
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1e-101: tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0)) elif t <= 8.2e-202: tmp = z / b else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1e-101) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(Float64(y / Float64(t / b)) + 1.0))); elseif (t <= 8.2e-202) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1e-101) tmp = (x + (z * (y / t))) / (a + ((y / (t / b)) + 1.0)); elseif (t <= 8.2e-202) tmp = z / b; else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1e-101], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.2e-202], N[(z / b), $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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-101}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(\frac{y}{\frac{t}{b}} + 1\right)}\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-202}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -1.00000000000000005e-101Initial program 84.2%
associate-/l*85.6%
associate-+l+85.6%
associate-/l*89.0%
Simplified89.0%
associate-/r/89.5%
Applied egg-rr89.5%
if -1.00000000000000005e-101 < t < 8.2000000000000008e-202Initial program 58.3%
*-commutative58.3%
associate-*l/51.9%
*-commutative51.9%
associate-*l/44.0%
Simplified44.0%
Taylor expanded in t around 0 65.3%
if 8.2000000000000008e-202 < t Initial program 78.8%
*-commutative78.8%
associate-*l/81.5%
*-commutative81.5%
associate-*l/83.5%
Simplified83.5%
Final simplification81.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+174)
(/ z b)
(if (<= y -1.68e+106)
(* (/ y t) (/ z (+ a 1.0)))
(if (or (<= y -1.5e+47) (not (<= y 8.5e+83))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((y <= -1.5e+47) || !(y <= 8.5e+83)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.8d+174)) then
tmp = z / b
else if (y <= (-1.68d+106)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if ((y <= (-1.5d+47)) .or. (.not. (y <= 8.5d+83))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((y <= -1.5e+47) || !(y <= 8.5e+83)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+174: tmp = z / b elif y <= -1.68e+106: tmp = (y / t) * (z / (a + 1.0)) elif (y <= -1.5e+47) or not (y <= 8.5e+83): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+174) tmp = Float64(z / b); elseif (y <= -1.68e+106) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif ((y <= -1.5e+47) || !(y <= 8.5e+83)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+174) tmp = z / b; elseif (y <= -1.68e+106) tmp = (y / t) * (z / (a + 1.0)); elseif ((y <= -1.5e+47) || ~((y <= 8.5e+83))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+174], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.68e+106], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.5e+47], N[Not[LessEqual[y, 8.5e+83]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.68 \cdot 10^{+106}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{+47} \lor \neg \left(y \leq 8.5 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -3.8000000000000002e174 or -1.68000000000000008e106 < y < -1.5000000000000001e47 or 8.4999999999999995e83 < y Initial program 46.5%
*-commutative46.5%
associate-*l/51.7%
*-commutative51.7%
associate-*l/59.8%
Simplified59.8%
Taylor expanded in t around 0 59.6%
if -3.8000000000000002e174 < y < -1.68000000000000008e106Initial program 41.5%
*-commutative41.5%
associate-*l/63.0%
*-commutative63.0%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in x around 0 52.7%
associate-/r*41.5%
associate-*r/56.1%
associate-+r+56.1%
*-commutative56.1%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in y around 0 45.8%
associate-/r*42.1%
associate-/l*56.8%
Simplified56.8%
Taylor expanded in y around 0 45.8%
times-frac63.8%
+-commutative63.8%
*-commutative63.8%
+-commutative63.8%
Simplified63.8%
if -1.5000000000000001e47 < y < 8.4999999999999995e83Initial program 94.0%
*-commutative94.0%
associate-*l/89.7%
*-commutative89.7%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in t around inf 67.0%
Final simplification64.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -4e+175)
(/ z b)
(if (<= y -1.68e+106)
(/ z (* (+ a 1.0) (/ t y)))
(if (or (<= y -1.25e+49) (not (<= y 2.4e+83))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4e+175) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = z / ((a + 1.0) * (t / y));
} else if ((y <= -1.25e+49) || !(y <= 2.4e+83)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-4d+175)) then
tmp = z / b
else if (y <= (-1.68d+106)) then
tmp = z / ((a + 1.0d0) * (t / y))
else if ((y <= (-1.25d+49)) .or. (.not. (y <= 2.4d+83))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4e+175) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = z / ((a + 1.0) * (t / y));
} else if ((y <= -1.25e+49) || !(y <= 2.4e+83)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4e+175: tmp = z / b elif y <= -1.68e+106: tmp = z / ((a + 1.0) * (t / y)) elif (y <= -1.25e+49) or not (y <= 2.4e+83): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4e+175) tmp = Float64(z / b); elseif (y <= -1.68e+106) tmp = Float64(z / Float64(Float64(a + 1.0) * Float64(t / y))); elseif ((y <= -1.25e+49) || !(y <= 2.4e+83)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4e+175) tmp = z / b; elseif (y <= -1.68e+106) tmp = z / ((a + 1.0) * (t / y)); elseif ((y <= -1.25e+49) || ~((y <= 2.4e+83))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4e+175], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.68e+106], N[(z / N[(N[(a + 1.0), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.25e+49], N[Not[LessEqual[y, 2.4e+83]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+175}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.68 \cdot 10^{+106}:\\
\;\;\;\;\frac{z}{\left(a + 1\right) \cdot \frac{t}{y}}\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{+49} \lor \neg \left(y \leq 2.4 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -3.9999999999999997e175 or -1.68000000000000008e106 < y < -1.2500000000000001e49 or 2.39999999999999991e83 < y Initial program 46.5%
*-commutative46.5%
associate-*l/51.7%
*-commutative51.7%
associate-*l/59.8%
Simplified59.8%
Taylor expanded in t around 0 59.6%
if -3.9999999999999997e175 < y < -1.68000000000000008e106Initial program 41.5%
*-commutative41.5%
associate-*l/63.0%
*-commutative63.0%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in x around 0 52.7%
associate-/r*41.5%
associate-*r/56.1%
associate-+r+56.1%
*-commutative56.1%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in y around 0 45.8%
associate-/r*42.1%
associate-/l*56.8%
Simplified56.8%
associate-/r/56.9%
*-commutative56.9%
*-un-lft-identity56.9%
times-frac71.2%
+-commutative71.2%
Applied egg-rr71.2%
/-rgt-identity71.2%
clear-num71.2%
un-div-inv70.9%
div-inv70.7%
+-commutative70.7%
clear-num71.0%
Applied egg-rr71.0%
if -1.2500000000000001e49 < y < 2.39999999999999991e83Initial program 94.0%
*-commutative94.0%
associate-*l/89.7%
*-commutative89.7%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in t around inf 67.0%
Final simplification64.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.8e+174)
(/ z b)
(if (<= y -1.68e+106)
(* z (/ (/ y t) (+ a 1.0)))
(if (or (<= y -4e+46) (not (<= y 4.9e+82))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if ((y <= -4e+46) || !(y <= 4.9e+82)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.8d+174)) then
tmp = z / b
else if (y <= (-1.68d+106)) then
tmp = z * ((y / t) / (a + 1.0d0))
else if ((y <= (-4d+46)) .or. (.not. (y <= 4.9d+82))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.8e+174) {
tmp = z / b;
} else if (y <= -1.68e+106) {
tmp = z * ((y / t) / (a + 1.0));
} else if ((y <= -4e+46) || !(y <= 4.9e+82)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.8e+174: tmp = z / b elif y <= -1.68e+106: tmp = z * ((y / t) / (a + 1.0)) elif (y <= -4e+46) or not (y <= 4.9e+82): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.8e+174) tmp = Float64(z / b); elseif (y <= -1.68e+106) tmp = Float64(z * Float64(Float64(y / t) / Float64(a + 1.0))); elseif ((y <= -4e+46) || !(y <= 4.9e+82)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.8e+174) tmp = z / b; elseif (y <= -1.68e+106) tmp = z * ((y / t) / (a + 1.0)); elseif ((y <= -4e+46) || ~((y <= 4.9e+82))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.8e+174], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.68e+106], N[(z * N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4e+46], N[Not[LessEqual[y, 4.9e+82]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.68 \cdot 10^{+106}:\\
\;\;\;\;z \cdot \frac{\frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+46} \lor \neg \left(y \leq 4.9 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -3.8000000000000002e174 or -1.68000000000000008e106 < y < -4e46 or 4.9000000000000001e82 < y Initial program 46.5%
*-commutative46.5%
associate-*l/51.7%
*-commutative51.7%
associate-*l/59.8%
Simplified59.8%
Taylor expanded in t around 0 59.6%
if -3.8000000000000002e174 < y < -1.68000000000000008e106Initial program 41.5%
*-commutative41.5%
associate-*l/63.0%
*-commutative63.0%
associate-*l/77.7%
Simplified77.7%
Taylor expanded in x around 0 52.7%
associate-/r*41.5%
associate-*r/56.1%
associate-+r+56.1%
*-commutative56.1%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in y around 0 45.8%
associate-/r*42.1%
associate-/l*56.8%
Simplified56.8%
associate-/r/56.9%
*-commutative56.9%
*-un-lft-identity56.9%
times-frac71.2%
+-commutative71.2%
Applied egg-rr71.2%
if -4e46 < y < 4.9000000000000001e82Initial program 94.0%
*-commutative94.0%
associate-*l/89.7%
*-commutative89.7%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in t around inf 67.0%
Final simplification64.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.1e+176)
x
(if (<= t -1.45e-36)
(/ x a)
(if (<= t 9e-129) (/ z b) (if (<= t 3.3e+184) (/ x a) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.1e+176) {
tmp = x;
} else if (t <= -1.45e-36) {
tmp = x / a;
} else if (t <= 9e-129) {
tmp = z / b;
} else if (t <= 3.3e+184) {
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 <= (-3.1d+176)) then
tmp = x
else if (t <= (-1.45d-36)) then
tmp = x / a
else if (t <= 9d-129) then
tmp = z / b
else if (t <= 3.3d+184) 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 <= -3.1e+176) {
tmp = x;
} else if (t <= -1.45e-36) {
tmp = x / a;
} else if (t <= 9e-129) {
tmp = z / b;
} else if (t <= 3.3e+184) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.1e+176: tmp = x elif t <= -1.45e-36: tmp = x / a elif t <= 9e-129: tmp = z / b elif t <= 3.3e+184: tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.1e+176) tmp = x; elseif (t <= -1.45e-36) tmp = Float64(x / a); elseif (t <= 9e-129) tmp = Float64(z / b); elseif (t <= 3.3e+184) 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 <= -3.1e+176) tmp = x; elseif (t <= -1.45e-36) tmp = x / a; elseif (t <= 9e-129) tmp = z / b; elseif (t <= 3.3e+184) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.1e+176], x, If[LessEqual[t, -1.45e-36], N[(x / a), $MachinePrecision], If[LessEqual[t, 9e-129], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.3e+184], N[(x / a), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+176}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-36}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-129}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+184}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -3.0999999999999999e176 or 3.2999999999999998e184 < t Initial program 83.9%
*-commutative83.9%
associate-*l/90.4%
*-commutative90.4%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in t around inf 79.5%
Taylor expanded in a around 0 52.0%
if -3.0999999999999999e176 < t < -1.45000000000000006e-36 or 9.00000000000000061e-129 < t < 3.2999999999999998e184Initial program 84.9%
*-commutative84.9%
associate-*l/86.2%
*-commutative86.2%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in x around inf 63.8%
Taylor expanded in a around inf 37.2%
if -1.45000000000000006e-36 < t < 9.00000000000000061e-129Initial program 61.4%
*-commutative61.4%
associate-*l/56.1%
*-commutative56.1%
associate-*l/48.1%
Simplified48.1%
Taylor expanded in t around 0 57.4%
Final simplification48.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.9e+47) (not (<= y 2.85e+85))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.9e+47) || !(y <= 2.85e+85)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.9d+47)) .or. (.not. (y <= 2.85d+85))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.9e+47) || !(y <= 2.85e+85)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.9e+47) or not (y <= 2.85e+85): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.9e+47) || !(y <= 2.85e+85)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.9e+47) || ~((y <= 2.85e+85))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.9e+47], N[Not[LessEqual[y, 2.85e+85]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+47} \lor \neg \left(y \leq 2.85 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.9000000000000002e47 or 2.8500000000000001e85 < y Initial program 45.8%
*-commutative45.8%
associate-*l/53.3%
*-commutative53.3%
associate-*l/62.2%
Simplified62.2%
Taylor expanded in t around 0 54.0%
if -1.9000000000000002e47 < y < 2.8500000000000001e85Initial program 94.0%
*-commutative94.0%
associate-*l/89.7%
*-commutative89.7%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in t around inf 67.0%
Final simplification62.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.3e-6) (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 <= -3.3e-6) || !(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 <= (-3.3d-6)) .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 <= -3.3e-6) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.3e-6) 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 <= -3.3e-6) || !(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 <= -3.3e-6) || ~((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, -3.3e-6], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-6} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.30000000000000017e-6 or 1 < a Initial program 73.6%
*-commutative73.6%
associate-*l/72.4%
*-commutative72.4%
associate-*l/73.1%
Simplified73.1%
Taylor expanded in x around inf 59.1%
Taylor expanded in a around inf 50.8%
if -3.30000000000000017e-6 < a < 1Initial program 78.4%
*-commutative78.4%
associate-*l/79.8%
*-commutative79.8%
associate-*l/79.1%
Simplified79.1%
Taylor expanded in t around inf 43.7%
Taylor expanded in a around 0 43.6%
Final simplification47.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 75.9%
*-commutative75.9%
associate-*l/76.0%
*-commutative76.0%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in t around inf 47.9%
Taylor expanded in a around 0 23.1%
Final simplification23.1%
(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 2024024
(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))))