
(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 (+ 1.0 (+ a (/ (* y b) t))))
(t_2 (/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t)))))))
(if (<= t -1.5e-180)
t_2
(if (<= t 1.6e-214)
(+ (/ z b) (/ (* t x) (* y b)))
(if (<= t 1.85e-38) (* z (+ (/ x (* z t_1)) (/ y (* t t_1)))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + (a + ((y * b) / t));
double t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
double tmp;
if (t <= -1.5e-180) {
tmp = t_2;
} else if (t <= 1.6e-214) {
tmp = (z / b) + ((t * x) / (y * b));
} else if (t <= 1.85e-38) {
tmp = z * ((x / (z * t_1)) + (y / (t * 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 = 1.0d0 + (a + ((y * b) / t))
t_2 = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
if (t <= (-1.5d-180)) then
tmp = t_2
else if (t <= 1.6d-214) then
tmp = (z / b) + ((t * x) / (y * b))
else if (t <= 1.85d-38) then
tmp = z * ((x / (z * t_1)) + (y / (t * 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 = 1.0 + (a + ((y * b) / t));
double t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
double tmp;
if (t <= -1.5e-180) {
tmp = t_2;
} else if (t <= 1.6e-214) {
tmp = (z / b) + ((t * x) / (y * b));
} else if (t <= 1.85e-38) {
tmp = z * ((x / (z * t_1)) + (y / (t * t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 + (a + ((y * b) / t)) t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) tmp = 0 if t <= -1.5e-180: tmp = t_2 elif t <= 1.6e-214: tmp = (z / b) + ((t * x) / (y * b)) elif t <= 1.85e-38: tmp = z * ((x / (z * t_1)) + (y / (t * t_1))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))) tmp = 0.0 if (t <= -1.5e-180) tmp = t_2; elseif (t <= 1.6e-214) tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))); elseif (t <= 1.85e-38) tmp = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 + (a + ((y * b) / t)); t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); tmp = 0.0; if (t <= -1.5e-180) tmp = t_2; elseif (t <= 1.6e-214) tmp = (z / b) + ((t * x) / (y * b)); elseif (t <= 1.85e-38) tmp = z * ((x / (z * t_1)) + (y / (t * t_1))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.5e-180], t$95$2, If[LessEqual[t, 1.6e-214], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e-38], N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \left(a + \frac{y \cdot b}{t}\right)\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{if}\;t \leq -1.5 \cdot 10^{-180}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-214}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-38}:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.5e-180 or 1.85e-38 < t Initial program 80.7%
*-un-lft-identity80.7%
*-un-lft-identity80.7%
associate-/l*84.8%
associate-+l+84.8%
associate-/l*91.2%
Applied egg-rr91.2%
if -1.5e-180 < t < 1.60000000000000007e-214Initial program 43.7%
Taylor expanded in b around inf 50.4%
Taylor expanded in t around 0 87.0%
if 1.60000000000000007e-214 < t < 1.85e-38Initial program 76.2%
Taylor expanded in z around inf 86.6%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0)))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 t_1)))
(if (<= t_3 -1e-81)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_3 0.0)
(/ t_2 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_3 2e+295) t_3 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double tmp;
if (t_3 <= -1e-81) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 0.0) {
tmp = t_2 / ((a + 1.0) + (y / (t / b)));
} else if (t_3 <= 2e+295) {
tmp = t_3;
} 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((y * b) / t) + (a + 1.0d0)
t_2 = x + ((y * z) / t)
t_3 = t_2 / t_1
if (t_3 <= (-1d-81)) then
tmp = (x + (z * (y / t))) / t_1
else if (t_3 <= 0.0d0) then
tmp = t_2 / ((a + 1.0d0) + (y / (t / b)))
else if (t_3 <= 2d+295) then
tmp = t_3
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 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double tmp;
if (t_3 <= -1e-81) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= 0.0) {
tmp = t_2 / ((a + 1.0) + (y / (t / b)));
} else if (t_3 <= 2e+295) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = x + ((y * z) / t) t_3 = t_2 / t_1 tmp = 0 if t_3 <= -1e-81: tmp = (x + (z * (y / t))) / t_1 elif t_3 <= 0.0: tmp = t_2 / ((a + 1.0) + (y / (t / b))) elif t_3 <= 2e+295: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / t_1) tmp = 0.0 if (t_3 <= -1e-81) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_3 <= 0.0) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_3 <= 2e+295) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = x + ((y * z) / t); t_3 = t_2 / t_1; tmp = 0.0; if (t_3 <= -1e-81) tmp = (x + (z * (y / t))) / t_1; elseif (t_3 <= 0.0) tmp = t_2 / ((a + 1.0) + (y / (t / b))); elseif (t_3 <= 2e+295) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-81], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+295], t$95$3, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-81}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;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))) < -9.9999999999999996e-82Initial program 83.6%
*-commutative83.6%
associate-/l*86.9%
Applied egg-rr86.9%
if -9.9999999999999996e-82 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0Initial program 76.6%
associate-/l*80.8%
clear-num80.8%
un-div-inv80.8%
Applied egg-rr80.8%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e295Initial program 99.8%
if 2e295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 5.9%
Taylor expanded in y around inf 77.7%
Final simplification88.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0)))
(t_2 (+ (/ z b) (/ (* t x) (* y b)))))
(if (<= t -1.6e+91)
t_1
(if (<= t -1.55e+73)
(/ z b)
(if (<= t -8.2e-103)
t_1
(if (<= t 1.6e-193)
t_2
(if (<= t 7.8e-159)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 1.52e-86) t_2 (/ (+ x (* y (/ z t))) (+ a 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double t_2 = (z / b) + ((t * x) / (y * b));
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if (t <= -8.2e-103) {
tmp = t_1;
} else if (t <= 1.6e-193) {
tmp = t_2;
} else if (t <= 7.8e-159) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 1.52e-86) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
t_2 = (z / b) + ((t * x) / (y * b))
if (t <= (-1.6d+91)) then
tmp = t_1
else if (t <= (-1.55d+73)) then
tmp = z / b
else if (t <= (-8.2d-103)) then
tmp = t_1
else if (t <= 1.6d-193) then
tmp = t_2
else if (t <= 7.8d-159) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 1.52d-86) then
tmp = t_2
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 t_1 = (x + (y / (t / z))) / (a + 1.0);
double t_2 = (z / b) + ((t * x) / (y * b));
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if (t <= -8.2e-103) {
tmp = t_1;
} else if (t <= 1.6e-193) {
tmp = t_2;
} else if (t <= 7.8e-159) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 1.52e-86) {
tmp = t_2;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / (a + 1.0) t_2 = (z / b) + ((t * x) / (y * b)) tmp = 0 if t <= -1.6e+91: tmp = t_1 elif t <= -1.55e+73: tmp = z / b elif t <= -8.2e-103: tmp = t_1 elif t <= 1.6e-193: tmp = t_2 elif t <= 7.8e-159: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 1.52e-86: tmp = t_2 else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)) t_2 = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))) tmp = 0.0 if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = Float64(z / b); elseif (t <= -8.2e-103) tmp = t_1; elseif (t <= 1.6e-193) tmp = t_2; elseif (t <= 7.8e-159) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 1.52e-86) tmp = t_2; 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) t_1 = (x + (y / (t / z))) / (a + 1.0); t_2 = (z / b) + ((t * x) / (y * b)); tmp = 0.0; if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = z / b; elseif (t <= -8.2e-103) tmp = t_1; elseif (t <= 1.6e-193) tmp = t_2; elseif (t <= 7.8e-159) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 1.52e-86) tmp = t_2; else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[LessEqual[t, -8.2e-103], t$95$1, If[LessEqual[t, 1.6e-193], t$95$2, If[LessEqual[t, 7.8e-159], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.52e-86], t$95$2, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
t_2 := \frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-159}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 1.52 \cdot 10^{-86}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or -1.55e73 < t < -8.19999999999999992e-103Initial program 82.7%
associate-/l*87.5%
clear-num87.5%
un-div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in y around 0 82.0%
if -1.59999999999999995e91 < t < -1.55e73Initial program 21.2%
Taylor expanded in y around inf 100.0%
if -8.19999999999999992e-103 < t < 1.60000000000000003e-193 or 7.79999999999999953e-159 < t < 1.52e-86Initial program 56.5%
Taylor expanded in b around inf 49.2%
Taylor expanded in t around 0 78.3%
if 1.60000000000000003e-193 < t < 7.79999999999999953e-159Initial program 99.5%
Taylor expanded in x around 0 99.5%
if 1.52e-86 < t Initial program 81.2%
*-un-lft-identity81.2%
*-un-lft-identity81.2%
associate-/l*84.7%
associate-+l+84.7%
associate-/l*88.2%
Applied egg-rr88.2%
Taylor expanded in y around 0 75.5%
Final simplification79.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t)))))))
(if (<= t -2e-180)
t_2
(if (<= t 1.1e-203)
(+ (/ z b) (/ (* t x) (* y b)))
(if (<= t 2e-152)
(/ (+ x (* z (/ y t))) (+ t_1 (+ a 1.0)))
(if (<= t 7.2e-125) (/ (* y z) (* t (+ 1.0 (+ a t_1)))) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
double tmp;
if (t <= -2e-180) {
tmp = t_2;
} else if (t <= 1.1e-203) {
tmp = (z / b) + ((t * x) / (y * b));
} else if (t <= 2e-152) {
tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0));
} else if (t <= 7.2e-125) {
tmp = (y * z) / (t * (1.0 + (a + 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 = (y * b) / t
t_2 = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
if (t <= (-2d-180)) then
tmp = t_2
else if (t <= 1.1d-203) then
tmp = (z / b) + ((t * x) / (y * b))
else if (t <= 2d-152) then
tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0d0))
else if (t <= 7.2d-125) then
tmp = (y * z) / (t * (1.0d0 + (a + 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 = (y * b) / t;
double t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
double tmp;
if (t <= -2e-180) {
tmp = t_2;
} else if (t <= 1.1e-203) {
tmp = (z / b) + ((t * x) / (y * b));
} else if (t <= 2e-152) {
tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0));
} else if (t <= 7.2e-125) {
tmp = (y * z) / (t * (1.0 + (a + t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) tmp = 0 if t <= -2e-180: tmp = t_2 elif t <= 1.1e-203: tmp = (z / b) + ((t * x) / (y * b)) elif t <= 2e-152: tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0)) elif t <= 7.2e-125: tmp = (y * z) / (t * (1.0 + (a + t_1))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))) tmp = 0.0 if (t <= -2e-180) tmp = t_2; elseif (t <= 1.1e-203) tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))); elseif (t <= 2e-152) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(t_1 + Float64(a + 1.0))); elseif (t <= 7.2e-125) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + t_1)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); tmp = 0.0; if (t <= -2e-180) tmp = t_2; elseif (t <= 1.1e-203) tmp = (z / b) + ((t * x) / (y * b)); elseif (t <= 2e-152) tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0)); elseif (t <= 7.2e-125) tmp = (y * z) / (t * (1.0 + (a + t_1))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-180], t$95$2, If[LessEqual[t, 1.1e-203], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-152], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-125], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-180}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-203}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-152}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1 + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{-125}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2e-180 or 7.2000000000000004e-125 < t Initial program 80.3%
*-un-lft-identity80.3%
*-un-lft-identity80.3%
associate-/l*84.0%
associate-+l+84.0%
associate-/l*89.4%
Applied egg-rr89.4%
if -2e-180 < t < 1.1e-203Initial program 44.1%
Taylor expanded in b around inf 48.3%
Taylor expanded in t around 0 85.4%
if 1.1e-203 < t < 2.00000000000000013e-152Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
Applied egg-rr99.7%
if 2.00000000000000013e-152 < t < 7.2000000000000004e-125Initial program 56.3%
Taylor expanded in x around 0 77.6%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t))))))
(t_2 (+ (/ z b) (/ (* t x) (* y b)))))
(if (<= t -9.2e-179)
t_1
(if (<= t 2.15e-193)
t_2
(if (<= t 1.95e-159)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 1.9e-127) t_2 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 t_2 = (z / b) + ((t * x) / (y * b));
double tmp;
if (t <= -9.2e-179) {
tmp = t_1;
} else if (t <= 2.15e-193) {
tmp = t_2;
} else if (t <= 1.95e-159) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 1.9e-127) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
t_2 = (z / b) + ((t * x) / (y * b))
if (t <= (-9.2d-179)) then
tmp = t_1
else if (t <= 2.15d-193) then
tmp = t_2
else if (t <= 1.95d-159) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 1.9d-127) then
tmp = t_2
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 t_2 = (z / b) + ((t * x) / (y * b));
double tmp;
if (t <= -9.2e-179) {
tmp = t_1;
} else if (t <= 2.15e-193) {
tmp = t_2;
} else if (t <= 1.95e-159) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 1.9e-127) {
tmp = t_2;
} 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)))) t_2 = (z / b) + ((t * x) / (y * b)) tmp = 0 if t <= -9.2e-179: tmp = t_1 elif t <= 2.15e-193: tmp = t_2 elif t <= 1.95e-159: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 1.9e-127: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))) t_2 = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))) tmp = 0.0 if (t <= -9.2e-179) tmp = t_1; elseif (t <= 2.15e-193) tmp = t_2; elseif (t <= 1.95e-159) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 1.9e-127) tmp = t_2; 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)))); t_2 = (z / b) + ((t * x) / (y * b)); tmp = 0.0; if (t <= -9.2e-179) tmp = t_1; elseif (t <= 2.15e-193) tmp = t_2; elseif (t <= 1.95e-159) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 1.9e-127) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e-179], t$95$1, If[LessEqual[t, 2.15e-193], t$95$2, If[LessEqual[t, 1.95e-159], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-127], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
t_2 := \frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-159}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -9.1999999999999995e-179 or 1.90000000000000001e-127 < t Initial program 80.1%
*-un-lft-identity80.1%
*-un-lft-identity80.1%
associate-/l*83.3%
associate-+l+83.3%
associate-/l*88.6%
Applied egg-rr88.6%
if -9.1999999999999995e-179 < t < 2.1500000000000001e-193 or 1.94999999999999988e-159 < t < 1.90000000000000001e-127Initial program 49.1%
Taylor expanded in b around inf 52.1%
Taylor expanded in t around 0 87.6%
if 2.1500000000000001e-193 < t < 1.94999999999999988e-159Initial program 99.5%
Taylor expanded in x around 0 99.5%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0))))
(if (<= t -1.6e+91)
t_1
(if (<= t -1.55e+73)
(/ z b)
(if (or (<= t -2.4e-101) (not (<= t 5e-86)))
t_1
(+ (/ z b) (/ (* t x) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if ((t <= -2.4e-101) || !(t <= 5e-86)) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * x) / (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) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / (a + 1.0d0)
if (t <= (-1.6d+91)) then
tmp = t_1
else if (t <= (-1.55d+73)) then
tmp = z / b
else if ((t <= (-2.4d-101)) .or. (.not. (t <= 5d-86))) then
tmp = t_1
else
tmp = (z / b) + ((t * x) / (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 t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if ((t <= -2.4e-101) || !(t <= 5e-86)) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * x) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / (a + 1.0) tmp = 0 if t <= -1.6e+91: tmp = t_1 elif t <= -1.55e+73: tmp = z / b elif (t <= -2.4e-101) or not (t <= 5e-86): tmp = t_1 else: tmp = (z / b) + ((t * x) / (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = Float64(z / b); elseif ((t <= -2.4e-101) || !(t <= 5e-86)) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / (a + 1.0); tmp = 0.0; if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = z / b; elseif ((t <= -2.4e-101) || ~((t <= 5e-86))) tmp = t_1; else tmp = (z / b) + ((t * x) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, -2.4e-101], N[Not[LessEqual[t, 5e-86]], $MachinePrecision]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-101} \lor \neg \left(t \leq 5 \cdot 10^{-86}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or -1.55e73 < t < -2.4e-101 or 4.9999999999999999e-86 < t Initial program 82.0%
*-un-lft-identity82.0%
*-un-lft-identity82.0%
associate-/l*86.2%
associate-+l+86.2%
associate-/l*91.6%
Applied egg-rr91.6%
Taylor expanded in y around 0 79.0%
if -1.59999999999999995e91 < t < -1.55e73Initial program 21.2%
Taylor expanded in y around inf 100.0%
if -2.4e-101 < t < 4.9999999999999999e-86Initial program 59.9%
Taylor expanded in b around inf 47.0%
Taylor expanded in t around 0 73.8%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (/ (* y b) t))))))
(if (<= t -1.6e+91)
t_1
(if (<= t -1.8e+68)
(/ z b)
(if (or (<= t -7.2e-34) (not (<= t 6.2e-117)))
t_1
(+ (/ z b) (/ (* t x) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + ((y * b) / t)));
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.8e+68) {
tmp = z / b;
} else if ((t <= -7.2e-34) || !(t <= 6.2e-117)) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * x) / (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) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 + (a + ((y * b) / t)))
if (t <= (-1.6d+91)) then
tmp = t_1
else if (t <= (-1.8d+68)) then
tmp = z / b
else if ((t <= (-7.2d-34)) .or. (.not. (t <= 6.2d-117))) then
tmp = t_1
else
tmp = (z / b) + ((t * x) / (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 t_1 = x / (1.0 + (a + ((y * b) / t)));
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.8e+68) {
tmp = z / b;
} else if ((t <= -7.2e-34) || !(t <= 6.2e-117)) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * x) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + ((y * b) / t))) tmp = 0 if t <= -1.6e+91: tmp = t_1 elif t <= -1.8e+68: tmp = z / b elif (t <= -7.2e-34) or not (t <= 6.2e-117): tmp = t_1 else: tmp = (z / b) + ((t * x) / (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))) tmp = 0.0 if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.8e+68) tmp = Float64(z / b); elseif ((t <= -7.2e-34) || !(t <= 6.2e-117)) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + (a + ((y * b) / t))); tmp = 0.0; if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.8e+68) tmp = z / b; elseif ((t <= -7.2e-34) || ~((t <= 6.2e-117))) tmp = t_1; else tmp = (z / b) + ((t * x) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.8e+68], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, -7.2e-34], N[Not[LessEqual[t, 6.2e-117]], $MachinePrecision]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-34} \lor \neg \left(t \leq 6.2 \cdot 10^{-117}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or -1.7999999999999999e68 < t < -7.20000000000000016e-34 or 6.20000000000000022e-117 < t Initial program 81.4%
Taylor expanded in x around inf 70.7%
if -1.59999999999999995e91 < t < -1.7999999999999999e68Initial program 34.1%
Taylor expanded in y around inf 84.2%
if -7.20000000000000016e-34 < t < 6.20000000000000022e-117Initial program 63.4%
Taylor expanded in b around inf 47.5%
Taylor expanded in t around 0 72.4%
Final simplification71.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.6e+91)
t_1
(if (<= t -9.5e+67)
(/ z b)
(if (or (<= t -4.4e-34) (not (<= t 5.3e-86)))
t_1
(+ (/ z b) (/ (* t x) (* y 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 <= -1.6e+91) {
tmp = t_1;
} else if (t <= -9.5e+67) {
tmp = z / b;
} else if ((t <= -4.4e-34) || !(t <= 5.3e-86)) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * x) / (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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.6d+91)) then
tmp = t_1
else if (t <= (-9.5d+67)) then
tmp = z / b
else if ((t <= (-4.4d-34)) .or. (.not. (t <= 5.3d-86))) then
tmp = t_1
else
tmp = (z / b) + ((t * x) / (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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -9.5e+67) {
tmp = z / b;
} else if ((t <= -4.4e-34) || !(t <= 5.3e-86)) {
tmp = t_1;
} else {
tmp = (z / b) + ((t * x) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.6e+91: tmp = t_1 elif t <= -9.5e+67: tmp = z / b elif (t <= -4.4e-34) or not (t <= 5.3e-86): tmp = t_1 else: tmp = (z / b) + ((t * x) / (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.6e+91) tmp = t_1; elseif (t <= -9.5e+67) tmp = Float64(z / b); elseif ((t <= -4.4e-34) || !(t <= 5.3e-86)) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * 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 <= -1.6e+91) tmp = t_1; elseif (t <= -9.5e+67) tmp = z / b; elseif ((t <= -4.4e-34) || ~((t <= 5.3e-86))) tmp = t_1; else tmp = (z / b) + ((t * x) / (y * 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, -1.6e+91], t$95$1, If[LessEqual[t, -9.5e+67], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, -4.4e-34], N[Not[LessEqual[t, 5.3e-86]], $MachinePrecision]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{+67}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-34} \lor \neg \left(t \leq 5.3 \cdot 10^{-86}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or -9.5000000000000002e67 < t < -4.3999999999999998e-34 or 5.2999999999999997e-86 < t Initial program 80.9%
Taylor expanded in y around 0 68.4%
if -1.59999999999999995e91 < t < -9.5000000000000002e67Initial program 34.1%
Taylor expanded in y around inf 84.2%
if -4.3999999999999998e-34 < t < 5.2999999999999997e-86Initial program 65.0%
Taylor expanded in b around inf 47.6%
Taylor expanded in t around 0 71.4%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= t -1.6e+91)
t_1
(if (<= t -1.55e+73)
(/ z b)
(if (<= t -1.75e-102)
t_1
(if (<= t 4.8e-86)
(+ (/ z b) (/ (* t x) (* y b)))
(/ (+ x (* y (/ z t))) (+ a 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if (t <= -1.75e-102) {
tmp = t_1;
} else if (t <= 4.8e-86) {
tmp = (z / b) + ((t * x) / (y * 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) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
if (t <= (-1.6d+91)) then
tmp = t_1
else if (t <= (-1.55d+73)) then
tmp = z / b
else if (t <= (-1.75d-102)) then
tmp = t_1
else if (t <= 4.8d-86) then
tmp = (z / b) + ((t * x) / (y * 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 t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if (t <= -1.75e-102) {
tmp = t_1;
} else if (t <= 4.8e-86) {
tmp = (z / b) + ((t * x) / (y * b));
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / (a + 1.0) tmp = 0 if t <= -1.6e+91: tmp = t_1 elif t <= -1.55e+73: tmp = z / b elif t <= -1.75e-102: tmp = t_1 elif t <= 4.8e-86: tmp = (z / b) + ((t * x) / (y * b)) else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = Float64(z / b); elseif (t <= -1.75e-102) tmp = t_1; elseif (t <= 4.8e-86) tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * 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) t_1 = (x + (y / (t / z))) / (a + 1.0); tmp = 0.0; if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = z / b; elseif (t <= -1.75e-102) tmp = t_1; elseif (t <= 4.8e-86) tmp = (z / b) + ((t * x) / (y * b)); else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.75e-102], t$95$1, If[LessEqual[t, 4.8e-86], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $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}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or -1.55e73 < t < -1.74999999999999993e-102Initial program 82.7%
associate-/l*87.5%
clear-num87.5%
un-div-inv87.5%
Applied egg-rr87.5%
Taylor expanded in y around 0 82.0%
if -1.59999999999999995e91 < t < -1.55e73Initial program 21.2%
Taylor expanded in y around inf 100.0%
if -1.74999999999999993e-102 < t < 4.80000000000000026e-86Initial program 59.9%
Taylor expanded in b around inf 47.0%
Taylor expanded in t around 0 73.8%
if 4.80000000000000026e-86 < t Initial program 81.2%
*-un-lft-identity81.2%
*-un-lft-identity81.2%
associate-/l*84.7%
associate-+l+84.7%
associate-/l*88.2%
Applied egg-rr88.2%
Taylor expanded in y around 0 75.5%
Final simplification77.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0))))
(if (<= t -1.6e+91)
t_1
(if (<= t -1.55e+73)
(/ z b)
(if (<= t -2.25e-101)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 2.35e-85) (+ (/ z b) (/ (* t x) (* y b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if (t <= -2.25e-101) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 2.35e-85) {
tmp = (z / b) + ((t * x) / (y * 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 = (x + (y * (z / t))) / (a + 1.0d0)
if (t <= (-1.6d+91)) then
tmp = t_1
else if (t <= (-1.55d+73)) then
tmp = z / b
else if (t <= (-2.25d-101)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 2.35d-85) then
tmp = (z / b) + ((t * x) / (y * 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 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -1.6e+91) {
tmp = t_1;
} else if (t <= -1.55e+73) {
tmp = z / b;
} else if (t <= -2.25e-101) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 2.35e-85) {
tmp = (z / b) + ((t * x) / (y * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / (a + 1.0) tmp = 0 if t <= -1.6e+91: tmp = t_1 elif t <= -1.55e+73: tmp = z / b elif t <= -2.25e-101: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 2.35e-85: tmp = (z / b) + ((t * x) / (y * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = Float64(z / b); elseif (t <= -2.25e-101) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 2.35e-85) tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / (a + 1.0); tmp = 0.0; if (t <= -1.6e+91) tmp = t_1; elseif (t <= -1.55e+73) tmp = z / b; elseif (t <= -2.25e-101) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 2.35e-85) tmp = (z / b) + ((t * x) / (y * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[LessEqual[t, -2.25e-101], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e-85], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -2.25 \cdot 10^{-101}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-85}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or 2.35000000000000005e-85 < t Initial program 79.6%
*-un-lft-identity79.6%
*-un-lft-identity79.6%
associate-/l*84.7%
associate-+l+84.7%
associate-/l*91.3%
Applied egg-rr91.3%
Taylor expanded in y around 0 78.6%
if -1.59999999999999995e91 < t < -1.55e73Initial program 21.2%
Taylor expanded in y around inf 100.0%
if -1.55e73 < t < -2.2499999999999999e-101Initial program 93.2%
associate-/l*93.2%
clear-num93.2%
un-div-inv93.3%
Applied egg-rr93.3%
associate-/r/90.2%
Applied egg-rr90.2%
Taylor expanded in y around 0 80.5%
if -2.2499999999999999e-101 < t < 2.35000000000000005e-85Initial program 59.9%
Taylor expanded in b around inf 47.0%
Taylor expanded in t around 0 73.8%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.6e+91)
(and (not (<= t -1.25e+68)) (or (<= t -9e-35) (not (<= t 9e-118)))))
(/ x (+ a 1.0))
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e+91) || (!(t <= -1.25e+68) && ((t <= -9e-35) || !(t <= 9e-118)))) {
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 <= (-1.6d+91)) .or. (.not. (t <= (-1.25d+68))) .and. (t <= (-9d-35)) .or. (.not. (t <= 9d-118))) 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 <= -1.6e+91) || (!(t <= -1.25e+68) && ((t <= -9e-35) || !(t <= 9e-118)))) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.6e+91) or (not (t <= -1.25e+68) and ((t <= -9e-35) or not (t <= 9e-118))): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.6e+91) || (!(t <= -1.25e+68) && ((t <= -9e-35) || !(t <= 9e-118)))) 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 <= -1.6e+91) || (~((t <= -1.25e+68)) && ((t <= -9e-35) || ~((t <= 9e-118))))) 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, -1.6e+91], And[N[Not[LessEqual[t, -1.25e+68]], $MachinePrecision], Or[LessEqual[t, -9e-35], N[Not[LessEqual[t, 9e-118]], $MachinePrecision]]]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91} \lor \neg \left(t \leq -1.25 \cdot 10^{+68}\right) \land \left(t \leq -9 \cdot 10^{-35} \lor \neg \left(t \leq 9 \cdot 10^{-118}\right)\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.59999999999999995e91 or -1.2500000000000001e68 < t < -9.0000000000000002e-35 or 9.0000000000000001e-118 < t Initial program 81.4%
Taylor expanded in y around 0 67.9%
if -1.59999999999999995e91 < t < -1.2500000000000001e68 or -9.0000000000000002e-35 < t < 9.0000000000000001e-118Initial program 61.5%
Taylor expanded in y around inf 65.4%
Final simplification67.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -3.35e+87)
(/ x a)
(if (<= a -5.1e-54)
(/ z b)
(if (<= a 1.3e-144) x (if (<= a 3.4e-5) (/ z b) (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.35e+87) {
tmp = x / a;
} else if (a <= -5.1e-54) {
tmp = z / b;
} else if (a <= 1.3e-144) {
tmp = x;
} else if (a <= 3.4e-5) {
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 (a <= (-3.35d+87)) then
tmp = x / a
else if (a <= (-5.1d-54)) then
tmp = z / b
else if (a <= 1.3d-144) then
tmp = x
else if (a <= 3.4d-5) 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 (a <= -3.35e+87) {
tmp = x / a;
} else if (a <= -5.1e-54) {
tmp = z / b;
} else if (a <= 1.3e-144) {
tmp = x;
} else if (a <= 3.4e-5) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.35e+87: tmp = x / a elif a <= -5.1e-54: tmp = z / b elif a <= 1.3e-144: tmp = x elif a <= 3.4e-5: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.35e+87) tmp = Float64(x / a); elseif (a <= -5.1e-54) tmp = Float64(z / b); elseif (a <= 1.3e-144) tmp = x; elseif (a <= 3.4e-5) 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 (a <= -3.35e+87) tmp = x / a; elseif (a <= -5.1e-54) tmp = z / b; elseif (a <= 1.3e-144) tmp = x; elseif (a <= 3.4e-5) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.35e+87], N[(x / a), $MachinePrecision], If[LessEqual[a, -5.1e-54], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.3e-144], x, If[LessEqual[a, 3.4e-5], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.35 \cdot 10^{+87}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -5.1 \cdot 10^{-54}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-144}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-5}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -3.3500000000000002e87 or 3.4e-5 < a Initial program 78.3%
Taylor expanded in y around 0 63.0%
Taylor expanded in a around inf 60.5%
if -3.3500000000000002e87 < a < -5.1000000000000001e-54 or 1.3e-144 < a < 3.4e-5Initial program 71.4%
Taylor expanded in y around inf 50.9%
if -5.1000000000000001e-54 < a < 1.3e-144Initial program 72.2%
Taylor expanded in y around 0 46.9%
Taylor expanded in a around 0 46.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.0d0)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.0) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 1 < a Initial program 77.3%
Taylor expanded in y around 0 56.0%
Taylor expanded in a around inf 54.6%
if -1 < a < 1Initial program 71.6%
Taylor expanded in y around 0 40.1%
Taylor expanded in a around 0 39.0%
Final simplification46.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 74.2%
Taylor expanded in y around 0 47.5%
Taylor expanded in a around 0 22.7%
(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 2024097
(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))))