
(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 14 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)))
(t_2 (+ 1.0 (+ a (/ y (/ t b)))))
(t_3 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_4 (* z (+ (/ (/ x z) t_2) (/ y (* t t_2))))))
(if (<= t_3 -5e+258)
t_4
(if (<= t_3 4e+305)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_3 INFINITY) t_4 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = 1.0 + (a + (y / (t / b)));
double t_3 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_4 = z * (((x / z) / t_2) + (y / (t * t_2)));
double tmp;
if (t_3 <= -5e+258) {
tmp = t_4;
} else if (t_3 <= 4e+305) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= ((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 = x + ((y * z) / t);
double t_2 = 1.0 + (a + (y / (t / b)));
double t_3 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_4 = z * (((x / z) / t_2) + (y / (t * t_2)));
double tmp;
if (t_3 <= -5e+258) {
tmp = t_4;
} else if (t_3 <= 4e+305) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = 1.0 + (a + (y / (t / b))) t_3 = t_1 / ((a + 1.0) + ((y * b) / t)) t_4 = z * (((x / z) / t_2) + (y / (t * t_2))) tmp = 0 if t_3 <= -5e+258: tmp = t_4 elif t_3 <= 4e+305: tmp = t_1 / ((a + 1.0) + (b * (y / t))) elif t_3 <= math.inf: tmp = t_4 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(1.0 + Float64(a + Float64(y / Float64(t / b)))) t_3 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_4 = Float64(z * Float64(Float64(Float64(x / z) / t_2) + Float64(y / Float64(t * t_2)))) tmp = 0.0 if (t_3 <= -5e+258) tmp = t_4; elseif (t_3 <= 4e+305) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_3 <= 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 = x + ((y * z) / t); t_2 = 1.0 + (a + (y / (t / b))); t_3 = t_1 / ((a + 1.0) + ((y * b) / t)); t_4 = z * (((x / z) / t_2) + (y / (t * t_2))); tmp = 0.0; if (t_3 <= -5e+258) tmp = t_4; elseif (t_3 <= 4e+305) tmp = t_1 / ((a + 1.0) + (b * (y / t))); elseif (t_3 <= 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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(N[(x / z), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+258], t$95$4, If[LessEqual[t$95$3, 4e+305], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := 1 + \left(a + \frac{y}{\frac{t}{b}}\right)\\
t_3 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_4 := z \cdot \left(\frac{\frac{x}{z}}{t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+258}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_3 \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))) < -5e258 or 3.9999999999999998e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 49.1%
associate-/l*68.6%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in z around inf 87.4%
associate-/r*87.7%
associate-*r/87.7%
*-commutative87.7%
associate-/r/87.7%
associate-*r/70.1%
*-commutative70.1%
associate-/r/87.6%
Simplified87.6%
if -5e258 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e305Initial program 88.3%
*-commutative88.3%
associate-/l*90.3%
Applied egg-rr90.3%
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.8%
associate-/l*11.0%
Simplified11.0%
Taylor expanded in y around inf 96.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (+ 1.0 (+ a t_1)))
(t_4 (/ t_2 (+ (+ a 1.0) t_1)))
(t_5 (* z (+ (/ x (* z t_3)) (/ y (* t t_3))))))
(if (<= t_4 -5e+258)
t_5
(if (<= t_4 4e+305)
(/ t_2 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_4 INFINITY) t_5 (/ 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);
double t_3 = 1.0 + (a + t_1);
double t_4 = t_2 / ((a + 1.0) + t_1);
double t_5 = z * ((x / (z * t_3)) + (y / (t * t_3)));
double tmp;
if (t_4 <= -5e+258) {
tmp = t_5;
} else if (t_4 <= 4e+305) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} 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);
double t_3 = 1.0 + (a + t_1);
double t_4 = t_2 / ((a + 1.0) + t_1);
double t_5 = z * ((x / (z * t_3)) + (y / (t * t_3)));
double tmp;
if (t_4 <= -5e+258) {
tmp = t_5;
} else if (t_4 <= 4e+305) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} 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) t_3 = 1.0 + (a + t_1) t_4 = t_2 / ((a + 1.0) + t_1) t_5 = z * ((x / (z * t_3)) + (y / (t * t_3))) tmp = 0 if t_4 <= -5e+258: tmp = t_5 elif t_4 <= 4e+305: tmp = t_2 / ((a + 1.0) + (b * (y / t))) elif t_4 <= math.inf: tmp = t_5 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(1.0 + Float64(a + t_1)) t_4 = Float64(t_2 / Float64(Float64(a + 1.0) + t_1)) t_5 = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))) tmp = 0.0 if (t_4 <= -5e+258) tmp = t_5; elseif (t_4 <= 4e+305) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_4 <= Inf) tmp = t_5; 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); t_3 = 1.0 + (a + t_1); t_4 = t_2 / ((a + 1.0) + t_1); t_5 = z * ((x / (z * t_3)) + (y / (t * t_3))); tmp = 0.0; if (t_4 <= -5e+258) tmp = t_5; elseif (t_4 <= 4e+305) tmp = t_2 / ((a + 1.0) + (b * (y / t))); elseif (t_4 <= Inf) tmp = t_5; 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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = 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$4, -5e+258], t$95$5, If[LessEqual[t$95$4, 4e+305], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$5, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := 1 + \left(a + t\_1\right)\\
t_4 := \frac{t\_2}{\left(a + 1\right) + t\_1}\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{if}\;t\_4 \leq -5 \cdot 10^{+258}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\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))) < -5e258 or 3.9999999999999998e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 49.1%
associate-/l*68.6%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in z around inf 87.4%
if -5e258 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e305Initial program 88.3%
*-commutative88.3%
associate-/l*90.3%
Applied egg-rr90.3%
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.8%
associate-/l*11.0%
Simplified11.0%
Taylor expanded in y around inf 96.7%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
(t_3 (* y (/ z (* t (+ 1.0 (+ a (/ y (/ t b)))))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 4e+305)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_2 INFINITY) t_3 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = y * (z / (t * (1.0 + (a + (y / (t / b))))));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= 4e+305) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = 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 = x + ((y * z) / t);
double t_2 = t_1 / ((a + 1.0) + ((y * b) / t));
double t_3 = y * (z / (t * (1.0 + (a + (y / (t / b))))));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_2 <= 4e+305) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / ((a + 1.0) + ((y * b) / t)) t_3 = y * (z / (t * (1.0 + (a + (y / (t / b)))))) tmp = 0 if t_2 <= -math.inf: tmp = t_3 elif t_2 <= 4e+305: tmp = t_1 / ((a + 1.0) + (b * (y / t))) elif t_2 <= math.inf: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_3 = Float64(y * Float64(z / Float64(t * Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= 4e+305) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_2 <= Inf) tmp = t_3; 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); t_2 = t_1 / ((a + 1.0) + ((y * b) / t)); t_3 = y * (z / (t * (1.0 + (a + (y / (t / b)))))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_3; elseif (t_2 <= 4e+305) tmp = t_1 / ((a + 1.0) + (b * (y / t))); elseif (t_2 <= Inf) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y * N[(z / N[(t * N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 4e+305], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_3 := y \cdot \frac{z}{t \cdot \left(1 + \left(a + \frac{y}{\frac{t}{b}}\right)\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\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 3.9999999999999998e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 44.9%
associate-/l*68.7%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in x around 0 62.5%
associate-/l*81.3%
associate-*r/62.1%
*-commutative62.1%
associate-/r/81.1%
Simplified81.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 3.9999999999999998e305Initial program 88.4%
*-commutative88.4%
associate-/l*90.5%
Applied egg-rr90.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.8%
associate-/l*11.0%
Simplified11.0%
Taylor expanded in y around inf 96.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -1.6e-73)
t_1
(if (<= t 1.45e-175)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 4e+133)
(/ (+ x (* z (/ y t))) (+ (+ a 1.0) (/ (* 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) + (y * (b / t)));
double tmp;
if (t <= -1.6e-73) {
tmp = t_1;
} else if (t <= 1.45e-175) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 4e+133) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((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) + (y * (b / t)))
if (t <= (-1.6d-73)) then
tmp = t_1
else if (t <= 1.45d-175) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 4d+133) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + ((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) + (y * (b / t)));
double tmp;
if (t <= -1.6e-73) {
tmp = t_1;
} else if (t <= 1.45e-175) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 4e+133) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((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) + (y * (b / t))) tmp = 0 if t <= -1.6e-73: tmp = t_1 elif t <= 1.45e-175: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 4e+133: tmp = (x + (z * (y / t))) / ((a + 1.0) + ((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(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1.6e-73) tmp = t_1; elseif (t <= 1.45e-175) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 4e+133) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + 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) + (y * (b / t))); tmp = 0.0; if (t <= -1.6e-73) tmp = t_1; elseif (t <= 1.45e-175) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 4e+133) tmp = (x + (z * (y / t))) / ((a + 1.0) + ((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[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e-73], t$95$1, If[LessEqual[t, 1.45e-175], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e+133], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-175}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+133}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.59999999999999993e-73 or 4.0000000000000001e133 < t Initial program 77.7%
associate-/l*82.9%
associate-/l*93.1%
Simplified93.1%
if -1.59999999999999993e-73 < t < 1.44999999999999999e-175Initial program 54.9%
associate-/l*47.7%
associate-/l*44.1%
Simplified44.1%
Taylor expanded in b around inf 44.5%
associate-/l*39.4%
associate-*r/39.3%
+-commutative39.3%
fma-undefine39.3%
*-commutative39.3%
Simplified39.3%
Taylor expanded in t around 0 72.4%
if 1.44999999999999999e-175 < t < 4.0000000000000001e133Initial program 86.3%
*-commutative86.3%
associate-/l*90.9%
Applied egg-rr90.9%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b)))) (t_2 (/ (+ x (* z (/ y t))) a)))
(if (<= a -420000000.0)
t_2
(if (<= a -3.6e-255)
t_1
(if (<= a 2.25e-303)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= a 450000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -420000000.0) {
tmp = t_2;
} else if (a <= -3.6e-255) {
tmp = t_1;
} else if (a <= 2.25e-303) {
tmp = x / (1.0 + ((y * b) / t));
} else if (a <= 450000.0) {
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 = (z / b) + ((x * t) / (y * b))
t_2 = (x + (z * (y / t))) / a
if (a <= (-420000000.0d0)) then
tmp = t_2
else if (a <= (-3.6d-255)) then
tmp = t_1
else if (a <= 2.25d-303) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (a <= 450000.0d0) 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 = (z / b) + ((x * t) / (y * b));
double t_2 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -420000000.0) {
tmp = t_2;
} else if (a <= -3.6e-255) {
tmp = t_1;
} else if (a <= 2.25e-303) {
tmp = x / (1.0 + ((y * b) / t));
} else if (a <= 450000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = (x + (z * (y / t))) / a tmp = 0 if a <= -420000000.0: tmp = t_2 elif a <= -3.6e-255: tmp = t_1 elif a <= 2.25e-303: tmp = x / (1.0 + ((y * b) / t)) elif a <= 450000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -420000000.0) tmp = t_2; elseif (a <= -3.6e-255) tmp = t_1; elseif (a <= 2.25e-303) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (a <= 450000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = (x + (z * (y / t))) / a; tmp = 0.0; if (a <= -420000000.0) tmp = t_2; elseif (a <= -3.6e-255) tmp = t_1; elseif (a <= 2.25e-303) tmp = x / (1.0 + ((y * b) / t)); elseif (a <= 450000.0) 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[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -420000000.0], t$95$2, If[LessEqual[a, -3.6e-255], t$95$1, If[LessEqual[a, 2.25e-303], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 450000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -420000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-303}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;a \leq 450000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.2e8 or 4.5e5 < a Initial program 71.4%
associate-/l*69.8%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in a around inf 63.8%
*-commutative71.4%
associate-/l*73.7%
Applied egg-rr67.8%
if -4.2e8 < a < -3.6000000000000002e-255 or 2.25e-303 < a < 4.5e5Initial program 71.1%
associate-/l*70.4%
associate-/l*73.8%
Simplified73.8%
Taylor expanded in b around inf 37.0%
associate-/l*36.4%
associate-*r/38.9%
+-commutative38.9%
fma-undefine38.9%
*-commutative38.9%
Simplified38.9%
Taylor expanded in t around 0 56.4%
if -3.6000000000000002e-255 < a < 2.25e-303Initial program 87.2%
associate-/l*82.8%
associate-/l*82.8%
Simplified82.8%
Taylor expanded in x around inf 74.7%
associate-*r/78.7%
*-commutative78.7%
associate-/r/78.4%
Simplified78.4%
Taylor expanded in a around 0 74.7%
Final simplification63.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3e-74) (not (<= t 3.6e-177))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e-74) || !(t <= 3.6e-177)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-3d-74)) .or. (.not. (t <= 3.6d-177))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e-74) || !(t <= 3.6e-177)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3e-74) or not (t <= 3.6e-177): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3e-74) || !(t <= 3.6e-177)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3e-74) || ~((t <= 3.6e-177))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3e-74], N[Not[LessEqual[t, 3.6e-177]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{-74} \lor \neg \left(t \leq 3.6 \cdot 10^{-177}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -3.00000000000000007e-74 or 3.59999999999999983e-177 < t Initial program 80.9%
associate-/l*82.0%
associate-/l*86.9%
Simplified86.9%
if -3.00000000000000007e-74 < t < 3.59999999999999983e-177Initial program 54.3%
associate-/l*47.1%
associate-/l*43.4%
Simplified43.4%
Taylor expanded in b around inf 43.8%
associate-/l*38.7%
associate-*r/38.5%
+-commutative38.5%
fma-undefine38.5%
*-commutative38.5%
Simplified38.5%
Taylor expanded in t around 0 72.1%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7e-17)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 1.4e-104)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 2.1e+21)
(/ (* y z) (* t (+ a 1.0)))
(/ x (+ 1.0 (+ a (* b (/ y t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7e-17) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= 1.4e-104) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 2.1e+21) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = x / (1.0 + (a + (b * (y / 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 <= (-7d-17)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 1.4d-104) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 2.1d+21) then
tmp = (y * z) / (t * (a + 1.0d0))
else
tmp = x / (1.0d0 + (a + (b * (y / 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 <= -7e-17) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= 1.4e-104) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 2.1e+21) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = x / (1.0 + (a + (b * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7e-17: tmp = x / ((a + 1.0) + (y * (b / t))) elif t <= 1.4e-104: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 2.1e+21: tmp = (y * z) / (t * (a + 1.0)) else: tmp = x / (1.0 + (a + (b * (y / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7e-17) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 1.4e-104) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 2.1e+21) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7e-17) tmp = x / ((a + 1.0) + (y * (b / t))); elseif (t <= 1.4e-104) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 2.1e+21) tmp = (y * z) / (t * (a + 1.0)); else tmp = x / (1.0 + (a + (b * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7e-17], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.4e-104], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+21], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-17}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-104}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+21}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\end{array}
\end{array}
if t < -7.0000000000000003e-17Initial program 81.4%
associate-/l*86.0%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around inf 74.2%
if -7.0000000000000003e-17 < t < 1.4e-104Initial program 62.6%
associate-/l*55.7%
associate-/l*51.3%
Simplified51.3%
Taylor expanded in b around inf 43.4%
associate-/l*39.7%
associate-*r/40.4%
+-commutative40.4%
fma-undefine40.4%
*-commutative40.4%
Simplified40.4%
Taylor expanded in t around 0 66.1%
if 1.4e-104 < t < 2.1e21Initial program 99.8%
associate-/l*84.3%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in b around 0 80.5%
Taylor expanded in x around 0 52.0%
if 2.1e21 < t Initial program 70.3%
associate-/l*78.7%
associate-/l*90.0%
Simplified90.0%
Taylor expanded in x around inf 55.9%
associate-*r/60.8%
*-commutative60.8%
associate-/r/60.8%
Simplified60.8%
associate-/r/60.8%
Applied egg-rr60.8%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (* b (/ y t)))))))
(if (<= t -6.8e-17)
t_1
(if (<= t 1.55e-104)
(+ (/ z b) (/ (* x t) (* y b)))
(if (<= t 3e+22) (/ (* y z) (* t (+ a 1.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + (b * (y / t))));
double tmp;
if (t <= -6.8e-17) {
tmp = t_1;
} else if (t <= 1.55e-104) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 3e+22) {
tmp = (y * z) / (t * (a + 1.0));
} 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 / (1.0d0 + (a + (b * (y / t))))
if (t <= (-6.8d-17)) then
tmp = t_1
else if (t <= 1.55d-104) then
tmp = (z / b) + ((x * t) / (y * b))
else if (t <= 3d+22) then
tmp = (y * z) / (t * (a + 1.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + (b * (y / t))));
double tmp;
if (t <= -6.8e-17) {
tmp = t_1;
} else if (t <= 1.55e-104) {
tmp = (z / b) + ((x * t) / (y * b));
} else if (t <= 3e+22) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + (b * (y / t)))) tmp = 0 if t <= -6.8e-17: tmp = t_1 elif t <= 1.55e-104: tmp = (z / b) + ((x * t) / (y * b)) elif t <= 3e+22: tmp = (y * z) / (t * (a + 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))) tmp = 0.0 if (t <= -6.8e-17) tmp = t_1; elseif (t <= 1.55e-104) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif (t <= 3e+22) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + (a + (b * (y / t)))); tmp = 0.0; if (t <= -6.8e-17) tmp = t_1; elseif (t <= 1.55e-104) tmp = (z / b) + ((x * t) / (y * b)); elseif (t <= 3e+22) tmp = (y * z) / (t * (a + 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e-17], t$95$1, If[LessEqual[t, 1.55e-104], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+22], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-104}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+22}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.7999999999999996e-17 or 3e22 < t Initial program 76.0%
associate-/l*82.5%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in x around inf 63.0%
associate-*r/67.7%
*-commutative67.7%
associate-/r/67.7%
Simplified67.7%
associate-/r/67.7%
Applied egg-rr67.7%
if -6.7999999999999996e-17 < t < 1.54999999999999988e-104Initial program 62.6%
associate-/l*55.7%
associate-/l*51.3%
Simplified51.3%
Taylor expanded in b around inf 43.4%
associate-/l*39.7%
associate-*r/40.4%
+-commutative40.4%
fma-undefine40.4%
*-commutative40.4%
Simplified40.4%
Taylor expanded in t around 0 66.1%
if 1.54999999999999988e-104 < t < 3e22Initial program 99.8%
associate-/l*84.3%
associate-/l*80.4%
Simplified80.4%
Taylor expanded in b around 0 80.5%
Taylor expanded in x around 0 52.0%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= a -155000000.0)
t_1
(if (<= a -4.2e-45)
(/ z b)
(if (<= a 410000.0) (/ x (+ 1.0 (/ (* y b) t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -155000000.0) {
tmp = t_1;
} else if (a <= -4.2e-45) {
tmp = z / b;
} else if (a <= 410000.0) {
tmp = x / (1.0 + ((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 + (z * (y / t))) / a
if (a <= (-155000000.0d0)) then
tmp = t_1
else if (a <= (-4.2d-45)) then
tmp = z / b
else if (a <= 410000.0d0) then
tmp = x / (1.0d0 + ((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 + (z * (y / t))) / a;
double tmp;
if (a <= -155000000.0) {
tmp = t_1;
} else if (a <= -4.2e-45) {
tmp = z / b;
} else if (a <= 410000.0) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / a tmp = 0 if a <= -155000000.0: tmp = t_1 elif a <= -4.2e-45: tmp = z / b elif a <= 410000.0: tmp = x / (1.0 + ((y * b) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -155000000.0) tmp = t_1; elseif (a <= -4.2e-45) tmp = Float64(z / b); elseif (a <= 410000.0) tmp = Float64(x / Float64(1.0 + 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 + (z * (y / t))) / a; tmp = 0.0; if (a <= -155000000.0) tmp = t_1; elseif (a <= -4.2e-45) tmp = z / b; elseif (a <= 410000.0) tmp = x / (1.0 + ((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[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -155000000.0], t$95$1, If[LessEqual[a, -4.2e-45], N[(z / b), $MachinePrecision], If[LessEqual[a, 410000.0], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -155000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{-45}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 410000:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.55e8 or 4.1e5 < a Initial program 71.4%
associate-/l*69.8%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in a around inf 63.8%
*-commutative71.4%
associate-/l*73.7%
Applied egg-rr67.8%
if -1.55e8 < a < -4.1999999999999999e-45Initial program 54.2%
associate-/l*48.1%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in y around inf 58.6%
if -4.1999999999999999e-45 < a < 4.1e5Initial program 76.1%
associate-/l*75.4%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in x around inf 48.4%
associate-*r/51.6%
*-commutative51.6%
associate-/r/50.0%
Simplified50.0%
Taylor expanded in a around 0 48.4%
Final simplification58.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -8.2)
t_1
(if (<= t 5.6e-177)
(/ z b)
(if (<= t 2.05e+85) (* y (/ z (* t (+ a 1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -8.2) {
tmp = t_1;
} else if (t <= 5.6e-177) {
tmp = z / b;
} else if (t <= 2.05e+85) {
tmp = y * (z / (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-8.2d0)) then
tmp = t_1
else if (t <= 5.6d-177) then
tmp = z / b
else if (t <= 2.05d+85) then
tmp = y * (z / (t * (a + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -8.2) {
tmp = t_1;
} else if (t <= 5.6e-177) {
tmp = z / b;
} else if (t <= 2.05e+85) {
tmp = y * (z / (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -8.2: tmp = t_1 elif t <= 5.6e-177: tmp = z / b elif t <= 2.05e+85: tmp = y * (z / (t * (a + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -8.2) tmp = t_1; elseif (t <= 5.6e-177) tmp = Float64(z / b); elseif (t <= 2.05e+85) tmp = Float64(y * Float64(z / Float64(t * Float64(a + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -8.2) tmp = t_1; elseif (t <= 5.6e-177) tmp = z / b; elseif (t <= 2.05e+85) tmp = y * (z / (t * (a + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2], t$95$1, If[LessEqual[t, 5.6e-177], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.05e+85], N[(y * N[(z / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -8.2:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-177}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+85}:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.1999999999999993 or 2.04999999999999989e85 < t Initial program 75.6%
associate-/l*81.1%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in y around 0 56.9%
if -8.1999999999999993 < t < 5.59999999999999973e-177Initial program 59.5%
associate-/l*53.5%
associate-/l*50.4%
Simplified50.4%
Taylor expanded in y around inf 59.3%
if 5.59999999999999973e-177 < t < 2.04999999999999989e85Initial program 89.7%
associate-/l*82.4%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in b around 0 64.3%
Taylor expanded in x around 0 46.0%
associate-/l*49.5%
Simplified49.5%
Final simplification56.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.6e+71) (not (<= b 1.75e-72))) (+ (/ z b) (/ (* x t) (* y b))) (/ (+ x (* z (/ y t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.6e+71) || !(b <= 1.75e-72)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.6d+71)) .or. (.not. (b <= 1.75d-72))) then
tmp = (z / b) + ((x * t) / (y * b))
else
tmp = (x + (z * (y / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.6e+71) || !(b <= 1.75e-72)) {
tmp = (z / b) + ((x * t) / (y * b));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.6e+71) or not (b <= 1.75e-72): tmp = (z / b) + ((x * t) / (y * b)) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.6e+71) || !(b <= 1.75e-72)) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.6e+71) || ~((b <= 1.75e-72))) tmp = (z / b) + ((x * t) / (y * b)); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.6e+71], N[Not[LessEqual[b, 1.75e-72]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{+71} \lor \neg \left(b \leq 1.75 \cdot 10^{-72}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if b < -1.60000000000000012e71 or 1.75e-72 < b Initial program 58.0%
associate-/l*58.1%
associate-/l*62.0%
Simplified62.0%
Taylor expanded in b around inf 38.9%
associate-/l*37.6%
associate-*r/39.3%
+-commutative39.3%
fma-undefine39.3%
*-commutative39.3%
Simplified39.3%
Taylor expanded in t around 0 64.2%
if -1.60000000000000012e71 < b < 1.75e-72Initial program 86.3%
associate-/l*83.4%
associate-/l*84.1%
Simplified84.1%
Taylor expanded in b around 0 79.3%
*-commutative86.3%
associate-/l*86.9%
Applied egg-rr82.1%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -10.0) (not (<= t 1.55e-104))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -10.0) || !(t <= 1.55e-104)) {
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 <= (-10.0d0)) .or. (.not. (t <= 1.55d-104))) 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 <= -10.0) || !(t <= 1.55e-104)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -10.0) or not (t <= 1.55e-104): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -10.0) || !(t <= 1.55e-104)) 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 <= -10.0) || ~((t <= 1.55e-104))) 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, -10.0], N[Not[LessEqual[t, 1.55e-104]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -10 \lor \neg \left(t \leq 1.55 \cdot 10^{-104}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -10 or 1.54999999999999988e-104 < t Initial program 79.7%
associate-/l*82.4%
associate-/l*89.7%
Simplified89.7%
Taylor expanded in y around 0 49.9%
if -10 < t < 1.54999999999999988e-104Initial program 63.6%
associate-/l*56.8%
associate-/l*52.6%
Simplified52.6%
Taylor expanded in y around inf 56.6%
Final simplification52.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.1e-153) (not (<= y 5.2e-32))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.1e-153) || !(y <= 5.2e-32)) {
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 <= (-2.1d-153)) .or. (.not. (y <= 5.2d-32))) 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 <= -2.1e-153) || !(y <= 5.2e-32)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.1e-153) or not (y <= 5.2e-32): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.1e-153) || !(y <= 5.2e-32)) 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 <= -2.1e-153) || ~((y <= 5.2e-32))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.1e-153], N[Not[LessEqual[y, 5.2e-32]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-153} \lor \neg \left(y \leq 5.2 \cdot 10^{-32}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -2.10000000000000004e-153 or 5.1999999999999995e-32 < y Initial program 61.6%
associate-/l*64.5%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in y around inf 47.3%
if -2.10000000000000004e-153 < y < 5.1999999999999995e-32Initial program 95.2%
associate-/l*84.9%
associate-/l*79.2%
Simplified79.2%
Taylor expanded in x around inf 68.2%
associate-*r/68.2%
*-commutative68.2%
associate-/r/65.8%
Simplified65.8%
Taylor expanded in a around inf 36.3%
Final simplification43.7%
(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 72.7%
associate-/l*71.2%
associate-/l*73.5%
Simplified73.5%
Taylor expanded in x around inf 44.3%
associate-*r/46.5%
*-commutative46.5%
associate-/r/45.4%
Simplified45.4%
Taylor expanded in a around inf 21.2%
(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 2024157
(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))))