
(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 15 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)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (* y (/ b t))))
(if (<= t_1 (- INFINITY))
(* y (/ (/ z t) (+ a (+ 1.0 t_2))))
(if (<= t_1 5e+298)
t_1
(if (<= t_1 INFINITY)
(+ (* (/ y t) (/ z (+ 1.0 (+ a t_2)))) (/ x a))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = y * (b / t);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * ((z / t) / (a + (1.0 + t_2)));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((y / t) * (z / (1.0 + (a + t_2)))) + (x / a);
} 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = y * (b / t);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((z / t) / (a + (1.0 + t_2)));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = ((y / t) * (z / (1.0 + (a + t_2)))) + (x / a);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = y * (b / t) tmp = 0 if t_1 <= -math.inf: tmp = y * ((z / t) / (a + (1.0 + t_2))) elif t_1 <= 5e+298: tmp = t_1 elif t_1 <= math.inf: tmp = ((y / t) * (z / (1.0 + (a + t_2)))) + (x / a) 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(y * Float64(b / t)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(z / t) / Float64(a + Float64(1.0 + t_2)))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + t_2)))) + Float64(x / a)); 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)) / (((y * b) / t) + (a + 1.0)); t_2 = y * (b / t); tmp = 0.0; if (t_1 <= -Inf) tmp = y * ((z / t) / (a + (1.0 + t_2))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) tmp = ((y / t) * (z / (1.0 + (a + t_2)))) + (x / a); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / a), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := y \cdot \frac{b}{t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{\frac{z}{t}}{a + \left(1 + t\_2\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + t\_2\right)} + \frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 39.6%
remove-double-neg39.6%
associate-/l*65.6%
remove-double-neg65.6%
associate-/l*65.6%
Simplified65.6%
Taylor expanded in x around 0 73.1%
associate-/l*90.8%
associate-/r*82.4%
+-commutative82.4%
associate-*r/37.7%
associate-+l+37.7%
+-commutative37.7%
associate-*r/82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 89.1%
if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 6.2%
remove-double-neg6.2%
associate-/l*35.4%
remove-double-neg35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in x around 0 41.5%
+-commutative41.5%
associate-/l*99.1%
associate-+r+99.1%
associate-*r/83.9%
associate-+r+83.9%
associate-*r/83.9%
Simplified83.9%
Taylor expanded in z around 0 41.5%
times-frac85.9%
*-commutative85.9%
associate-*r/85.9%
Simplified85.9%
Taylor expanded in a around inf 85.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
remove-double-neg0.0%
associate-/l*0.4%
remove-double-neg0.4%
associate-/l*12.1%
Simplified12.1%
Taylor expanded in y around inf 86.4%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(* y (/ (/ z t) (+ a (+ 1.0 (* y (/ b t))))))
(if (<= t_1 5e+298)
t_1
(if (<= t_1 INFINITY)
(* y (/ z (* t (+ (+ a 1.0) (* b (/ y t))))))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = y * ((z / t) / (a + (1.0 + (y * (b / t)))));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = y * (z / (t * ((a + 1.0) + (b * (y / t)))));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((z / t) / (a + (1.0 + (y * (b / t)))));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = y * (z / (t * ((a + 1.0) + (b * (y / t)))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = y * ((z / t) / (a + (1.0 + (y * (b / t))))) elif t_1 <= 5e+298: tmp = t_1 elif t_1 <= math.inf: tmp = y * (z / (t * ((a + 1.0) + (b * (y / t))))) 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(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(z / t) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t)))))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(y * Float64(z / Float64(t * Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))))); 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)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = y * ((z / t) / (a + (1.0 + (y * (b / t))))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) tmp = y * (z / (t * ((a + 1.0) + (b * (y / t))))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(y * N[(N[(z / t), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], t$95$1, If[LessEqual[t$95$1, Infinity], N[(y * N[(z / N[(t * N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;y \cdot \frac{\frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(\left(a + 1\right) + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 39.6%
remove-double-neg39.6%
associate-/l*65.6%
remove-double-neg65.6%
associate-/l*65.6%
Simplified65.6%
Taylor expanded in x around 0 73.1%
associate-/l*90.8%
associate-/r*82.4%
+-commutative82.4%
associate-*r/37.7%
associate-+l+37.7%
+-commutative37.7%
associate-*r/82.4%
associate-*l/82.5%
*-commutative82.5%
Simplified82.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 89.1%
if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 6.2%
remove-double-neg6.2%
associate-/l*35.4%
remove-double-neg35.4%
associate-/l*35.4%
Simplified35.4%
Taylor expanded in x around 0 41.5%
associate-/l*92.1%
associate-+r+92.1%
associate-*r/77.0%
Simplified77.0%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
remove-double-neg0.0%
associate-/l*0.4%
remove-double-neg0.4%
associate-/l*12.1%
Simplified12.1%
Taylor expanded in y around inf 86.4%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0)))))
(if (<= t -2.9e-90)
t_1
(if (<= t -8e-256)
(/ z b)
(if (<= t -1.6e-291)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 9.5e-244)
(/ z b)
(if (<= t 5.8e-124)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -2.9e-90) {
tmp = t_1;
} else if (t <= -8e-256) {
tmp = z / b;
} else if (t <= -1.6e-291) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 9.5e-244) {
tmp = z / b;
} else if (t <= 5.8e-124) {
tmp = (y * z) / ((y * b) + (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 + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
if (t <= (-2.9d-90)) then
tmp = t_1
else if (t <= (-8d-256)) then
tmp = z / b
else if (t <= (-1.6d-291)) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 9.5d-244) then
tmp = z / b
else if (t <= 5.8d-124) then
tmp = (y * z) / ((y * b) + (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 + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -2.9e-90) {
tmp = t_1;
} else if (t <= -8e-256) {
tmp = z / b;
} else if (t <= -1.6e-291) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 9.5e-244) {
tmp = z / b;
} else if (t <= 5.8e-124) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) tmp = 0 if t <= -2.9e-90: tmp = t_1 elif t <= -8e-256: tmp = z / b elif t <= -1.6e-291: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 9.5e-244: tmp = z / b elif t <= 5.8e-124: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) 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(y * Float64(b / t)) + Float64(a + 1.0))) tmp = 0.0 if (t <= -2.9e-90) tmp = t_1; elseif (t <= -8e-256) tmp = Float64(z / b); elseif (t <= -1.6e-291) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 9.5e-244) tmp = Float64(z / b); elseif (t <= 5.8e-124) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + 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 + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); tmp = 0.0; if (t <= -2.9e-90) tmp = t_1; elseif (t <= -8e-256) tmp = z / b; elseif (t <= -1.6e-291) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 9.5e-244) tmp = z / b; elseif (t <= 5.8e-124) tmp = (y * z) / ((y * b) + (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[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e-90], t$95$1, If[LessEqual[t, -8e-256], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.6e-291], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-244], N[(z / b), $MachinePrecision], If[LessEqual[t, 5.8e-124], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-256}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-291}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-244}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-124}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.89999999999999983e-90 or 5.8000000000000004e-124 < t Initial program 80.2%
remove-double-neg80.2%
associate-/l*83.0%
remove-double-neg83.0%
associate-/l*88.9%
Simplified88.9%
if -2.89999999999999983e-90 < t < -7.99999999999999982e-256 or -1.6000000000000001e-291 < t < 9.4999999999999995e-244Initial program 46.9%
remove-double-neg46.9%
associate-/l*37.8%
remove-double-neg37.8%
associate-/l*32.4%
Simplified32.4%
Taylor expanded in y around inf 70.3%
if -7.99999999999999982e-256 < t < -1.6000000000000001e-291Initial program 99.8%
*-commutative99.8%
associate-/l*87.5%
Applied egg-rr87.5%
if 9.4999999999999995e-244 < t < 5.8000000000000004e-124Initial program 60.1%
remove-double-neg60.1%
associate-/l*50.5%
remove-double-neg50.5%
associate-/l*47.6%
Simplified47.6%
Taylor expanded in x around 0 65.7%
Taylor expanded in t around 0 74.5%
+-commutative74.5%
*-commutative74.5%
Simplified74.5%
Final simplification83.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (/ b t)) (+ a 1.0))))
(if (<= t -9.5e-91)
(/ (+ x (/ y (/ t z))) t_1)
(if (<= t -8e-256)
(/ z b)
(if (<= t -3e-291)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 2.9e-243)
(/ z b)
(if (<= t 5.6e-123)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* y (/ z t))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -9.5e-91) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= -8e-256) {
tmp = z / b;
} else if (t <= -3e-291) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 2.9e-243) {
tmp = z / b;
} else if (t <= 5.6e-123) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / 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 = (y * (b / t)) + (a + 1.0d0)
if (t <= (-9.5d-91)) then
tmp = (x + (y / (t / z))) / t_1
else if (t <= (-8d-256)) then
tmp = z / b
else if (t <= (-3d-291)) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 2.9d-243) then
tmp = z / b
else if (t <= 5.6d-123) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y * (z / t))) / 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 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -9.5e-91) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= -8e-256) {
tmp = z / b;
} else if (t <= -3e-291) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 2.9e-243) {
tmp = z / b;
} else if (t <= 5.6e-123) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (b / t)) + (a + 1.0) tmp = 0 if t <= -9.5e-91: tmp = (x + (y / (t / z))) / t_1 elif t <= -8e-256: tmp = z / b elif t <= -3e-291: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 2.9e-243: tmp = z / b elif t <= 5.6e-123: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y * (z / t))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0)) tmp = 0.0 if (t <= -9.5e-91) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); elseif (t <= -8e-256) tmp = Float64(z / b); elseif (t <= -3e-291) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 2.9e-243) tmp = Float64(z / b); elseif (t <= 5.6e-123) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (b / t)) + (a + 1.0); tmp = 0.0; if (t <= -9.5e-91) tmp = (x + (y / (t / z))) / t_1; elseif (t <= -8e-256) tmp = z / b; elseif (t <= -3e-291) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 2.9e-243) tmp = z / b; elseif (t <= 5.6e-123) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y * (z / t))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-91], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, -8e-256], N[(z / b), $MachinePrecision], If[LessEqual[t, -3e-291], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-243], N[(z / b), $MachinePrecision], If[LessEqual[t, 5.6e-123], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t} + \left(a + 1\right)\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-91}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-256}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-291}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-243}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-123}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\
\end{array}
\end{array}
if t < -9.5e-91Initial program 83.8%
remove-double-neg83.8%
associate-/l*84.5%
remove-double-neg84.5%
associate-/l*92.4%
Simplified92.4%
clear-num75.2%
un-div-inv75.3%
Applied egg-rr92.7%
if -9.5e-91 < t < -7.99999999999999982e-256 or -3.0000000000000001e-291 < t < 2.89999999999999977e-243Initial program 46.9%
remove-double-neg46.9%
associate-/l*37.8%
remove-double-neg37.8%
associate-/l*32.4%
Simplified32.4%
Taylor expanded in y around inf 70.3%
if -7.99999999999999982e-256 < t < -3.0000000000000001e-291Initial program 99.8%
*-commutative99.8%
associate-/l*87.5%
Applied egg-rr87.5%
if 2.89999999999999977e-243 < t < 5.5999999999999998e-123Initial program 60.1%
remove-double-neg60.1%
associate-/l*50.5%
remove-double-neg50.5%
associate-/l*47.6%
Simplified47.6%
Taylor expanded in x around 0 65.7%
Taylor expanded in t around 0 74.5%
+-commutative74.5%
*-commutative74.5%
Simplified74.5%
if 5.5999999999999998e-123 < t Initial program 76.1%
remove-double-neg76.1%
associate-/l*81.4%
remove-double-neg81.4%
associate-/l*85.0%
Simplified85.0%
Final simplification83.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0)))))
(if (<= t -9.5e-91)
t_1
(if (<= t 7.2e-244)
(/ z b)
(if (<= t 8.5e-123) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -9.5e-91) {
tmp = t_1;
} else if (t <= 7.2e-244) {
tmp = z / b;
} else if (t <= 8.5e-123) {
tmp = (y * z) / ((y * b) + (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 + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
if (t <= (-9.5d-91)) then
tmp = t_1
else if (t <= 7.2d-244) then
tmp = z / b
else if (t <= 8.5d-123) then
tmp = (y * z) / ((y * b) + (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 + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -9.5e-91) {
tmp = t_1;
} else if (t <= 7.2e-244) {
tmp = z / b;
} else if (t <= 8.5e-123) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) tmp = 0 if t <= -9.5e-91: tmp = t_1 elif t <= 7.2e-244: tmp = z / b elif t <= 8.5e-123: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) 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(y * Float64(b / t)) + Float64(a + 1.0))) tmp = 0.0 if (t <= -9.5e-91) tmp = t_1; elseif (t <= 7.2e-244) tmp = Float64(z / b); elseif (t <= 8.5e-123) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + 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 + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); tmp = 0.0; if (t <= -9.5e-91) tmp = t_1; elseif (t <= 7.2e-244) tmp = z / b; elseif (t <= 8.5e-123) tmp = (y * z) / ((y * b) + (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[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.5e-91], t$95$1, If[LessEqual[t, 7.2e-244], N[(z / b), $MachinePrecision], If[LessEqual[t, 8.5e-123], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t \leq -9.5 \cdot 10^{-91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-244}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-123}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.5e-91 or 8.4999999999999995e-123 < t Initial program 80.2%
remove-double-neg80.2%
associate-/l*83.0%
remove-double-neg83.0%
associate-/l*88.9%
Simplified88.9%
if -9.5e-91 < t < 7.1999999999999995e-244Initial program 53.9%
remove-double-neg53.9%
associate-/l*44.4%
remove-double-neg44.4%
associate-/l*38.0%
Simplified38.0%
Taylor expanded in y around inf 64.8%
if 7.1999999999999995e-244 < t < 8.4999999999999995e-123Initial program 60.1%
remove-double-neg60.1%
associate-/l*50.5%
remove-double-neg50.5%
associate-/l*47.6%
Simplified47.6%
Taylor expanded in x around 0 65.7%
Taylor expanded in t around 0 74.5%
+-commutative74.5%
*-commutative74.5%
Simplified74.5%
Final simplification81.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.9e-60)
(/ (+ x (/ y (/ t z))) (+ a 1.0))
(if (<= t 1.9e-243)
(/ z b)
(if (<= t 2.06e-119)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* y (/ z t))) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.9e-60) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 1.9e-243) {
tmp = z / b;
} else if (t <= 2.06e-119) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / 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 (t <= (-3.9d-60)) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else if (t <= 1.9d-243) then
tmp = z / b
else if (t <= 2.06d-119) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y * (z / 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 (t <= -3.9e-60) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 1.9e-243) {
tmp = z / b;
} else if (t <= 2.06e-119) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.9e-60: tmp = (x + (y / (t / z))) / (a + 1.0) elif t <= 1.9e-243: tmp = z / b elif t <= 2.06e-119: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.9e-60) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); elseif (t <= 1.9e-243) tmp = Float64(z / b); elseif (t <= 2.06e-119) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.9e-60) tmp = (x + (y / (t / z))) / (a + 1.0); elseif (t <= 1.9e-243) tmp = z / b; elseif (t <= 2.06e-119) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.9e-60], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-243], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.06e-119], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{-60}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-243}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.06 \cdot 10^{-119}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -3.9000000000000002e-60Initial program 83.7%
remove-double-neg83.7%
associate-/l*85.7%
remove-double-neg85.7%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in b around 0 73.3%
associate-*r/78.1%
Simplified78.1%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
if -3.9000000000000002e-60 < t < 1.8999999999999999e-243Initial program 57.1%
remove-double-neg57.1%
associate-/l*47.1%
remove-double-neg47.1%
associate-/l*41.4%
Simplified41.4%
Taylor expanded in y around inf 64.2%
if 1.8999999999999999e-243 < t < 2.06000000000000001e-119Initial program 61.3%
remove-double-neg61.3%
associate-/l*52.0%
remove-double-neg52.0%
associate-/l*49.1%
Simplified49.1%
Taylor expanded in x around 0 66.7%
Taylor expanded in t around 0 75.2%
+-commutative75.2%
*-commutative75.2%
Simplified75.2%
if 2.06000000000000001e-119 < t Initial program 75.8%
remove-double-neg75.8%
associate-/l*81.2%
remove-double-neg81.2%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in b around 0 73.1%
associate-*r/77.4%
Simplified77.4%
Final simplification73.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -5.5e+41)
t_1
(if (<= t -2.4e+19)
(* t (/ (/ x b) y))
(if (or (<= t -9e-61) (not (<= t 1.7e-91))) t_1 (/ z b))))))
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 <= -5.5e+41) {
tmp = t_1;
} else if (t <= -2.4e+19) {
tmp = t * ((x / b) / y);
} else if ((t <= -9e-61) || !(t <= 1.7e-91)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-5.5d+41)) then
tmp = t_1
else if (t <= (-2.4d+19)) then
tmp = t * ((x / b) / y)
else if ((t <= (-9d-61)) .or. (.not. (t <= 1.7d-91))) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -5.5e+41) {
tmp = t_1;
} else if (t <= -2.4e+19) {
tmp = t * ((x / b) / y);
} else if ((t <= -9e-61) || !(t <= 1.7e-91)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -5.5e+41: tmp = t_1 elif t <= -2.4e+19: tmp = t * ((x / b) / y) elif (t <= -9e-61) or not (t <= 1.7e-91): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -5.5e+41) tmp = t_1; elseif (t <= -2.4e+19) tmp = Float64(t * Float64(Float64(x / b) / y)); elseif ((t <= -9e-61) || !(t <= 1.7e-91)) 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 / (a + 1.0); tmp = 0.0; if (t <= -5.5e+41) tmp = t_1; elseif (t <= -2.4e+19) tmp = t * ((x / b) / y); elseif ((t <= -9e-61) || ~((t <= 1.7e-91))) tmp = t_1; else tmp = z / b; 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, -5.5e+41], t$95$1, If[LessEqual[t, -2.4e+19], N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -9e-61], N[Not[LessEqual[t, 1.7e-91]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-61} \lor \neg \left(t \leq 1.7 \cdot 10^{-91}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -5.5000000000000003e41 or -2.4e19 < t < -9e-61 or 1.70000000000000013e-91 < t Initial program 81.2%
remove-double-neg81.2%
associate-/l*85.2%
remove-double-neg85.2%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around 0 63.6%
if -5.5000000000000003e41 < t < -2.4e19Initial program 72.2%
remove-double-neg72.2%
associate-/l*72.4%
remove-double-neg72.4%
associate-/l*86.0%
Simplified86.0%
Taylor expanded in x around inf 59.1%
associate-+r+59.1%
associate-*r/72.7%
Simplified72.7%
Taylor expanded in b around inf 57.5%
associate-/l*58.5%
associate-/r*85.2%
Simplified85.2%
if -9e-61 < t < 1.70000000000000013e-91Initial program 58.8%
remove-double-neg58.8%
associate-/l*49.8%
remove-double-neg49.8%
associate-/l*44.5%
Simplified44.5%
Taylor expanded in y around inf 60.3%
Final simplification62.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.5e+41)
t_1
(if (<= t -3.2e+20)
(* (/ x b) (/ t y))
(if (or (<= t -2.15e-60) (not (<= t 1.5e-90))) t_1 (/ z b))))))
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 <= -6.5e+41) {
tmp = t_1;
} else if (t <= -3.2e+20) {
tmp = (x / b) * (t / y);
} else if ((t <= -2.15e-60) || !(t <= 1.5e-90)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-6.5d+41)) then
tmp = t_1
else if (t <= (-3.2d+20)) then
tmp = (x / b) * (t / y)
else if ((t <= (-2.15d-60)) .or. (.not. (t <= 1.5d-90))) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -6.5e+41) {
tmp = t_1;
} else if (t <= -3.2e+20) {
tmp = (x / b) * (t / y);
} else if ((t <= -2.15e-60) || !(t <= 1.5e-90)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -6.5e+41: tmp = t_1 elif t <= -3.2e+20: tmp = (x / b) * (t / y) elif (t <= -2.15e-60) or not (t <= 1.5e-90): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -6.5e+41) tmp = t_1; elseif (t <= -3.2e+20) tmp = Float64(Float64(x / b) * Float64(t / y)); elseif ((t <= -2.15e-60) || !(t <= 1.5e-90)) 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 / (a + 1.0); tmp = 0.0; if (t <= -6.5e+41) tmp = t_1; elseif (t <= -3.2e+20) tmp = (x / b) * (t / y); elseif ((t <= -2.15e-60) || ~((t <= 1.5e-90))) tmp = t_1; else tmp = z / b; 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, -6.5e+41], t$95$1, If[LessEqual[t, -3.2e+20], N[(N[(x / b), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.15e-60], N[Not[LessEqual[t, 1.5e-90]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{+20}:\\
\;\;\;\;\frac{x}{b} \cdot \frac{t}{y}\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{-60} \lor \neg \left(t \leq 1.5 \cdot 10^{-90}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -6.49999999999999975e41 or -3.2e20 < t < -2.15e-60 or 1.5000000000000001e-90 < t Initial program 81.2%
remove-double-neg81.2%
associate-/l*85.2%
remove-double-neg85.2%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around 0 63.6%
if -6.49999999999999975e41 < t < -3.2e20Initial program 72.2%
remove-double-neg72.2%
associate-/l*72.4%
remove-double-neg72.4%
associate-/l*86.0%
Simplified86.0%
Taylor expanded in x around inf 59.1%
associate-+r+59.1%
associate-*r/72.7%
Simplified72.7%
Taylor expanded in b around inf 57.5%
*-commutative57.5%
times-frac85.7%
Applied egg-rr85.7%
if -2.15e-60 < t < 1.5000000000000001e-90Initial program 58.8%
remove-double-neg58.8%
associate-/l*49.8%
remove-double-neg49.8%
associate-/l*44.5%
Simplified44.5%
Taylor expanded in y around inf 60.3%
Final simplification62.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.7e-60) (not (<= t 2.7e-91))) (/ 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 <= -2.7e-60) || !(t <= 2.7e-91)) {
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 <= (-2.7d-60)) .or. (.not. (t <= 2.7d-91))) 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 <= -2.7e-60) || !(t <= 2.7e-91)) {
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 <= -2.7e-60) or not (t <= 2.7e-91): 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 <= -2.7e-60) || !(t <= 2.7e-91)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * 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 <= -2.7e-60) || ~((t <= 2.7e-91))) 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, -2.7e-60], N[Not[LessEqual[t, 2.7e-91]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-60} \lor \neg \left(t \leq 2.7 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.7e-60 or 2.6999999999999997e-91 < t Initial program 80.7%
remove-double-neg80.7%
associate-/l*84.6%
remove-double-neg84.6%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in x around inf 65.7%
if -2.7e-60 < t < 2.6999999999999997e-91Initial program 58.8%
remove-double-neg58.8%
associate-/l*49.8%
remove-double-neg49.8%
associate-/l*44.5%
Simplified44.5%
Taylor expanded in y around inf 60.3%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.5e-61) (not (<= t 4.7e-92))) (/ x (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-61) || !(t <= 4.7e-92)) {
tmp = x / ((a + 1.0) + (b * (y / 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 <= (-9.5d-61)) .or. (.not. (t <= 4.7d-92))) then
tmp = x / ((a + 1.0d0) + (b * (y / 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 <= -9.5e-61) || !(t <= 4.7e-92)) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.5e-61) or not (t <= 4.7e-92): tmp = x / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.5e-61) || !(t <= 4.7e-92)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / 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 <= -9.5e-61) || ~((t <= 4.7e-92))) tmp = x / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.5e-61], N[Not[LessEqual[t, 4.7e-92]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-61} \lor \neg \left(t \leq 4.7 \cdot 10^{-92}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -9.49999999999999986e-61 or 4.69999999999999993e-92 < t Initial program 80.7%
remove-double-neg80.7%
associate-/l*84.6%
remove-double-neg84.6%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in x around inf 65.7%
associate-+r+65.7%
associate-*r/68.9%
Simplified68.9%
if -9.49999999999999986e-61 < t < 4.69999999999999993e-92Initial program 58.8%
remove-double-neg58.8%
associate-/l*49.8%
remove-double-neg49.8%
associate-/l*44.5%
Simplified44.5%
Taylor expanded in y around inf 60.3%
Final simplification65.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.4e-60) (not (<= t 9e-103))) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e-60) || !(t <= 9e-103)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.4d-60)) .or. (.not. (t <= 9d-103))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e-60) || !(t <= 9e-103)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.4e-60) or not (t <= 9e-103): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.4e-60) || !(t <= 9e-103)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.4e-60) || ~((t <= 9e-103))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.4e-60], N[Not[LessEqual[t, 9e-103]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-60} \lor \neg \left(t \leq 9 \cdot 10^{-103}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.4000000000000001e-60 or 9e-103 < t Initial program 81.1%
remove-double-neg81.1%
associate-/l*84.9%
remove-double-neg84.9%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in b around 0 74.3%
associate-*r/79.0%
Simplified79.0%
if -1.4000000000000001e-60 < t < 9e-103Initial program 57.7%
remove-double-neg57.7%
associate-/l*48.4%
remove-double-neg48.4%
associate-/l*43.9%
Simplified43.9%
Taylor expanded in y around inf 61.0%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.2e-60) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (if (<= t 8.5e-101) (/ z b) (/ (+ x (* y (/ z t))) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.2e-60) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 8.5e-101) {
tmp = z / b;
} else {
tmp = (x + (y * (z / 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 (t <= (-2.2d-60)) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else if (t <= 8.5d-101) then
tmp = z / b
else
tmp = (x + (y * (z / 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 (t <= -2.2e-60) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 8.5e-101) {
tmp = z / b;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.2e-60: tmp = (x + (y / (t / z))) / (a + 1.0) elif t <= 8.5e-101: tmp = z / b else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.2e-60) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); elseif (t <= 8.5e-101) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.2e-60) tmp = (x + (y / (t / z))) / (a + 1.0); elseif (t <= 8.5e-101) tmp = z / b; else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.2e-60], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-101], N[(z / b), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -2.1999999999999999e-60Initial program 83.7%
remove-double-neg83.7%
associate-/l*85.7%
remove-double-neg85.7%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in b around 0 73.3%
associate-*r/78.1%
Simplified78.1%
clear-num78.1%
un-div-inv78.1%
Applied egg-rr78.1%
if -2.1999999999999999e-60 < t < 8.49999999999999941e-101Initial program 57.7%
remove-double-neg57.7%
associate-/l*48.4%
remove-double-neg48.4%
associate-/l*43.9%
Simplified43.9%
Taylor expanded in y around inf 61.0%
if 8.49999999999999941e-101 < t Initial program 78.2%
remove-double-neg78.2%
associate-/l*84.0%
remove-double-neg84.0%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in b around 0 75.4%
associate-*r/79.9%
Simplified79.9%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -8.2e-61) (not (<= t 1.22e-91))) (/ 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.2e-61) || !(t <= 1.22e-91)) {
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.2d-61)) .or. (.not. (t <= 1.22d-91))) 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.2e-61) || !(t <= 1.22e-91)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.2e-61) or not (t <= 1.22e-91): 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.2e-61) || !(t <= 1.22e-91)) 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.2e-61) || ~((t <= 1.22e-91))) 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.2e-61], N[Not[LessEqual[t, 1.22e-91]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-61} \lor \neg \left(t \leq 1.22 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -8.19999999999999998e-61 or 1.21999999999999998e-91 < t Initial program 80.7%
remove-double-neg80.7%
associate-/l*84.6%
remove-double-neg84.6%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in y around 0 61.3%
if -8.19999999999999998e-61 < t < 1.21999999999999998e-91Initial program 58.8%
remove-double-neg58.8%
associate-/l*49.8%
remove-double-neg49.8%
associate-/l*44.5%
Simplified44.5%
Taylor expanded in y around inf 60.3%
Final simplification60.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6900000000.0) (not (<= y 3.4e+38))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6900000000.0) || !(y <= 3.4e+38)) {
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 <= (-6900000000.0d0)) .or. (.not. (y <= 3.4d+38))) 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 <= -6900000000.0) || !(y <= 3.4e+38)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6900000000.0) or not (y <= 3.4e+38): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6900000000.0) || !(y <= 3.4e+38)) 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 <= -6900000000.0) || ~((y <= 3.4e+38))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6900000000.0], N[Not[LessEqual[y, 3.4e+38]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6900000000 \lor \neg \left(y \leq 3.4 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -6.9e9 or 3.39999999999999996e38 < y Initial program 48.9%
remove-double-neg48.9%
associate-/l*53.3%
remove-double-neg53.3%
associate-/l*61.5%
Simplified61.5%
Taylor expanded in y around inf 52.9%
if -6.9e9 < y < 3.39999999999999996e38Initial program 93.4%
remove-double-neg93.4%
associate-/l*85.7%
remove-double-neg85.7%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in x around inf 70.4%
associate-+r+70.4%
associate-*r/70.4%
Simplified70.4%
Taylor expanded in a around inf 43.0%
Final simplification47.9%
(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 71.3%
remove-double-neg71.3%
associate-/l*69.6%
remove-double-neg69.6%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in x around inf 50.1%
associate-+r+50.1%
associate-*r/51.9%
Simplified51.9%
Taylor expanded in a around inf 30.5%
Final simplification30.5%
(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 2024048
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))