
(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 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (* y (/ z (+ (* y b) (* t (+ a 1.0)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -1e-294)
t_1
(if (<= t_1 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_1 1e+283) t_1 (if (<= t_1 INFINITY) t_2 (/ 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 t_2 = y * (z / ((y * b) + (t * (a + 1.0))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -1e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_1 <= 1e+283) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = y * (z / ((y * b) + (t * (a + 1.0))));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= -1e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_1 <= 1e+283) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} 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)) t_2 = y * (z / ((y * b) + (t * (a + 1.0)))) tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= -1e-294: tmp = t_1 elif t_1 <= 0.0: tmp = (z / b) + ((t * (x / b)) / y) elif t_1 <= 1e+283: tmp = t_1 elif t_1 <= math.inf: tmp = t_2 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))) t_2 = Float64(y * Float64(z / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -1e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_1 <= 1e+283) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; 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)); t_2 = y * (z / ((y * b) + (t * (a + 1.0)))); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= -1e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z / b) + ((t * (x / b)) / y); elseif (t_1 <= 1e+283) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -1e-294], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+283], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, 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}}\\
t_2 := y \cdot \frac{z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\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))) < -inf.0 or 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 34.5%
associate-/l*54.7%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in x around 0 58.6%
associate-/l*91.2%
+-commutative91.2%
associate-*l/91.3%
*-commutative91.3%
fma-undefine91.3%
Simplified91.3%
Taylor expanded in t around 0 91.3%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.00000000000000002e-294 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282Initial program 99.5%
if -1.00000000000000002e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 42.5%
associate-/l*44.6%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in b around inf 46.2%
Taylor expanded in z around inf 63.6%
Taylor expanded in z around 0 61.9%
associate-/r*71.0%
associate-/l*80.5%
associate-*l/78.1%
*-commutative78.1%
associate-*r/80.5%
Simplified80.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.2%
associate-/l*8.2%
Simplified8.2%
Taylor expanded in y around inf 97.5%
Final simplification95.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ 1.0 (fma y (/ b t) a)))
(t_2 (/ (* y b) t))
(t_3 (+ 1.0 (+ a t_2)))
(t_4 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_2)))
(t_5 (+ (/ x t_3) (/ (* y z) (* t t_3)))))
(if (<= t_4 -1e-294)
t_5
(if (<= t_4 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_4 1e+274)
t_5
(if (<= t_4 INFINITY)
(* z (+ (/ x (* z t_1)) (/ (/ y t) t_1)))
(/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + fma(y, (b / t), a);
double t_2 = (y * b) / t;
double t_3 = 1.0 + (a + t_2);
double t_4 = (x + ((y * z) / t)) / ((a + 1.0) + t_2);
double t_5 = (x / t_3) + ((y * z) / (t * t_3));
double tmp;
if (t_4 <= -1e-294) {
tmp = t_5;
} else if (t_4 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_4 <= 1e+274) {
tmp = t_5;
} else if (t_4 <= ((double) INFINITY)) {
tmp = z * ((x / (z * t_1)) + ((y / t) / t_1));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + fma(y, Float64(b / t), a)) t_2 = Float64(Float64(y * b) / t) t_3 = Float64(1.0 + Float64(a + t_2)) t_4 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_2)) t_5 = Float64(Float64(x / t_3) + Float64(Float64(y * z) / Float64(t * t_3))) tmp = 0.0 if (t_4 <= -1e-294) tmp = t_5; elseif (t_4 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_4 <= 1e+274) tmp = t_5; elseif (t_4 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(Float64(y / t) / t_1))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x / t$95$3), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -1e-294], t$95$5, If[LessEqual[t$95$4, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+274], t$95$5, If[LessEqual[t$95$4, Infinity], N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)\\
t_2 := \frac{y \cdot b}{t}\\
t_3 := 1 + \left(a + t\_2\right)\\
t_4 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_2}\\
t_5 := \frac{x}{t\_3} + \frac{y \cdot z}{t \cdot t\_3}\\
\mathbf{if}\;t\_4 \leq -1 \cdot 10^{-294}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_4 \leq 10^{+274}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{\frac{y}{t}}{t\_1}\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))) < -1.00000000000000002e-294 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999921e273Initial program 96.6%
associate-/l*92.0%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in x around 0 97.8%
if -1.00000000000000002e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 42.5%
associate-/l*44.6%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in b around inf 46.2%
Taylor expanded in z around inf 63.6%
Taylor expanded in z around 0 61.9%
associate-/r*71.0%
associate-/l*80.5%
associate-*l/78.1%
*-commutative78.1%
associate-*r/80.5%
Simplified80.5%
if 9.99999999999999921e273 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 39.2%
associate-/l*66.6%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in z around inf 88.6%
+-commutative88.6%
associate-*l/88.6%
*-commutative88.6%
fma-undefine88.6%
associate-/r*99.8%
+-commutative99.8%
associate-*l/99.8%
*-commutative99.8%
fma-undefine99.8%
Simplified99.8%
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.2%
associate-/l*8.2%
Simplified8.2%
Taylor expanded in y around inf 97.5%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ 1.0 (+ a t_1)))
(t_3 (* t t_2))
(t_4 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_5 (+ (/ x t_2) (/ (* y z) t_3))))
(if (<= t_4 -1e-294)
t_5
(if (<= t_4 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_4 1e+274)
t_5
(if (<= t_4 INFINITY)
(* z (+ (/ x (* z t_2)) (/ y t_3)))
(/ 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 = 1.0 + (a + t_1);
double t_3 = t * t_2;
double t_4 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_5 = (x / t_2) + ((y * z) / t_3);
double tmp;
if (t_4 <= -1e-294) {
tmp = t_5;
} else if (t_4 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_4 <= 1e+274) {
tmp = t_5;
} else if (t_4 <= ((double) INFINITY)) {
tmp = z * ((x / (z * t_2)) + (y / t_3));
} 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 = 1.0 + (a + t_1);
double t_3 = t * t_2;
double t_4 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_5 = (x / t_2) + ((y * z) / t_3);
double tmp;
if (t_4 <= -1e-294) {
tmp = t_5;
} else if (t_4 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_4 <= 1e+274) {
tmp = t_5;
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_2)) + (y / t_3));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = 1.0 + (a + t_1) t_3 = t * t_2 t_4 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_5 = (x / t_2) + ((y * z) / t_3) tmp = 0 if t_4 <= -1e-294: tmp = t_5 elif t_4 <= 0.0: tmp = (z / b) + ((t * (x / b)) / y) elif t_4 <= 1e+274: tmp = t_5 elif t_4 <= math.inf: tmp = z * ((x / (z * t_2)) + (y / t_3)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(1.0 + Float64(a + t_1)) t_3 = Float64(t * t_2) t_4 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_5 = Float64(Float64(x / t_2) + Float64(Float64(y * z) / t_3)) tmp = 0.0 if (t_4 <= -1e-294) tmp = t_5; elseif (t_4 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_4 <= 1e+274) tmp = t_5; elseif (t_4 <= Inf) tmp = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / t_3))); 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 = 1.0 + (a + t_1); t_3 = t * t_2; t_4 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_5 = (x / t_2) + ((y * z) / t_3); tmp = 0.0; if (t_4 <= -1e-294) tmp = t_5; elseif (t_4 <= 0.0) tmp = (z / b) + ((t * (x / b)) / y); elseif (t_4 <= 1e+274) tmp = t_5; elseif (t_4 <= Inf) tmp = z * ((x / (z * t_2)) + (y / t_3)); 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[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x / t$95$2), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, -1e-294], t$95$5, If[LessEqual[t$95$4, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+274], t$95$5, If[LessEqual[t$95$4, Infinity], N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := 1 + \left(a + t\_1\right)\\
t_3 := t \cdot t\_2\\
t_4 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_5 := \frac{x}{t\_2} + \frac{y \cdot z}{t\_3}\\
\mathbf{if}\;t\_4 \leq -1 \cdot 10^{-294}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_4 \leq 10^{+274}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t\_3}\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))) < -1.00000000000000002e-294 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999921e273Initial program 96.6%
associate-/l*92.0%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in x around 0 97.8%
if -1.00000000000000002e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 42.5%
associate-/l*44.6%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in b around inf 46.2%
Taylor expanded in z around inf 63.6%
Taylor expanded in z around 0 61.9%
associate-/r*71.0%
associate-/l*80.5%
associate-*l/78.1%
*-commutative78.1%
associate-*r/80.5%
Simplified80.5%
if 9.99999999999999921e273 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 39.2%
associate-/l*66.6%
associate-/l*66.6%
Simplified66.6%
Taylor expanded in z around inf 88.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.2%
associate-/l*8.2%
Simplified8.2%
Taylor expanded in y around inf 97.5%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ 1.0 (+ a t_1)))
(t_3 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_4 (+ (/ x t_2) (/ (* y z) (* t t_2)))))
(if (<= t_3 -1e-294)
t_4
(if (<= t_3 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_3 1e+283)
t_4
(if (<= t_3 INFINITY)
(* y (/ z (+ (* 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 = 1.0 + (a + t_1);
double t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_4 = (x / t_2) + ((y * z) / (t * t_2));
double tmp;
if (t_3 <= -1e-294) {
tmp = t_4;
} else if (t_3 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_3 <= 1e+283) {
tmp = t_4;
} else if (t_3 <= ((double) INFINITY)) {
tmp = y * (z / ((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 = 1.0 + (a + t_1);
double t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_4 = (x / t_2) + ((y * z) / (t * t_2));
double tmp;
if (t_3 <= -1e-294) {
tmp = t_4;
} else if (t_3 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_3 <= 1e+283) {
tmp = t_4;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = y * (z / ((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 = 1.0 + (a + t_1) t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_4 = (x / t_2) + ((y * z) / (t * t_2)) tmp = 0 if t_3 <= -1e-294: tmp = t_4 elif t_3 <= 0.0: tmp = (z / b) + ((t * (x / b)) / y) elif t_3 <= 1e+283: tmp = t_4 elif t_3 <= math.inf: tmp = y * (z / ((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(1.0 + Float64(a + t_1)) t_3 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_4 = Float64(Float64(x / t_2) + Float64(Float64(y * z) / Float64(t * t_2))) tmp = 0.0 if (t_3 <= -1e-294) tmp = t_4; elseif (t_3 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_3 <= 1e+283) tmp = t_4; elseif (t_3 <= Inf) tmp = Float64(y * Float64(z / 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 = 1.0 + (a + t_1); t_3 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_4 = (x / t_2) + ((y * z) / (t * t_2)); tmp = 0.0; if (t_3 <= -1e-294) tmp = t_4; elseif (t_3 <= 0.0) tmp = (z / b) + ((t * (x / b)) / y); elseif (t_3 <= 1e+283) tmp = t_4; elseif (t_3 <= Inf) tmp = y * (z / ((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[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x / t$95$2), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-294], t$95$4, If[LessEqual[t$95$3, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+283], t$95$4, If[LessEqual[t$95$3, Infinity], N[(y * N[(z / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := 1 + \left(a + t\_1\right)\\
t_3 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_4 := \frac{x}{t\_2} + \frac{y \cdot z}{t \cdot t\_2}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-294}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_3 \leq 10^{+283}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{y \cdot b + t \cdot \left(a + 1\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))) < -1.00000000000000002e-294 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999955e282Initial program 96.6%
associate-/l*92.1%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around 0 97.8%
if -1.00000000000000002e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 42.5%
associate-/l*44.6%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in b around inf 46.2%
Taylor expanded in z around inf 63.6%
Taylor expanded in z around 0 61.9%
associate-/r*71.0%
associate-/l*80.5%
associate-*l/78.1%
*-commutative78.1%
associate-*r/80.5%
Simplified80.5%
if 9.99999999999999955e282 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 35.4%
associate-/l*64.5%
associate-/l*64.5%
Simplified64.5%
Taylor expanded in x around 0 58.4%
associate-/l*87.7%
+-commutative87.7%
associate-*l/87.7%
*-commutative87.7%
fma-undefine87.7%
Simplified87.7%
Taylor expanded in t around 0 87.7%
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.2%
associate-/l*8.2%
Simplified8.2%
Taylor expanded in y around inf 97.5%
Final simplification94.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))))
(t_2 (+ (/ z b) (/ (* t (/ x b)) y))))
(if (<= y -5.4e+106)
t_2
(if (<= y -1e-98)
t_1
(if (<= y 9.5e-266)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 2.4e+180) 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))) / ((a + 1.0) + (y / (t / b)));
double t_2 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -5.4e+106) {
tmp = t_2;
} else if (y <= -1e-98) {
tmp = t_1;
} else if (y <= 9.5e-266) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2.4e+180) {
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))) / ((a + 1.0d0) + (y / (t / b)))
t_2 = (z / b) + ((t * (x / b)) / y)
if (y <= (-5.4d+106)) then
tmp = t_2
else if (y <= (-1d-98)) then
tmp = t_1
else if (y <= 9.5d-266) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 2.4d+180) 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))) / ((a + 1.0) + (y / (t / b)));
double t_2 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -5.4e+106) {
tmp = t_2;
} else if (y <= -1e-98) {
tmp = t_1;
} else if (y <= 9.5e-266) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2.4e+180) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) t_2 = (z / b) + ((t * (x / b)) / y) tmp = 0 if y <= -5.4e+106: tmp = t_2 elif y <= -1e-98: tmp = t_1 elif y <= 9.5e-266: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 2.4e+180: tmp = t_1 else: tmp = t_2 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(t / b)))) t_2 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) tmp = 0.0 if (y <= -5.4e+106) tmp = t_2; elseif (y <= -1e-98) tmp = t_1; elseif (y <= 9.5e-266) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 2.4e+180) 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))) / ((a + 1.0) + (y / (t / b))); t_2 = (z / b) + ((t * (x / b)) / y); tmp = 0.0; if (y <= -5.4e+106) tmp = t_2; elseif (y <= -1e-98) tmp = t_1; elseif (y <= 9.5e-266) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 2.4e+180) tmp = t_1; else tmp = t_2; 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[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.4e+106], t$95$2, If[LessEqual[y, -1e-98], t$95$1, If[LessEqual[y, 9.5e-266], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+180], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
t_2 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{+106}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-266}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+180}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -5.40000000000000012e106 or 2.3999999999999998e180 < y Initial program 31.6%
associate-/l*35.2%
associate-/l*48.4%
Simplified48.4%
Taylor expanded in b around inf 24.9%
Taylor expanded in z around inf 75.6%
Taylor expanded in z around 0 72.2%
associate-/r*75.7%
associate-/l*78.3%
associate-*l/77.0%
*-commutative77.0%
associate-*r/78.3%
Simplified78.3%
if -5.40000000000000012e106 < y < -9.99999999999999939e-99 or 9.49999999999999951e-266 < y < 2.3999999999999998e180Initial program 83.8%
associate-/l*85.3%
associate-/l*85.3%
Simplified85.3%
clear-num85.3%
un-div-inv85.3%
Applied egg-rr85.3%
if -9.99999999999999939e-99 < y < 9.49999999999999951e-266Initial program 97.4%
associate-/l*84.4%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 87.5%
Final simplification83.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))
(t_2 (+ (/ z b) (/ (* t (/ x b)) y))))
(if (<= y -1.45e+104)
t_2
(if (<= y -1.35e-98)
t_1
(if (<= y 4.3e-267)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 2e+180) 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))) / ((a + 1.0) + (y * (b / t)));
double t_2 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1.45e+104) {
tmp = t_2;
} else if (y <= -1.35e-98) {
tmp = t_1;
} else if (y <= 4.3e-267) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2e+180) {
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))) / ((a + 1.0d0) + (y * (b / t)))
t_2 = (z / b) + ((t * (x / b)) / y)
if (y <= (-1.45d+104)) then
tmp = t_2
else if (y <= (-1.35d-98)) then
tmp = t_1
else if (y <= 4.3d-267) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 2d+180) 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))) / ((a + 1.0) + (y * (b / t)));
double t_2 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1.45e+104) {
tmp = t_2;
} else if (y <= -1.35e-98) {
tmp = t_1;
} else if (y <= 4.3e-267) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2e+180) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) t_2 = (z / b) + ((t * (x / b)) / y) tmp = 0 if y <= -1.45e+104: tmp = t_2 elif y <= -1.35e-98: tmp = t_1 elif y <= 4.3e-267: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 2e+180: tmp = t_1 else: tmp = t_2 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)))) t_2 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) tmp = 0.0 if (y <= -1.45e+104) tmp = t_2; elseif (y <= -1.35e-98) tmp = t_1; elseif (y <= 4.3e-267) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 2e+180) 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))) / ((a + 1.0) + (y * (b / t))); t_2 = (z / b) + ((t * (x / b)) / y); tmp = 0.0; if (y <= -1.45e+104) tmp = t_2; elseif (y <= -1.35e-98) tmp = t_1; elseif (y <= 4.3e-267) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 2e+180) tmp = t_1; else tmp = t_2; 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]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+104], t$95$2, If[LessEqual[y, -1.35e-98], t$95$1, If[LessEqual[y, 4.3e-267], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+180], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
t_2 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-267}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+180}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.4499999999999999e104 or 2e180 < y Initial program 32.4%
associate-/l*36.0%
associate-/l*49.0%
Simplified49.0%
Taylor expanded in b around inf 25.8%
Taylor expanded in z around inf 75.9%
Taylor expanded in z around 0 72.5%
associate-/r*76.0%
associate-/l*78.6%
associate-*l/77.3%
*-commutative77.3%
associate-*r/78.6%
Simplified78.6%
if -1.4499999999999999e104 < y < -1.3499999999999999e-98 or 4.2999999999999996e-267 < y < 2e180Initial program 83.7%
associate-/l*85.2%
associate-/l*85.2%
Simplified85.2%
if -1.3499999999999999e-98 < y < 4.2999999999999996e-267Initial program 97.4%
associate-/l*84.4%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 87.5%
Final simplification83.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* t (/ x b)) y))) (t_2 (* t (+ a 1.0))))
(if (<= y -4.2e+110)
t_1
(if (<= y -3.5e-94)
(* y (/ z (+ (* y b) t_2)))
(if (<= y -1.15e-214)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 2.5e-5)
(+ (/ x (+ a 1.0)) (/ (* y z) t_2))
(if (<= y 2.5e+26) (/ x (+ 1.0 (+ a (* y (/ b t))))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double t_2 = t * (a + 1.0);
double tmp;
if (y <= -4.2e+110) {
tmp = t_1;
} else if (y <= -3.5e-94) {
tmp = y * (z / ((y * b) + t_2));
} else if (y <= -1.15e-214) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2.5e-5) {
tmp = (x / (a + 1.0)) + ((y * z) / t_2);
} else if (y <= 2.5e+26) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z / b) + ((t * (x / b)) / y)
t_2 = t * (a + 1.0d0)
if (y <= (-4.2d+110)) then
tmp = t_1
else if (y <= (-3.5d-94)) then
tmp = y * (z / ((y * b) + t_2))
else if (y <= (-1.15d-214)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 2.5d-5) then
tmp = (x / (a + 1.0d0)) + ((y * z) / t_2)
else if (y <= 2.5d+26) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double t_2 = t * (a + 1.0);
double tmp;
if (y <= -4.2e+110) {
tmp = t_1;
} else if (y <= -3.5e-94) {
tmp = y * (z / ((y * b) + t_2));
} else if (y <= -1.15e-214) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2.5e-5) {
tmp = (x / (a + 1.0)) + ((y * z) / t_2);
} else if (y <= 2.5e+26) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t * (x / b)) / y) t_2 = t * (a + 1.0) tmp = 0 if y <= -4.2e+110: tmp = t_1 elif y <= -3.5e-94: tmp = y * (z / ((y * b) + t_2)) elif y <= -1.15e-214: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 2.5e-5: tmp = (x / (a + 1.0)) + ((y * z) / t_2) elif y <= 2.5e+26: tmp = x / (1.0 + (a + (y * (b / t)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) t_2 = Float64(t * Float64(a + 1.0)) tmp = 0.0 if (y <= -4.2e+110) tmp = t_1; elseif (y <= -3.5e-94) tmp = Float64(y * Float64(z / Float64(Float64(y * b) + t_2))); elseif (y <= -1.15e-214) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 2.5e-5) tmp = Float64(Float64(x / Float64(a + 1.0)) + Float64(Float64(y * z) / t_2)); elseif (y <= 2.5e+26) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t * (x / b)) / y); t_2 = t * (a + 1.0); tmp = 0.0; if (y <= -4.2e+110) tmp = t_1; elseif (y <= -3.5e-94) tmp = y * (z / ((y * b) + t_2)); elseif (y <= -1.15e-214) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 2.5e-5) tmp = (x / (a + 1.0)) + ((y * z) / t_2); elseif (y <= 2.5e+26) tmp = x / (1.0 + (a + (y * (b / t)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+110], t$95$1, If[LessEqual[y, -3.5e-94], N[(y * N[(z / N[(N[(y * b), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.15e-214], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e-5], N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+26], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
t_2 := t \cdot \left(a + 1\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+110}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-94}:\\
\;\;\;\;y \cdot \frac{z}{y \cdot b + t\_2}\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-214}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{a + 1} + \frac{y \cdot z}{t\_2}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.2000000000000003e110 or 2.5e26 < y Initial program 42.9%
associate-/l*46.5%
associate-/l*58.2%
Simplified58.2%
Taylor expanded in b around inf 29.5%
Taylor expanded in z around inf 69.6%
Taylor expanded in z around 0 68.1%
associate-/r*70.7%
associate-/l*73.6%
associate-*l/71.8%
*-commutative71.8%
associate-*r/73.6%
Simplified73.6%
if -4.2000000000000003e110 < y < -3.49999999999999998e-94Initial program 79.0%
associate-/l*79.0%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in x around 0 56.5%
associate-/l*58.9%
+-commutative58.9%
associate-*l/56.4%
*-commutative56.4%
fma-undefine56.4%
Simplified56.4%
Taylor expanded in t around 0 70.3%
if -3.49999999999999998e-94 < y < -1.15000000000000005e-214Initial program 95.5%
associate-/l*87.7%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in x around inf 94.6%
if -1.15000000000000005e-214 < y < 2.50000000000000012e-5Initial program 94.5%
associate-/l*89.5%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in y around 0 76.3%
Taylor expanded in x around 0 82.7%
if 2.50000000000000012e-5 < y < 2.5e26Initial program 82.3%
associate-/l*82.5%
associate-/l*82.5%
Simplified82.5%
clear-num82.5%
un-div-inv82.5%
Applied egg-rr82.5%
clear-num82.5%
un-div-inv82.2%
Applied egg-rr82.2%
Taylor expanded in x around inf 64.8%
associate-*l/64.8%
*-commutative64.8%
Simplified64.8%
Final simplification77.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ z (+ (* y b) (* t (+ a 1.0))))))
(t_2 (+ (/ z b) (/ (* t (/ x b)) y))))
(if (<= y -1.1e+110)
t_2
(if (<= y -1.65e-96)
t_1
(if (<= y 4.7e-64)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 6e-8)
t_1
(if (<= y 1.55e+26) (/ x (+ 1.0 (+ a (* y (/ b t))))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (z / ((y * b) + (t * (a + 1.0))));
double t_2 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1.1e+110) {
tmp = t_2;
} else if (y <= -1.65e-96) {
tmp = t_1;
} else if (y <= 4.7e-64) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 6e-8) {
tmp = t_1;
} else if (y <= 1.55e+26) {
tmp = x / (1.0 + (a + (y * (b / t))));
} 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 = y * (z / ((y * b) + (t * (a + 1.0d0))))
t_2 = (z / b) + ((t * (x / b)) / y)
if (y <= (-1.1d+110)) then
tmp = t_2
else if (y <= (-1.65d-96)) then
tmp = t_1
else if (y <= 4.7d-64) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 6d-8) then
tmp = t_1
else if (y <= 1.55d+26) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
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 = y * (z / ((y * b) + (t * (a + 1.0))));
double t_2 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1.1e+110) {
tmp = t_2;
} else if (y <= -1.65e-96) {
tmp = t_1;
} else if (y <= 4.7e-64) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 6e-8) {
tmp = t_1;
} else if (y <= 1.55e+26) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (z / ((y * b) + (t * (a + 1.0)))) t_2 = (z / b) + ((t * (x / b)) / y) tmp = 0 if y <= -1.1e+110: tmp = t_2 elif y <= -1.65e-96: tmp = t_1 elif y <= 4.7e-64: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 6e-8: tmp = t_1 elif y <= 1.55e+26: tmp = x / (1.0 + (a + (y * (b / t)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(z / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))))) t_2 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) tmp = 0.0 if (y <= -1.1e+110) tmp = t_2; elseif (y <= -1.65e-96) tmp = t_1; elseif (y <= 4.7e-64) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 6e-8) tmp = t_1; elseif (y <= 1.55e+26) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (z / ((y * b) + (t * (a + 1.0)))); t_2 = (z / b) + ((t * (x / b)) / y); tmp = 0.0; if (y <= -1.1e+110) tmp = t_2; elseif (y <= -1.65e-96) tmp = t_1; elseif (y <= 4.7e-64) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 6e-8) tmp = t_1; elseif (y <= 1.55e+26) tmp = x / (1.0 + (a + (y * (b / t)))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(z / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+110], t$95$2, If[LessEqual[y, -1.65e-96], t$95$1, If[LessEqual[y, 4.7e-64], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e-8], t$95$1, If[LessEqual[y, 1.55e+26], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{y \cdot b + t \cdot \left(a + 1\right)}\\
t_2 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+110}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-8}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.09999999999999996e110 or 1.55e26 < y Initial program 42.9%
associate-/l*46.5%
associate-/l*58.2%
Simplified58.2%
Taylor expanded in b around inf 29.5%
Taylor expanded in z around inf 69.6%
Taylor expanded in z around 0 68.1%
associate-/r*70.7%
associate-/l*73.6%
associate-*l/71.8%
*-commutative71.8%
associate-*r/73.6%
Simplified73.6%
if -1.09999999999999996e110 < y < -1.64999999999999995e-96 or 4.6999999999999998e-64 < y < 5.99999999999999946e-8Initial program 76.5%
associate-/l*76.7%
associate-/l*74.7%
Simplified74.7%
Taylor expanded in x around 0 58.6%
associate-/l*60.7%
+-commutative60.7%
associate-*l/58.6%
*-commutative58.6%
fma-undefine58.6%
Simplified58.6%
Taylor expanded in t around 0 72.0%
if -1.64999999999999995e-96 < y < 4.6999999999999998e-64Initial program 97.5%
associate-/l*91.2%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in x around inf 85.6%
if 5.99999999999999946e-8 < y < 1.55e26Initial program 82.3%
associate-/l*82.5%
associate-/l*82.5%
Simplified82.5%
clear-num82.5%
un-div-inv82.5%
Applied egg-rr82.5%
clear-num82.5%
un-div-inv82.2%
Applied egg-rr82.2%
Taylor expanded in x around inf 64.8%
associate-*l/64.8%
*-commutative64.8%
Simplified64.8%
Final simplification77.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* t (/ x b)) y))))
(if (<= y -1e+82)
t_1
(if (<= y -5000.0)
(/ (+ x (* y (/ z t))) a)
(if (or (<= y -1.45e-116) (not (<= y 2.3e+27))) t_1 (/ x (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1e+82) {
tmp = t_1;
} else if (y <= -5000.0) {
tmp = (x + (y * (z / t))) / a;
} else if ((y <= -1.45e-116) || !(y <= 2.3e+27)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t * (x / b)) / y)
if (y <= (-1d+82)) then
tmp = t_1
else if (y <= (-5000.0d0)) then
tmp = (x + (y * (z / t))) / a
else if ((y <= (-1.45d-116)) .or. (.not. (y <= 2.3d+27))) then
tmp = t_1
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 t_1 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1e+82) {
tmp = t_1;
} else if (y <= -5000.0) {
tmp = (x + (y * (z / t))) / a;
} else if ((y <= -1.45e-116) || !(y <= 2.3e+27)) {
tmp = t_1;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t * (x / b)) / y) tmp = 0 if y <= -1e+82: tmp = t_1 elif y <= -5000.0: tmp = (x + (y * (z / t))) / a elif (y <= -1.45e-116) or not (y <= 2.3e+27): tmp = t_1 else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) tmp = 0.0 if (y <= -1e+82) tmp = t_1; elseif (y <= -5000.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif ((y <= -1.45e-116) || !(y <= 2.3e+27)) tmp = t_1; else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t * (x / b)) / y); tmp = 0.0; if (y <= -1e+82) tmp = t_1; elseif (y <= -5000.0) tmp = (x + (y * (z / t))) / a; elseif ((y <= -1.45e-116) || ~((y <= 2.3e+27))) tmp = t_1; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+82], t$95$1, If[LessEqual[y, -5000.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[Or[LessEqual[y, -1.45e-116], N[Not[LessEqual[y, 2.3e+27]], $MachinePrecision]], t$95$1, N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5000:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-116} \lor \neg \left(y \leq 2.3 \cdot 10^{+27}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -9.9999999999999996e81 or -5e3 < y < -1.4499999999999999e-116 or 2.3000000000000001e27 < y Initial program 51.5%
associate-/l*54.4%
associate-/l*63.0%
Simplified63.0%
Taylor expanded in b around inf 35.2%
Taylor expanded in z around inf 66.9%
Taylor expanded in z around 0 66.6%
associate-/r*68.8%
associate-/l*71.0%
associate-*l/69.6%
*-commutative69.6%
associate-*r/71.0%
Simplified71.0%
if -9.9999999999999996e81 < y < -5e3Initial program 72.7%
associate-/l*72.9%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in a around inf 52.2%
if -1.4499999999999999e-116 < y < 2.3000000000000001e27Initial program 93.3%
associate-/l*88.0%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in y around 0 66.7%
Final simplification67.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* t (/ x b)) y))))
(if (<= y -8.5e+77)
t_1
(if (<= y -13000.0)
(/ (+ x (* y (/ z t))) a)
(if (<= y -3.5e-94)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= y 1.15e+27) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -8.5e+77) {
tmp = t_1;
} else if (y <= -13000.0) {
tmp = (x + (y * (z / t))) / a;
} else if (y <= -3.5e-94) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= 1.15e+27) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t * (x / b)) / y)
if (y <= (-8.5d+77)) then
tmp = t_1
else if (y <= (-13000.0d0)) then
tmp = (x + (y * (z / t))) / a
else if (y <= (-3.5d-94)) then
tmp = (z / b) + ((x * t) / (y * b))
else if (y <= 1.15d+27) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -8.5e+77) {
tmp = t_1;
} else if (y <= -13000.0) {
tmp = (x + (y * (z / t))) / a;
} else if (y <= -3.5e-94) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (y <= 1.15e+27) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t * (x / b)) / y) tmp = 0 if y <= -8.5e+77: tmp = t_1 elif y <= -13000.0: tmp = (x + (y * (z / t))) / a elif y <= -3.5e-94: tmp = (z / b) + ((x * t) / (y * b)) elif y <= 1.15e+27: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) tmp = 0.0 if (y <= -8.5e+77) tmp = t_1; elseif (y <= -13000.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (y <= -3.5e-94) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (y <= 1.15e+27) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t * (x / b)) / y); tmp = 0.0; if (y <= -8.5e+77) tmp = t_1; elseif (y <= -13000.0) tmp = (x + (y * (z / t))) / a; elseif (y <= -3.5e-94) tmp = (z / b) + ((x * t) / (y * b)); elseif (y <= 1.15e+27) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e+77], t$95$1, If[LessEqual[y, -13000.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -3.5e-94], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+27], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -13000:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-94}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+27}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.50000000000000018e77 or 1.15e27 < y Initial program 45.7%
associate-/l*48.9%
associate-/l*59.7%
Simplified59.7%
Taylor expanded in b around inf 31.3%
Taylor expanded in z around inf 69.1%
Taylor expanded in z around 0 67.7%
associate-/r*70.1%
associate-/l*72.8%
associate-*l/71.1%
*-commutative71.1%
associate-*r/72.8%
Simplified72.8%
if -8.50000000000000018e77 < y < -13000Initial program 72.7%
associate-/l*72.9%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in a around inf 52.2%
if -13000 < y < -3.49999999999999998e-94Initial program 87.0%
associate-/l*86.8%
associate-/l*80.5%
Simplified80.5%
Taylor expanded in b around inf 58.1%
Taylor expanded in t around 0 58.4%
if -3.49999999999999998e-94 < y < 1.15e27Initial program 93.5%
associate-/l*88.4%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in x around inf 79.3%
Final simplification73.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* t (/ x b)) y))))
(if (<= y -1.65e+98)
t_1
(if (<= y -2.1e-96)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= y 2.4e+27) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1.65e+98) {
tmp = t_1;
} else if (y <= -2.1e-96) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 2.4e+27) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t * (x / b)) / y)
if (y <= (-1.65d+98)) then
tmp = t_1
else if (y <= (-2.1d-96)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (y <= 2.4d+27) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t * (x / b)) / y);
double tmp;
if (y <= -1.65e+98) {
tmp = t_1;
} else if (y <= -2.1e-96) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 2.4e+27) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t * (x / b)) / y) tmp = 0 if y <= -1.65e+98: tmp = t_1 elif y <= -2.1e-96: tmp = (x + (y * (z / t))) / (a + 1.0) elif y <= 2.4e+27: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)) tmp = 0.0 if (y <= -1.65e+98) tmp = t_1; elseif (y <= -2.1e-96) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (y <= 2.4e+27) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t * (x / b)) / y); tmp = 0.0; if (y <= -1.65e+98) tmp = t_1; elseif (y <= -2.1e-96) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (y <= 2.4e+27) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+98], t$95$1, If[LessEqual[y, -2.1e-96], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+27], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+98}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-96}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+27}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.65000000000000014e98 or 2.39999999999999998e27 < y Initial program 43.1%
associate-/l*46.6%
associate-/l*58.1%
Simplified58.1%
Taylor expanded in b around inf 30.8%
Taylor expanded in z around inf 70.2%
Taylor expanded in z around 0 68.7%
associate-/r*71.3%
associate-/l*74.1%
associate-*l/72.3%
*-commutative72.3%
associate-*r/74.1%
Simplified74.1%
if -1.65000000000000014e98 < y < -2.10000000000000001e-96Initial program 80.3%
associate-/l*80.3%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in y around 0 52.8%
if -2.10000000000000001e-96 < y < 2.39999999999999998e27Initial program 93.5%
associate-/l*88.4%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in x around inf 79.3%
Final simplification72.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -9e+78)
(/ z b)
(if (<= y -3000.0)
(/ (+ x (* y (/ z t))) a)
(if (or (<= y -3.5e-94) (not (<= y 1.2e+27))) (/ z b) (/ x (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9e+78) {
tmp = z / b;
} else if (y <= -3000.0) {
tmp = (x + (y * (z / t))) / a;
} else if ((y <= -3.5e-94) || !(y <= 1.2e+27)) {
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 <= (-9d+78)) then
tmp = z / b
else if (y <= (-3000.0d0)) then
tmp = (x + (y * (z / t))) / a
else if ((y <= (-3.5d-94)) .or. (.not. (y <= 1.2d+27))) 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 <= -9e+78) {
tmp = z / b;
} else if (y <= -3000.0) {
tmp = (x + (y * (z / t))) / a;
} else if ((y <= -3.5e-94) || !(y <= 1.2e+27)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9e+78: tmp = z / b elif y <= -3000.0: tmp = (x + (y * (z / t))) / a elif (y <= -3.5e-94) or not (y <= 1.2e+27): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9e+78) tmp = Float64(z / b); elseif (y <= -3000.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif ((y <= -3.5e-94) || !(y <= 1.2e+27)) 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 <= -9e+78) tmp = z / b; elseif (y <= -3000.0) tmp = (x + (y * (z / t))) / a; elseif ((y <= -3.5e-94) || ~((y <= 1.2e+27))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9e+78], N[(z / b), $MachinePrecision], If[LessEqual[y, -3000.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[Or[LessEqual[y, -3.5e-94], N[Not[LessEqual[y, 1.2e+27]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+78}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -3000:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-94} \lor \neg \left(y \leq 1.2 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -8.9999999999999999e78 or -3e3 < y < -3.49999999999999998e-94 or 1.19999999999999999e27 < y Initial program 50.4%
associate-/l*53.3%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in y around inf 62.9%
if -8.9999999999999999e78 < y < -3e3Initial program 72.7%
associate-/l*72.9%
associate-/l*72.8%
Simplified72.8%
Taylor expanded in a around inf 52.2%
if -3.49999999999999998e-94 < y < 1.19999999999999999e27Initial program 93.5%
associate-/l*88.4%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in y around 0 65.8%
Final simplification63.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7e-48) (not (<= t 1.9e-24))) (/ x (+ 1.0 (+ a (* 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 <= -7e-48) || !(t <= 1.9e-24)) {
tmp = x / (1.0 + (a + (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 <= (-7d-48)) .or. (.not. (t <= 1.9d-24))) then
tmp = x / (1.0d0 + (a + (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 <= -7e-48) || !(t <= 1.9e-24)) {
tmp = x / (1.0 + (a + (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 <= -7e-48) or not (t <= 1.9e-24): tmp = x / (1.0 + (a + (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 <= -7e-48) || !(t <= 1.9e-24)) tmp = Float64(x / Float64(1.0 + Float64(a + 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 <= -7e-48) || ~((t <= 1.9e-24))) tmp = x / (1.0 + (a + (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, -7e-48], N[Not[LessEqual[t, 1.9e-24]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $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 -7 \cdot 10^{-48} \lor \neg \left(t \leq 1.9 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -6.99999999999999982e-48 or 1.90000000000000013e-24 < t Initial program 78.8%
associate-/l*81.8%
associate-/l*91.9%
Simplified91.9%
clear-num91.9%
un-div-inv92.0%
Applied egg-rr92.0%
clear-num92.0%
un-div-inv92.0%
Applied egg-rr92.0%
Taylor expanded in x around inf 65.6%
associate-*l/70.3%
*-commutative70.3%
Simplified70.3%
if -6.99999999999999982e-48 < t < 1.90000000000000013e-24Initial program 62.2%
associate-/l*58.0%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in b around inf 41.3%
Taylor expanded in t around 0 67.6%
Final simplification68.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.4e+44) (not (<= t 1.4e+60))) (/ x (+ a 1.0)) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e+44) || !(t <= 1.4e+60)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.4d+44)) .or. (.not. (t <= 1.4d+60))) then
tmp = x / (a + 1.0d0)
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e+44) || !(t <= 1.4e+60)) {
tmp = x / (a + 1.0);
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.4e+44) or not (t <= 1.4e+60): tmp = x / (a + 1.0) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.4e+44) || !(t <= 1.4e+60)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.4e+44) || ~((t <= 1.4e+60))) tmp = x / (a + 1.0); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.4e+44], N[Not[LessEqual[t, 1.4e+60]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+44} \lor \neg \left(t \leq 1.4 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.4e44 or 1.4e60 < t Initial program 77.5%
associate-/l*81.7%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in y around 0 67.6%
if -1.4e44 < t < 1.4e60Initial program 66.1%
associate-/l*62.8%
associate-/l*60.5%
Simplified60.5%
Taylor expanded in b around inf 39.0%
Taylor expanded in t around 0 63.5%
Final simplification65.0%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.6e+46) (/ x a) (if (<= t 1.9e+60) (/ z b) (if (<= t 1.05e+209) (/ x a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.6e+46) {
tmp = x / a;
} else if (t <= 1.9e+60) {
tmp = z / b;
} else if (t <= 1.05e+209) {
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.6d+46)) then
tmp = x / a
else if (t <= 1.9d+60) then
tmp = z / b
else if (t <= 1.05d+209) 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.6e+46) {
tmp = x / a;
} else if (t <= 1.9e+60) {
tmp = z / b;
} else if (t <= 1.05e+209) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.6e+46: tmp = x / a elif t <= 1.9e+60: tmp = z / b elif t <= 1.05e+209: tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.6e+46) tmp = Float64(x / a); elseif (t <= 1.9e+60) tmp = Float64(z / b); elseif (t <= 1.05e+209) 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.6e+46) tmp = x / a; elseif (t <= 1.9e+60) tmp = z / b; elseif (t <= 1.05e+209) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.6e+46], N[(x / a), $MachinePrecision], If[LessEqual[t, 1.9e+60], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.05e+209], N[(x / a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+46}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+60}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+209}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.5999999999999999e46 or 1.90000000000000005e60 < t < 1.05e209Initial program 76.1%
associate-/l*81.6%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in y around 0 68.8%
Taylor expanded in a around inf 48.5%
if -1.5999999999999999e46 < t < 1.90000000000000005e60Initial program 66.1%
associate-/l*62.8%
associate-/l*60.5%
Simplified60.5%
Taylor expanded in y around inf 54.0%
if 1.05e209 < t Initial program 82.0%
associate-/l*82.2%
associate-/l*91.1%
Simplified91.1%
Taylor expanded in y around 0 63.9%
Taylor expanded in a around 0 42.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.3e-94) (not (<= y 1e+26))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.3e-94) || !(y <= 1e+26)) {
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 <= (-2.3d-94)) .or. (.not. (y <= 1d+26))) 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 <= -2.3e-94) || !(y <= 1e+26)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.3e-94) or not (y <= 1e+26): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.3e-94) || !(y <= 1e+26)) 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 <= -2.3e-94) || ~((y <= 1e+26))) 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, -2.3e-94], N[Not[LessEqual[y, 1e+26]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-94} \lor \neg \left(y \leq 10^{+26}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -2.2999999999999999e-94 or 1.00000000000000005e26 < y Initial program 53.1%
associate-/l*55.7%
associate-/l*63.4%
Simplified63.4%
Taylor expanded in y around inf 57.8%
if -2.2999999999999999e-94 < y < 1.00000000000000005e26Initial program 93.5%
associate-/l*88.4%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in y around 0 65.8%
Final simplification61.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 2.35e-5))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 2.35e-5)) {
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 <= (-1.0d0)) .or. (.not. (a <= 2.35d-5))) 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 <= -1.0) || !(a <= 2.35e-5)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 2.35e-5): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 2.35e-5)) 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 <= -1.0) || ~((a <= 2.35e-5))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 2.35e-5]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 2.35 \cdot 10^{-5}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 2.34999999999999986e-5 < a Initial program 74.7%
associate-/l*76.3%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in y around 0 49.4%
Taylor expanded in a around inf 47.1%
if -1 < a < 2.34999999999999986e-5Initial program 65.6%
associate-/l*62.7%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in y around 0 28.8%
Taylor expanded in a around 0 27.8%
Final simplification37.5%
(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 70.1%
associate-/l*69.5%
associate-/l*72.4%
Simplified72.4%
Taylor expanded in y around 0 39.1%
Taylor expanded in a around 0 16.0%
(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 2024107
(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))))