
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ 1.0 (+ a t_1)))
(t_4 (* z (+ (/ x (* z t_3)) (/ y (* t t_3))))))
(if (<= t_2 (- INFINITY))
t_4
(if (<= t_2 -1e-304)
t_2
(if (<= t_2 0.0)
(/ (+ (* t (/ x b)) (/ (* y z) b)) y)
(if (<= t_2 5e+295) t_2 (if (<= t_2 INFINITY) t_4 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double t_4 = z * ((x / (z * t_3)) + (y / (t * t_3)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((t * (x / b)) + ((y * z) / b)) / y;
} else if (t_2 <= 5e+295) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double t_4 = z * ((x / (z * t_3)) + (y / (t * t_3)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((t * (x / b)) + ((y * z) / b)) / y;
} else if (t_2 <= 5e+295) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = 1.0 + (a + t_1) t_4 = z * ((x / (z * t_3)) + (y / (t * t_3))) tmp = 0 if t_2 <= -math.inf: tmp = t_4 elif t_2 <= -1e-304: tmp = t_2 elif t_2 <= 0.0: tmp = ((t * (x / b)) + ((y * z) / b)) / y elif t_2 <= 5e+295: tmp = t_2 elif t_2 <= math.inf: tmp = t_4 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(1.0 + Float64(a + t_1)) t_4 = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_4; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(Float64(y * z) / b)) / y); elseif (t_2 <= 5e+295) tmp = t_2; elseif (t_2 <= Inf) tmp = t_4; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = 1.0 + (a + t_1); t_4 = z * ((x / (z * t_3)) + (y / (t * t_3))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_4; elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = ((t * (x / b)) + ((y * z) / b)) / y; elseif (t_2 <= 5e+295) tmp = t_2; elseif (t_2 <= Inf) tmp = t_4; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$4, If[LessEqual[t$95$2, -1e-304], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$2, 5e+295], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$4, N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := 1 + \left(a + t\_1\right)\\
t_4 := z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + \frac{y \cdot z}{b}}{y}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+295}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_4\\
\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 4.99999999999999991e295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 41.5%
+-commutative41.5%
associate-/l*64.9%
fma-define64.9%
+-commutative64.9%
associate-/l*64.6%
fma-define64.6%
Simplified64.6%
Taylor expanded in z around inf 95.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999971e-305 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999991e295Initial program 99.3%
if -9.99999999999999971e-305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 51.0%
+-commutative51.0%
associate-/l*51.0%
fma-define51.0%
+-commutative51.0%
associate-/l*62.1%
fma-define62.1%
Simplified62.1%
Taylor expanded in b around inf 50.3%
Taylor expanded in y around 0 70.1%
associate-/l*73.5%
Simplified73.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%
+-commutative0.0%
associate-/l*0.7%
fma-define0.7%
+-commutative0.7%
associate-/l*17.6%
fma-define17.6%
Simplified17.6%
Taylor expanded in y around inf 91.4%
Final simplification94.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ a t_1)))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(if (<= t_2 -1e-304)
t_2
(if (<= t_2 0.0)
(/ (+ (* t (/ x b)) (/ (* y z) b)) y)
(if (<= t_2 1e+297) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = a + t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((t * (x / b)) + ((y * z) / b)) / y;
} else if (t_2 <= 1e+297) {
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 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = a + t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= -1e-304) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = ((t * (x / b)) + ((y * z) / b)) / y;
} else if (t_2 <= 1e+297) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = a + t_1 tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) elif t_2 <= -1e-304: tmp = t_2 elif t_2 <= 0.0: tmp = ((t * (x / b)) + ((y * z) / b)) / y elif t_2 <= 1e+297: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(a + t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(Float64(y * z) / b)) / y); elseif (t_2 <= 1e+297) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = a + t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); elseif (t_2 <= -1e-304) tmp = t_2; elseif (t_2 <= 0.0) tmp = ((t * (x / b)) + ((y * z) / b)) / y; elseif (t_2 <= 1e+297) 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[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = 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$3 = N[(a + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-304], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$2, 1e+297], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := a + t\_1\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + \frac{y \cdot z}{b}}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+297}:\\
\;\;\;\;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.0Initial program 22.8%
Taylor expanded in a around inf 22.1%
Taylor expanded in z around inf 81.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999971e-305 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e297Initial program 99.3%
if -9.99999999999999971e-305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 51.0%
+-commutative51.0%
associate-/l*51.0%
fma-define51.0%
+-commutative51.0%
associate-/l*62.1%
fma-define62.1%
Simplified62.1%
Taylor expanded in b around inf 50.3%
Taylor expanded in y around 0 70.1%
associate-/l*73.5%
Simplified73.5%
if 1e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 18.4%
+-commutative18.4%
associate-/l*26.8%
fma-define26.8%
+-commutative26.8%
associate-/l*37.8%
fma-define37.8%
Simplified37.8%
Taylor expanded in y around inf 80.7%
Final simplification91.8%
(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 (- INFINITY))
(/ z b)
(if (<= t_1 -1e-304)
t_1
(if (<= t_1 0.0)
(/ (+ (* t (/ x b)) (/ (* y z) b)) y)
(if (<= t_1 1e+297) t_1 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z / b;
} else if (t_1 <= -1e-304) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + ((y * z) / b)) / y;
} else if (t_1 <= 1e+297) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z / b;
} else if (t_1 <= -1e-304) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = ((t * (x / b)) + ((y * z) / b)) / y;
} else if (t_1 <= 1e+297) {
tmp = t_1;
} 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 <= -math.inf: tmp = z / b elif t_1 <= -1e-304: tmp = t_1 elif t_1 <= 0.0: tmp = ((t * (x / b)) + ((y * z) / b)) / y elif t_1 <= 1e+297: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z / b); elseif (t_1 <= -1e-304) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(Float64(y * z) / b)) / y); elseif (t_1 <= 1e+297) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = z / b; elseif (t_1 <= -1e-304) tmp = t_1; elseif (t_1 <= 0.0) tmp = ((t * (x / b)) + ((y * z) / b)) / y; elseif (t_1 <= 1e+297) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -1e-304], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 1e+297], t$95$1, 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 -\infty:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + \frac{y \cdot z}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+297}:\\
\;\;\;\;t\_1\\
\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 1e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 19.5%
+-commutative19.5%
associate-/l*32.0%
fma-define32.0%
+-commutative32.0%
associate-/l*40.3%
fma-define40.3%
Simplified40.3%
Taylor expanded in y around inf 76.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.99999999999999971e-305 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e297Initial program 99.3%
if -9.99999999999999971e-305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 51.0%
+-commutative51.0%
associate-/l*51.0%
fma-define51.0%
+-commutative51.0%
associate-/l*62.1%
fma-define62.1%
Simplified62.1%
Taylor expanded in b around inf 50.3%
Taylor expanded in y around 0 70.1%
associate-/l*73.5%
Simplified73.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -1.75e-87)
(/ (+ x (/ y (/ t z))) (+ a 1.0))
(if (<= t 7.4e-221)
(/ z b)
(if (<= t 7.5e-15) (/ t_1 (+ 1.0 (* y (/ b t)))) (/ 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 (t <= -1.75e-87) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 7.4e-221) {
tmp = z / b;
} else if (t <= 7.5e-15) {
tmp = t_1 / (1.0 + (y * (b / t)));
} 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 (t <= (-1.75d-87)) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else if (t <= 7.4d-221) then
tmp = z / b
else if (t <= 7.5d-15) then
tmp = t_1 / (1.0d0 + (y * (b / t)))
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 (t <= -1.75e-87) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 7.4e-221) {
tmp = z / b;
} else if (t <= 7.5e-15) {
tmp = t_1 / (1.0 + (y * (b / t)));
} 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 t <= -1.75e-87: tmp = (x + (y / (t / z))) / (a + 1.0) elif t <= 7.4e-221: tmp = z / b elif t <= 7.5e-15: tmp = t_1 / (1.0 + (y * (b / t))) else: tmp = t_1 / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -1.75e-87) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); elseif (t <= 7.4e-221) tmp = Float64(z / b); elseif (t <= 7.5e-15) tmp = Float64(t_1 / Float64(1.0 + Float64(y * Float64(b / t)))); 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 (t <= -1.75e-87) tmp = (x + (y / (t / z))) / (a + 1.0); elseif (t <= 7.4e-221) tmp = z / b; elseif (t <= 7.5e-15) tmp = t_1 / (1.0 + (y * (b / t))); 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[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e-87], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-221], N[(z / b), $MachinePrecision], If[LessEqual[t, 7.5e-15], N[(t$95$1 / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{-87}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-221}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-15}:\\
\;\;\;\;\frac{t\_1}{1 + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a + 1}\\
\end{array}
\end{array}
if t < -1.75000000000000006e-87Initial program 82.7%
associate-/l*86.1%
associate-/l*90.6%
Simplified90.6%
clear-num90.6%
un-div-inv91.7%
Applied egg-rr91.7%
clear-num91.8%
un-div-inv91.8%
Applied egg-rr91.8%
Taylor expanded in y around 0 75.6%
if -1.75000000000000006e-87 < t < 7.39999999999999971e-221Initial program 55.8%
+-commutative55.8%
associate-/l*49.1%
fma-define49.1%
+-commutative49.1%
associate-/l*44.2%
fma-define44.2%
Simplified44.2%
Taylor expanded in y around inf 65.9%
if 7.39999999999999971e-221 < t < 7.4999999999999996e-15Initial program 91.4%
associate-/l*88.6%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in a around 0 71.6%
if 7.4999999999999996e-15 < t Initial program 81.4%
associate-/l*85.1%
associate-/l*88.8%
Simplified88.8%
clear-num88.9%
un-div-inv88.8%
Applied egg-rr88.8%
Taylor expanded in y around 0 78.3%
Final simplification73.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -4.6e+20)
(/ (+ x (* y (/ z t))) a)
(if (<= a -2.3e-73)
(* x (/ (+ (/ t y) (/ z x)) b))
(if (<= a 6.2e-202)
(+ x (/ (* y z) t))
(if (<= a 6.8e-7)
(/ x (+ 1.0 (/ (* y b) t)))
(/ (+ x (/ y (/ t z))) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.6e+20) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -2.3e-73) {
tmp = x * (((t / y) + (z / x)) / b);
} else if (a <= 6.2e-202) {
tmp = x + ((y * z) / t);
} else if (a <= 6.8e-7) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.6d+20)) then
tmp = (x + (y * (z / t))) / a
else if (a <= (-2.3d-73)) then
tmp = x * (((t / y) + (z / x)) / b)
else if (a <= 6.2d-202) then
tmp = x + ((y * z) / t)
else if (a <= 6.8d-7) then
tmp = x / (1.0d0 + ((y * b) / t))
else
tmp = (x + (y / (t / z))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.6e+20) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -2.3e-73) {
tmp = x * (((t / y) + (z / x)) / b);
} else if (a <= 6.2e-202) {
tmp = x + ((y * z) / t);
} else if (a <= 6.8e-7) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.6e+20: tmp = (x + (y * (z / t))) / a elif a <= -2.3e-73: tmp = x * (((t / y) + (z / x)) / b) elif a <= 6.2e-202: tmp = x + ((y * z) / t) elif a <= 6.8e-7: tmp = x / (1.0 + ((y * b) / t)) else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.6e+20) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (a <= -2.3e-73) tmp = Float64(x * Float64(Float64(Float64(t / y) + Float64(z / x)) / b)); elseif (a <= 6.2e-202) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 6.8e-7) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.6e+20) tmp = (x + (y * (z / t))) / a; elseif (a <= -2.3e-73) tmp = x * (((t / y) + (z / x)) / b); elseif (a <= 6.2e-202) tmp = x + ((y * z) / t); elseif (a <= 6.8e-7) tmp = x / (1.0 + ((y * b) / t)); else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.6e+20], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -2.3e-73], N[(x * N[(N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e-202], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e-7], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{+20}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-73}:\\
\;\;\;\;x \cdot \frac{\frac{t}{y} + \frac{z}{x}}{b}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-202}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if a < -4.6e20Initial program 78.0%
associate-/l*80.0%
associate-/l*85.8%
Simplified85.8%
clear-num85.9%
un-div-inv85.9%
Applied egg-rr85.9%
Taylor expanded in a around inf 67.6%
if -4.6e20 < a < -2.29999999999999988e-73Initial program 75.1%
+-commutative75.1%
associate-/l*79.8%
fma-define79.8%
+-commutative79.8%
associate-/l*69.7%
fma-define69.7%
Simplified69.7%
Taylor expanded in b around inf 64.1%
Taylor expanded in x around inf 64.1%
Taylor expanded in b around 0 59.3%
if -2.29999999999999988e-73 < a < 6.2e-202Initial program 73.3%
+-commutative73.3%
associate-/l*73.3%
fma-define73.4%
+-commutative73.4%
associate-/l*77.4%
fma-define77.4%
Simplified77.4%
Taylor expanded in b around 0 61.4%
Taylor expanded in a around 0 61.4%
if 6.2e-202 < a < 6.79999999999999948e-7Initial program 80.4%
Taylor expanded in a around 0 79.7%
Taylor expanded in x around inf 64.2%
if 6.79999999999999948e-7 < a Initial program 78.3%
associate-/l*79.3%
associate-/l*77.9%
Simplified77.9%
clear-num77.9%
un-div-inv79.3%
Applied egg-rr79.3%
Taylor expanded in a around inf 62.4%
clear-num79.4%
un-div-inv79.4%
Applied egg-rr62.5%
Final simplification63.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)))
(if (<= a -7e+90)
(/ (+ x (* y (/ z t))) a)
(if (<= a -1.32e-29)
(/ x (+ a t_1))
(if (<= a 7e-200)
(+ x (/ (* y z) t))
(if (<= a 6.8e-7) (/ x (+ 1.0 t_1)) (/ (+ x (/ y (/ t z))) a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double tmp;
if (a <= -7e+90) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -1.32e-29) {
tmp = x / (a + t_1);
} else if (a <= 7e-200) {
tmp = x + ((y * z) / t);
} else if (a <= 6.8e-7) {
tmp = x / (1.0 + t_1);
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * b) / t
if (a <= (-7d+90)) then
tmp = (x + (y * (z / t))) / a
else if (a <= (-1.32d-29)) then
tmp = x / (a + t_1)
else if (a <= 7d-200) then
tmp = x + ((y * z) / t)
else if (a <= 6.8d-7) then
tmp = x / (1.0d0 + t_1)
else
tmp = (x + (y / (t / z))) / a
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 * b) / t;
double tmp;
if (a <= -7e+90) {
tmp = (x + (y * (z / t))) / a;
} else if (a <= -1.32e-29) {
tmp = x / (a + t_1);
} else if (a <= 7e-200) {
tmp = x + ((y * z) / t);
} else if (a <= 6.8e-7) {
tmp = x / (1.0 + t_1);
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t tmp = 0 if a <= -7e+90: tmp = (x + (y * (z / t))) / a elif a <= -1.32e-29: tmp = x / (a + t_1) elif a <= 7e-200: tmp = x + ((y * z) / t) elif a <= 6.8e-7: tmp = x / (1.0 + t_1) else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) tmp = 0.0 if (a <= -7e+90) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (a <= -1.32e-29) tmp = Float64(x / Float64(a + t_1)); elseif (a <= 7e-200) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 6.8e-7) tmp = Float64(x / Float64(1.0 + t_1)); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; tmp = 0.0; if (a <= -7e+90) tmp = (x + (y * (z / t))) / a; elseif (a <= -1.32e-29) tmp = x / (a + t_1); elseif (a <= 7e-200) tmp = x + ((y * z) / t); elseif (a <= 6.8e-7) tmp = x / (1.0 + t_1); else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[a, -7e+90], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.32e-29], N[(x / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e-200], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.8e-7], N[(x / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
\mathbf{if}\;a \leq -7 \cdot 10^{+90}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;a \leq -1.32 \cdot 10^{-29}:\\
\;\;\;\;\frac{x}{a + t\_1}\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-200}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{1 + t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if a < -6.9999999999999997e90Initial program 75.3%
associate-/l*78.4%
associate-/l*87.4%
Simplified87.4%
clear-num87.4%
un-div-inv87.4%
Applied egg-rr87.4%
Taylor expanded in a around inf 74.4%
if -6.9999999999999997e90 < a < -1.3200000000000001e-29Initial program 75.5%
Taylor expanded in a around inf 73.1%
Taylor expanded in x around inf 58.9%
if -1.3200000000000001e-29 < a < 7.00000000000000045e-200Initial program 75.1%
+-commutative75.1%
associate-/l*75.1%
fma-define75.1%
+-commutative75.1%
associate-/l*76.3%
fma-define76.3%
Simplified76.3%
Taylor expanded in b around 0 59.7%
Taylor expanded in a around 0 59.7%
if 7.00000000000000045e-200 < a < 6.79999999999999948e-7Initial program 80.4%
Taylor expanded in a around 0 79.7%
Taylor expanded in x around inf 64.2%
if 6.79999999999999948e-7 < a Initial program 78.3%
associate-/l*79.3%
associate-/l*77.9%
Simplified77.9%
clear-num77.9%
un-div-inv79.3%
Applied egg-rr79.3%
Taylor expanded in a around inf 62.4%
clear-num79.4%
un-div-inv79.4%
Applied egg-rr62.5%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ a 1.0) -500000.0) (not (<= (+ a 1.0) 20000000000.0))) (/ (+ x (* y (/ z t))) (+ a (* y (/ b t)))) (/ (+ x (/ (* y z) t)) (+ 1.0 (/ (* y b) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a + 1.0) <= -500000.0) || !((a + 1.0) <= 20000000000.0)) {
tmp = (x + (y * (z / t))) / (a + (y * (b / t)));
} else {
tmp = (x + ((y * z) / t)) / (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 (((a + 1.0d0) <= (-500000.0d0)) .or. (.not. ((a + 1.0d0) <= 20000000000.0d0))) then
tmp = (x + (y * (z / t))) / (a + (y * (b / t)))
else
tmp = (x + ((y * z) / t)) / (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 (((a + 1.0) <= -500000.0) || !((a + 1.0) <= 20000000000.0)) {
tmp = (x + (y * (z / t))) / (a + (y * (b / t)));
} else {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a + 1.0) <= -500000.0) or not ((a + 1.0) <= 20000000000.0): tmp = (x + (y * (z / t))) / (a + (y * (b / t))) else: tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a + 1.0) <= -500000.0) || !(Float64(a + 1.0) <= 20000000000.0)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + Float64(Float64(y * b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a + 1.0) <= -500000.0) || ~(((a + 1.0) <= 20000000000.0))) tmp = (x + (y * (z / t))) / (a + (y * (b / t))); else tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -500000.0], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 20000000000.0]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -500000 \lor \neg \left(a + 1 \leq 20000000000\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if (+.f64 a #s(literal 1 binary64)) < -5e5 or 2e10 < (+.f64 a #s(literal 1 binary64)) Initial program 77.3%
associate-/l*78.2%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in a around inf 80.1%
if -5e5 < (+.f64 a #s(literal 1 binary64)) < 2e10Initial program 76.9%
Taylor expanded in a around 0 75.2%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))) (t_2 (* y (/ b t))))
(if (or (<= (+ a 1.0) -500000.0) (not (<= (+ a 1.0) 2.0)))
(/ t_1 (+ a t_2))
(/ t_1 (+ 1.0 t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double t_2 = y * (b / t);
double tmp;
if (((a + 1.0) <= -500000.0) || !((a + 1.0) <= 2.0)) {
tmp = t_1 / (a + t_2);
} else {
tmp = t_1 / (1.0 + t_2);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (z / t))
t_2 = y * (b / t)
if (((a + 1.0d0) <= (-500000.0d0)) .or. (.not. ((a + 1.0d0) <= 2.0d0))) then
tmp = t_1 / (a + t_2)
else
tmp = t_1 / (1.0d0 + t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double t_2 = y * (b / t);
double tmp;
if (((a + 1.0) <= -500000.0) || !((a + 1.0) <= 2.0)) {
tmp = t_1 / (a + t_2);
} else {
tmp = t_1 / (1.0 + t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) t_2 = y * (b / t) tmp = 0 if ((a + 1.0) <= -500000.0) or not ((a + 1.0) <= 2.0): tmp = t_1 / (a + t_2) else: tmp = t_1 / (1.0 + t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) t_2 = Float64(y * Float64(b / t)) tmp = 0.0 if ((Float64(a + 1.0) <= -500000.0) || !(Float64(a + 1.0) <= 2.0)) tmp = Float64(t_1 / Float64(a + t_2)); else tmp = Float64(t_1 / Float64(1.0 + t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); t_2 = y * (b / t); tmp = 0.0; if (((a + 1.0) <= -500000.0) || ~(((a + 1.0) <= 2.0))) tmp = t_1 / (a + t_2); else tmp = t_1 / (1.0 + t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -500000.0], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0]], $MachinePrecision]], N[(t$95$1 / N[(a + t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
t_2 := y \cdot \frac{b}{t}\\
\mathbf{if}\;a + 1 \leq -500000 \lor \neg \left(a + 1 \leq 2\right):\\
\;\;\;\;\frac{t\_1}{a + t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{1 + t\_2}\\
\end{array}
\end{array}
if (+.f64 a #s(literal 1 binary64)) < -5e5 or 2 < (+.f64 a #s(literal 1 binary64)) Initial program 76.6%
associate-/l*78.1%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in a around inf 78.5%
if -5e5 < (+.f64 a #s(literal 1 binary64)) < 2Initial program 77.4%
associate-/l*76.7%
associate-/l*77.3%
Simplified77.3%
Taylor expanded in a around 0 75.5%
Final simplification76.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.12e-164) (not (<= t 4.1e-254))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (+ (* y z) (* x t)) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.12e-164) || !(t <= 4.1e-254)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = ((y * z) + (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.12d-164)) .or. (.not. (t <= 4.1d-254))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = ((y * z) + (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.12e-164) || !(t <= 4.1e-254)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = ((y * z) + (x * t)) / (y * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.12e-164) or not (t <= 4.1e-254): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = ((y * z) + (x * t)) / (y * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.12e-164) || !(t <= 4.1e-254)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(Float64(y * z) + 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.12e-164) || ~((t <= 4.1e-254))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = ((y * z) + (x * t)) / (y * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.12e-164], N[Not[LessEqual[t, 4.1e-254]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{-164} \lor \neg \left(t \leq 4.1 \cdot 10^{-254}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.12e-164 or 4.10000000000000017e-254 < t Initial program 82.0%
associate-/l*84.1%
associate-/l*86.4%
Simplified86.4%
if -1.12e-164 < t < 4.10000000000000017e-254Initial program 52.7%
+-commutative52.7%
associate-/l*43.7%
fma-define43.7%
+-commutative43.7%
associate-/l*38.8%
fma-define38.8%
Simplified38.8%
Taylor expanded in b around inf 61.3%
Taylor expanded in t around 0 77.2%
Final simplification84.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ y (/ t z)))))
(if (<= t -1.32e-164)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 5.4e-255)
(/ (+ (* y z) (* x t)) (* y b))
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double tmp;
if (t <= -1.32e-164) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 5.4e-255) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (t / z))
if (t <= (-1.32d-164)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 5.4d-255) then
tmp = ((y * z) + (x * t)) / (y * b)
else
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y / (t / z));
double tmp;
if (t <= -1.32e-164) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 5.4e-255) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y / (t / z)) tmp = 0 if t <= -1.32e-164: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 5.4e-255: tmp = ((y * z) + (x * t)) / (y * b) else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y / Float64(t / z))) tmp = 0.0 if (t <= -1.32e-164) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 5.4e-255) tmp = Float64(Float64(Float64(y * z) + Float64(x * t)) / Float64(y * b)); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y / (t / z)); tmp = 0.0; if (t <= -1.32e-164) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 5.4e-255) tmp = ((y * z) + (x * t)) / (y * b); else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.32e-164], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-255], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;t \leq -1.32 \cdot 10^{-164}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-255}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -1.3199999999999999e-164Initial program 81.3%
associate-/l*84.1%
associate-/l*87.0%
Simplified87.0%
clear-num87.0%
un-div-inv88.0%
Applied egg-rr88.0%
clear-num88.0%
un-div-inv88.0%
Applied egg-rr88.0%
if -1.3199999999999999e-164 < t < 5.40000000000000032e-255Initial program 52.7%
+-commutative52.7%
associate-/l*43.7%
fma-define43.7%
+-commutative43.7%
associate-/l*38.8%
fma-define38.8%
Simplified38.8%
Taylor expanded in b around inf 61.3%
Taylor expanded in t around 0 77.2%
if 5.40000000000000032e-255 < t Initial program 82.5%
associate-/l*84.2%
associate-/l*85.8%
Simplified85.8%
clear-num85.8%
un-div-inv85.8%
Applied egg-rr85.9%
Final simplification85.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7.5e-166)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 1.4e-254)
(/ (+ (* y z) (* x t)) (* y b))
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.5e-166) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t <= 1.4e-254) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = (x + (y / (t / z))) / ((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 <= (-7.5d-166)) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 1.4d-254) then
tmp = ((y * z) + (x * t)) / (y * b)
else
tmp = (x + (y / (t / z))) / ((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 <= -7.5e-166) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t <= 1.4e-254) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.5e-166: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) elif t <= 1.4e-254: tmp = ((y * z) + (x * t)) / (y * b) else: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.5e-166) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 1.4e-254) tmp = Float64(Float64(Float64(y * z) + Float64(x * t)) / Float64(y * b)); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / 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 <= -7.5e-166) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); elseif (t <= 1.4e-254) tmp = ((y * z) + (x * t)) / (y * b); else tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.5e-166], 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], If[LessEqual[t, 1.4e-254], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $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 -7.5 \cdot 10^{-166}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-254}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -7.49999999999999947e-166Initial program 81.3%
associate-/l*84.1%
associate-/l*87.0%
Simplified87.0%
clear-num87.0%
un-div-inv88.0%
Applied egg-rr88.0%
if -7.49999999999999947e-166 < t < 1.39999999999999992e-254Initial program 52.7%
+-commutative52.7%
associate-/l*43.7%
fma-define43.7%
+-commutative43.7%
associate-/l*38.8%
fma-define38.8%
Simplified38.8%
Taylor expanded in b around inf 61.3%
Taylor expanded in t around 0 77.2%
if 1.39999999999999992e-254 < t Initial program 82.5%
associate-/l*84.2%
associate-/l*85.8%
Simplified85.8%
clear-num85.8%
un-div-inv85.8%
Applied egg-rr85.9%
Final simplification85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -3.35e-165)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 6e-255)
(/ (+ (* y z) (* x t)) (* y b))
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -3.35e-165) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 6e-255) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-3.35d-165)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 6d-255) then
tmp = ((y * z) + (x * t)) / (y * b)
else
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -3.35e-165) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 6e-255) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -3.35e-165: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 6e-255: tmp = ((y * z) + (x * t)) / (y * b) else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -3.35e-165) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 6e-255) tmp = Float64(Float64(Float64(y * z) + Float64(x * t)) / Float64(y * b)); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -3.35e-165) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 6e-255) tmp = ((y * z) + (x * t)) / (y * b); else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.35e-165], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-255], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -3.35 \cdot 10^{-165}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-255}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -3.3499999999999999e-165Initial program 81.3%
associate-/l*84.1%
associate-/l*87.0%
Simplified87.0%
clear-num87.0%
un-div-inv88.0%
Applied egg-rr88.0%
if -3.3499999999999999e-165 < t < 6.00000000000000004e-255Initial program 52.7%
+-commutative52.7%
associate-/l*43.7%
fma-define43.7%
+-commutative43.7%
associate-/l*38.8%
fma-define38.8%
Simplified38.8%
Taylor expanded in b around inf 61.3%
Taylor expanded in t around 0 77.2%
if 6.00000000000000004e-255 < t Initial program 82.5%
associate-/l*84.2%
associate-/l*85.8%
Simplified85.8%
Final simplification85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= t -1.62e-87)
t_1
(if (<= t 1.18e-197)
(/ z b)
(if (<= t 9.8e+28) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -1.62e-87) {
tmp = t_1;
} else if (t <= 1.18e-197) {
tmp = z / b;
} else if (t <= 9.8e+28) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
if (t <= (-1.62d-87)) then
tmp = t_1
else if (t <= 1.18d-197) then
tmp = z / b
else if (t <= 9.8d+28) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -1.62e-87) {
tmp = t_1;
} else if (t <= 1.18e-197) {
tmp = z / b;
} else if (t <= 9.8e+28) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / (a + 1.0) tmp = 0 if t <= -1.62e-87: tmp = t_1 elif t <= 1.18e-197: tmp = z / b elif t <= 9.8e+28: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.62e-87) tmp = t_1; elseif (t <= 1.18e-197) tmp = Float64(z / b); elseif (t <= 9.8e+28) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y / (t / z))) / (a + 1.0); tmp = 0.0; if (t <= -1.62e-87) tmp = t_1; elseif (t <= 1.18e-197) tmp = z / b; elseif (t <= 9.8e+28) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.62e-87], t$95$1, If[LessEqual[t, 1.18e-197], N[(z / b), $MachinePrecision], If[LessEqual[t, 9.8e+28], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;t \leq -1.62 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{-197}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.6200000000000001e-87 or 9.7999999999999992e28 < t Initial program 82.3%
associate-/l*86.1%
associate-/l*90.4%
Simplified90.4%
clear-num90.4%
un-div-inv91.0%
Applied egg-rr91.0%
clear-num91.0%
un-div-inv91.1%
Applied egg-rr91.1%
Taylor expanded in y around 0 78.2%
if -1.6200000000000001e-87 < t < 1.17999999999999995e-197Initial program 59.1%
+-commutative59.1%
associate-/l*53.0%
fma-define53.0%
+-commutative53.0%
associate-/l*48.4%
fma-define48.4%
Simplified48.4%
Taylor expanded in y around inf 67.0%
if 1.17999999999999995e-197 < t < 9.7999999999999992e28Initial program 87.2%
+-commutative87.2%
associate-/l*84.6%
fma-define84.6%
+-commutative84.6%
associate-/l*82.0%
fma-define82.0%
Simplified82.0%
Taylor expanded in z around 0 63.8%
Final simplification73.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0))))
(if (<= t -3.25e-88)
t_1
(if (<= t 8.5e-191)
(/ z b)
(if (<= t 3.05e+31) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -3.25e-88) {
tmp = t_1;
} else if (t <= 8.5e-191) {
tmp = z / b;
} else if (t <= 3.05e+31) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / (a + 1.0d0)
if (t <= (-3.25d-88)) then
tmp = t_1
else if (t <= 8.5d-191) then
tmp = z / b
else if (t <= 3.05d+31) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -3.25e-88) {
tmp = t_1;
} else if (t <= 8.5e-191) {
tmp = z / b;
} else if (t <= 3.05e+31) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / (a + 1.0) tmp = 0 if t <= -3.25e-88: tmp = t_1 elif t <= 8.5e-191: tmp = z / b elif t <= 3.05e+31: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -3.25e-88) tmp = t_1; elseif (t <= 8.5e-191) tmp = Float64(z / b); elseif (t <= 3.05e+31) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / (a + 1.0); tmp = 0.0; if (t <= -3.25e-88) tmp = t_1; elseif (t <= 8.5e-191) tmp = z / b; elseif (t <= 3.05e+31) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.25e-88], t$95$1, If[LessEqual[t, 8.5e-191], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.05e+31], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -3.25 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-191}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.05 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.25000000000000003e-88 or 3.05000000000000005e31 < t Initial program 82.3%
associate-/l*86.1%
associate-/l*90.4%
Simplified90.4%
clear-num90.4%
un-div-inv91.0%
Applied egg-rr91.0%
Taylor expanded in y around 0 78.2%
if -3.25000000000000003e-88 < t < 8.49999999999999954e-191Initial program 59.1%
+-commutative59.1%
associate-/l*53.0%
fma-define53.0%
+-commutative53.0%
associate-/l*48.4%
fma-define48.4%
Simplified48.4%
Taylor expanded in y around inf 67.0%
if 8.49999999999999954e-191 < t < 3.05000000000000005e31Initial program 87.2%
+-commutative87.2%
associate-/l*84.6%
fma-define84.6%
+-commutative84.6%
associate-/l*82.0%
fma-define82.0%
Simplified82.0%
Taylor expanded in z around 0 63.8%
Final simplification73.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.1e-88) (not (<= t 4e-84))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (/ (+ (* y z) (* x t)) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.1e-88) || !(t <= 4e-84)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = ((y * z) + (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 <= (-5.1d-88)) .or. (.not. (t <= 4d-84))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else
tmp = ((y * z) + (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 <= -5.1e-88) || !(t <= 4e-84)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = ((y * z) + (x * t)) / (y * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.1e-88) or not (t <= 4e-84): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = ((y * z) + (x * t)) / (y * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.1e-88) || !(t <= 4e-84)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = Float64(Float64(Float64(y * z) + 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 <= -5.1e-88) || ~((t <= 4e-84))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = ((y * z) + (x * t)) / (y * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.1e-88], N[Not[LessEqual[t, 4e-84]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.1 \cdot 10^{-88} \lor \neg \left(t \leq 4 \cdot 10^{-84}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -5.10000000000000046e-88 or 4.0000000000000001e-84 < t Initial program 82.2%
associate-/l*85.4%
associate-/l*89.1%
Simplified89.1%
clear-num89.1%
un-div-inv89.6%
Applied egg-rr89.6%
clear-num89.6%
un-div-inv89.7%
Applied egg-rr89.7%
Taylor expanded in y around 0 74.7%
if -5.10000000000000046e-88 < t < 4.0000000000000001e-84Initial program 65.4%
+-commutative65.4%
associate-/l*59.0%
fma-define59.0%
+-commutative59.0%
associate-/l*53.9%
fma-define53.9%
Simplified53.9%
Taylor expanded in b around inf 55.4%
Taylor expanded in t around 0 65.4%
Final simplification71.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.25e+67) (not (<= y 3.2e+184))) (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.25e+67) || !(y <= 3.2e+184)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((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 ((y <= (-2.25d+67)) .or. (.not. (y <= 3.2d+184))) then
tmp = z / b
else
tmp = x / (1.0d0 + (a + ((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 ((y <= -2.25e+67) || !(y <= 3.2e+184)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.25e+67) or not (y <= 3.2e+184): tmp = z / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.25e+67) || !(y <= 3.2e+184)) tmp = Float64(z / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.25e+67) || ~((y <= 3.2e+184))) tmp = z / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.25e+67], N[Not[LessEqual[y, 3.2e+184]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+67} \lor \neg \left(y \leq 3.2 \cdot 10^{+184}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -2.2499999999999999e67 or 3.19999999999999983e184 < y Initial program 43.8%
+-commutative43.8%
associate-/l*51.3%
fma-define51.3%
+-commutative51.3%
associate-/l*63.2%
fma-define63.3%
Simplified63.3%
Taylor expanded in y around inf 65.1%
if -2.2499999999999999e67 < y < 3.19999999999999983e184Initial program 88.1%
+-commutative88.1%
associate-/l*86.0%
fma-define86.0%
+-commutative86.0%
associate-/l*83.4%
fma-define83.4%
Simplified83.4%
Taylor expanded in z around 0 65.4%
Final simplification65.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.8e-88) (not (<= t 1.4e-190))) (/ x (+ 1.0 (+ a (* y (/ b t))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.8e-88) || !(t <= 1.4e-190)) {
tmp = x / (1.0 + (a + (y * (b / t))));
} 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 <= (-4.8d-88)) .or. (.not. (t <= 1.4d-190))) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
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 <= -4.8e-88) || !(t <= 1.4e-190)) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.8e-88) or not (t <= 1.4e-190): tmp = x / (1.0 + (a + (y * (b / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.8e-88) || !(t <= 1.4e-190)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.8e-88) || ~((t <= 1.4e-190))) tmp = x / (1.0 + (a + (y * (b / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.8e-88], N[Not[LessEqual[t, 1.4e-190]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-88} \lor \neg \left(t \leq 1.4 \cdot 10^{-190}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.7999999999999999e-88 or 1.40000000000000003e-190 < t Initial program 83.3%
associate-/l*85.8%
associate-/l*88.8%
Simplified88.8%
clear-num88.8%
un-div-inv89.3%
Applied egg-rr89.3%
clear-num89.3%
un-div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 63.5%
*-commutative63.5%
associate-*r/63.9%
Simplified63.9%
if -4.7999999999999999e-88 < t < 1.40000000000000003e-190Initial program 59.1%
+-commutative59.1%
associate-/l*53.0%
fma-define53.0%
+-commutative53.0%
associate-/l*48.4%
fma-define48.4%
Simplified48.4%
Taylor expanded in y around inf 67.0%
Final simplification64.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.5e+68)
(/ z b)
(if (<= y 3e+84)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(/ (* x (+ (/ t y) (/ z x))) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.5e+68) {
tmp = z / b;
} else if (y <= 3e+84) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (x * ((t / y) + (z / x))) / 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 <= (-5.5d+68)) then
tmp = z / b
else if (y <= 3d+84) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (x * ((t / y) + (z / x))) / 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 <= -5.5e+68) {
tmp = z / b;
} else if (y <= 3e+84) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (x * ((t / y) + (z / x))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.5e+68: tmp = z / b elif y <= 3e+84: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (x * ((t / y) + (z / x))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.5e+68) tmp = Float64(z / b); elseif (y <= 3e+84) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -5.5e+68) tmp = z / b; elseif (y <= 3e+84) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (x * ((t / y) + (z / x))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.5e+68], N[(z / b), $MachinePrecision], If[LessEqual[y, 3e+84], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+68}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\end{array}
\end{array}
if y < -5.5000000000000004e68Initial program 49.6%
+-commutative49.6%
associate-/l*55.8%
fma-define55.8%
+-commutative55.8%
associate-/l*70.4%
fma-define70.4%
Simplified70.4%
Taylor expanded in y around inf 61.9%
if -5.5000000000000004e68 < y < 2.99999999999999996e84Initial program 92.0%
+-commutative92.0%
associate-/l*89.0%
fma-define89.0%
+-commutative89.0%
associate-/l*85.5%
fma-define85.5%
Simplified85.5%
Taylor expanded in z around 0 69.4%
if 2.99999999999999996e84 < y Initial program 48.2%
+-commutative48.2%
associate-/l*55.0%
fma-define55.0%
+-commutative55.0%
associate-/l*59.3%
fma-define59.3%
Simplified59.3%
Taylor expanded in x around inf 43.5%
Taylor expanded in b around inf 57.1%
Final simplification66.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.4e-83) (not (<= t 1.4e-190))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.4e-83) || !(t <= 1.4e-190)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-8.4d-83)) .or. (.not. (t <= 1.4d-190))) then
tmp = x / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.4e-83) || !(t <= 1.4e-190)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.4e-83) or not (t <= 1.4e-190): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.4e-83) || !(t <= 1.4e-190)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.4e-83) || ~((t <= 1.4e-190))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.4e-83], N[Not[LessEqual[t, 1.4e-190]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.4 \cdot 10^{-83} \lor \neg \left(t \leq 1.4 \cdot 10^{-190}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -8.3999999999999996e-83 or 1.40000000000000003e-190 < t Initial program 83.0%
+-commutative83.0%
associate-/l*85.6%
fma-define85.6%
+-commutative85.6%
associate-/l*88.6%
fma-define88.6%
Simplified88.6%
Taylor expanded in y around 0 56.9%
if -8.3999999999999996e-83 < t < 1.40000000000000003e-190Initial program 60.9%
+-commutative60.9%
associate-/l*55.0%
fma-define55.0%
+-commutative55.0%
associate-/l*50.6%
fma-define50.6%
Simplified50.6%
Taylor expanded in y around inf 65.6%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.6e+26) (/ z b) (if (<= y 2.55e-70) (/ x a) (/ 1.0 (/ b z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.6e+26) {
tmp = z / b;
} else if (y <= 2.55e-70) {
tmp = x / a;
} else {
tmp = 1.0 / (b / z);
}
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 <= (-4.6d+26)) then
tmp = z / b
else if (y <= 2.55d-70) then
tmp = x / a
else
tmp = 1.0d0 / (b / z)
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 <= -4.6e+26) {
tmp = z / b;
} else if (y <= 2.55e-70) {
tmp = x / a;
} else {
tmp = 1.0 / (b / z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.6e+26: tmp = z / b elif y <= 2.55e-70: tmp = x / a else: tmp = 1.0 / (b / z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.6e+26) tmp = Float64(z / b); elseif (y <= 2.55e-70) tmp = Float64(x / a); else tmp = Float64(1.0 / Float64(b / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.6e+26) tmp = z / b; elseif (y <= 2.55e-70) tmp = x / a; else tmp = 1.0 / (b / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.6e+26], N[(z / b), $MachinePrecision], If[LessEqual[y, 2.55e-70], N[(x / a), $MachinePrecision], N[(1.0 / N[(b / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-70}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{b}{z}}\\
\end{array}
\end{array}
if y < -4.6000000000000001e26Initial program 54.4%
+-commutative54.4%
associate-/l*59.8%
fma-define59.8%
+-commutative59.8%
associate-/l*72.4%
fma-define72.5%
Simplified72.5%
Taylor expanded in y around inf 56.1%
if -4.6000000000000001e26 < y < 2.55000000000000013e-70Initial program 94.2%
Taylor expanded in a around inf 52.7%
Taylor expanded in y around 0 33.9%
if 2.55000000000000013e-70 < y Initial program 64.2%
+-commutative64.2%
associate-/l*68.0%
fma-define68.0%
+-commutative68.0%
associate-/l*70.5%
fma-define70.5%
Simplified70.5%
Taylor expanded in y around inf 47.6%
clear-num48.0%
inv-pow48.0%
Applied egg-rr48.0%
unpow-148.0%
Simplified48.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.6e+23) (not (<= y 2.3e-72))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e+23) || !(y <= 2.3e-72)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.6d+23)) .or. (.not. (y <= 2.3d-72))) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e+23) || !(y <= 2.3e-72)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e+23) or not (y <= 2.3e-72): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e+23) || !(y <= 2.3e-72)) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e+23) || ~((y <= 2.3e-72))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e+23], N[Not[LessEqual[y, 2.3e-72]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+23} \lor \neg \left(y \leq 2.3 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -3.5999999999999998e23 or 2.29999999999999995e-72 < y Initial program 60.2%
+-commutative60.2%
associate-/l*64.6%
fma-define64.6%
+-commutative64.6%
associate-/l*71.3%
fma-define71.3%
Simplified71.3%
Taylor expanded in y around inf 51.1%
if -3.5999999999999998e23 < y < 2.29999999999999995e-72Initial program 94.2%
Taylor expanded in a around inf 52.7%
Taylor expanded in y around 0 33.9%
Final simplification42.6%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 77.1%
Taylor expanded in a around inf 50.3%
Taylor expanded in y around 0 24.4%
(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 2024165
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))