
(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 (if (<= (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))) 2e+301) (/ (+ x (/ z (/ t y))) (+ 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 (((x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))) <= 2e+301) {
tmp = (x + (z / (t / y))) / (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 (((x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))) <= 2d+301) then
tmp = (x + (z / (t / y))) / (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 (((x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))) <= 2e+301) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (b * (y / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))) <= 2e+301: tmp = (x + (z / (t / y))) / (a + (1.0 + (b * (y / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) <= 2e+301) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(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 (((x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))) <= 2e+301) tmp = (x + (z / (t / y))) / (a + (1.0 + (b * (y / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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], 2e+301], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + 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))) < 2.00000000000000011e301Initial program 86.4%
*-commutative86.4%
associate-/l*87.2%
associate-*l/90.3%
*-commutative90.3%
cancel-sign-sub90.3%
*-commutative90.3%
associate-*l/87.2%
associate-+r-87.2%
associate-*l/90.3%
*-commutative90.3%
cancel-sign-sub90.3%
*-commutative90.3%
associate-/r/84.8%
Simplified84.8%
associate-/r/90.3%
Applied egg-rr90.3%
if 2.00000000000000011e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 11.7%
*-commutative11.7%
associate-*l/17.9%
*-commutative17.9%
associate-*l/25.9%
Simplified25.9%
Taylor expanded in t around 0 82.0%
Final simplification88.7%
(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_1))
(t_3 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= t -3.2e-30)
t_2
(if (<= t -2.4e-61)
t_3
(if (<= t -3.6e-108)
t_2
(if (<= t -1.38e-164)
t_3
(if (<= t -5.5e-230)
t_2
(if (<= t 8e-273)
(/ (+ (* y z) (* x t)) (* y b))
(if (<= t 1.35e-203)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* z (/ y 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 t_2 = (x + (y * (z / t))) / t_1;
double t_3 = (z / b) + ((t / b) * (x / y));
double tmp;
if (t <= -3.2e-30) {
tmp = t_2;
} else if (t <= -2.4e-61) {
tmp = t_3;
} else if (t <= -3.6e-108) {
tmp = t_2;
} else if (t <= -1.38e-164) {
tmp = t_3;
} else if (t <= -5.5e-230) {
tmp = t_2;
} else if (t <= 8e-273) {
tmp = ((y * z) + (x * t)) / (y * b);
} else if (t <= 1.35e-203) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (z * (y / 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * (b / t)) + (a + 1.0d0)
t_2 = (x + (y * (z / t))) / t_1
t_3 = (z / b) + ((t / b) * (x / y))
if (t <= (-3.2d-30)) then
tmp = t_2
else if (t <= (-2.4d-61)) then
tmp = t_3
else if (t <= (-3.6d-108)) then
tmp = t_2
else if (t <= (-1.38d-164)) then
tmp = t_3
else if (t <= (-5.5d-230)) then
tmp = t_2
else if (t <= 8d-273) then
tmp = ((y * z) + (x * t)) / (y * b)
else if (t <= 1.35d-203) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (z * (y / 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 t_2 = (x + (y * (z / t))) / t_1;
double t_3 = (z / b) + ((t / b) * (x / y));
double tmp;
if (t <= -3.2e-30) {
tmp = t_2;
} else if (t <= -2.4e-61) {
tmp = t_3;
} else if (t <= -3.6e-108) {
tmp = t_2;
} else if (t <= -1.38e-164) {
tmp = t_3;
} else if (t <= -5.5e-230) {
tmp = t_2;
} else if (t <= 8e-273) {
tmp = ((y * z) + (x * t)) / (y * b);
} else if (t <= 1.35e-203) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (z * (y / t))) / t_1;
}
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_1 t_3 = (z / b) + ((t / b) * (x / y)) tmp = 0 if t <= -3.2e-30: tmp = t_2 elif t <= -2.4e-61: tmp = t_3 elif t <= -3.6e-108: tmp = t_2 elif t <= -1.38e-164: tmp = t_3 elif t <= -5.5e-230: tmp = t_2 elif t <= 8e-273: tmp = ((y * z) + (x * t)) / (y * b) elif t <= 1.35e-203: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (z * (y / 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)) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1) t_3 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (t <= -3.2e-30) tmp = t_2; elseif (t <= -2.4e-61) tmp = t_3; elseif (t <= -3.6e-108) tmp = t_2; elseif (t <= -1.38e-164) tmp = t_3; elseif (t <= -5.5e-230) tmp = t_2; elseif (t <= 8e-273) tmp = Float64(Float64(Float64(y * z) + Float64(x * t)) / Float64(y * b)); elseif (t <= 1.35e-203) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(z * Float64(y / 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); t_2 = (x + (y * (z / t))) / t_1; t_3 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (t <= -3.2e-30) tmp = t_2; elseif (t <= -2.4e-61) tmp = t_3; elseif (t <= -3.6e-108) tmp = t_2; elseif (t <= -1.38e-164) tmp = t_3; elseif (t <= -5.5e-230) tmp = t_2; elseif (t <= 8e-273) tmp = ((y * z) + (x * t)) / (y * b); elseif (t <= 1.35e-203) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (z * (y / 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]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-30], t$95$2, If[LessEqual[t, -2.4e-61], t$95$3, If[LessEqual[t, -3.6e-108], t$95$2, If[LessEqual[t, -1.38e-164], t$95$3, If[LessEqual[t, -5.5e-230], t$95$2, If[LessEqual[t, 8e-273], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-203], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / 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)\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{t_1}\\
t_3 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-61}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-108}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.38 \cdot 10^{-164}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-230}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-273}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-203}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\end{array}
\end{array}
if t < -3.2e-30 or -2.4000000000000001e-61 < t < -3.6000000000000001e-108 or -1.38000000000000003e-164 < t < -5.4999999999999997e-230Initial program 85.9%
*-commutative85.9%
associate-*l/89.1%
*-commutative89.1%
associate-*l/89.7%
Simplified89.7%
if -3.2e-30 < t < -2.4000000000000001e-61 or -3.6000000000000001e-108 < t < -1.38000000000000003e-164Initial program 52.4%
*-commutative52.4%
associate-*l/43.1%
*-commutative43.1%
associate-*l/38.4%
Simplified38.4%
Taylor expanded in b around inf 52.3%
Taylor expanded in t around 0 81.8%
times-frac81.7%
Simplified81.7%
if -5.4999999999999997e-230 < t < 8.000000000000001e-273Initial program 52.9%
*-commutative52.9%
associate-*l/49.2%
*-commutative49.2%
associate-*l/41.7%
Simplified41.7%
Taylor expanded in b around inf 60.5%
Taylor expanded in t around 0 81.8%
if 8.000000000000001e-273 < t < 1.34999999999999999e-203Initial program 47.0%
*-commutative47.0%
associate-*l/21.9%
*-commutative21.9%
associate-*l/21.7%
Simplified21.7%
Taylor expanded in x around 0 67.0%
Taylor expanded in t around 0 92.9%
if 1.34999999999999999e-203 < t Initial program 73.4%
*-commutative73.4%
associate-*l/78.0%
*-commutative78.0%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in z around 0 75.2%
*-commutative75.2%
associate-*r/84.4%
Simplified84.4%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= t -1.9e-27)
t_1
(if (<= t -6.8e-74)
(+ (/ z b) (* (/ t b) (/ x y)))
(if (<= t 6.6e-151)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (or (<= t 1.18e-91) (and (not (<= t 1.2e-35)) (<= t 1.75e+154)))
(/ (+ x (* z (/ y t))) (+ 1.0 (/ b (/ t y))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -1.9e-27) {
tmp = t_1;
} else if (t <= -6.8e-74) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (t <= 6.6e-151) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if ((t <= 1.18e-91) || (!(t <= 1.2e-35) && (t <= 1.75e+154))) {
tmp = (x + (z * (y / t))) / (1.0 + (b / (t / y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
if (t <= (-1.9d-27)) then
tmp = t_1
else if (t <= (-6.8d-74)) then
tmp = (z / b) + ((t / b) * (x / y))
else if (t <= 6.6d-151) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if ((t <= 1.18d-91) .or. (.not. (t <= 1.2d-35)) .and. (t <= 1.75d+154)) then
tmp = (x + (z * (y / t))) / (1.0d0 + (b / (t / y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -1.9e-27) {
tmp = t_1;
} else if (t <= -6.8e-74) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (t <= 6.6e-151) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if ((t <= 1.18e-91) || (!(t <= 1.2e-35) && (t <= 1.75e+154))) {
tmp = (x + (z * (y / t))) / (1.0 + (b / (t / y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / (a + 1.0) tmp = 0 if t <= -1.9e-27: tmp = t_1 elif t <= -6.8e-74: tmp = (z / b) + ((t / b) * (x / y)) elif t <= 6.6e-151: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif (t <= 1.18e-91) or (not (t <= 1.2e-35) and (t <= 1.75e+154)): tmp = (x + (z * (y / t))) / (1.0 + (b / (t / y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.9e-27) tmp = t_1; elseif (t <= -6.8e-74) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); elseif (t <= 6.6e-151) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif ((t <= 1.18e-91) || (!(t <= 1.2e-35) && (t <= 1.75e+154))) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(1.0 + Float64(b / Float64(t / y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y / (t / z))) / (a + 1.0); tmp = 0.0; if (t <= -1.9e-27) tmp = t_1; elseif (t <= -6.8e-74) tmp = (z / b) + ((t / b) * (x / y)); elseif (t <= 6.6e-151) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif ((t <= 1.18e-91) || (~((t <= 1.2e-35)) && (t <= 1.75e+154))) tmp = (x + (z * (y / t))) / (1.0 + (b / (t / y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e-27], t$95$1, If[LessEqual[t, -6.8e-74], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e-151], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.18e-91], And[N[Not[LessEqual[t, 1.2e-35]], $MachinePrecision], LessEqual[t, 1.75e+154]]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-74}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-151}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{-91} \lor \neg \left(t \leq 1.2 \cdot 10^{-35}\right) \land t \leq 1.75 \cdot 10^{+154}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{1 + \frac{b}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.9e-27 or 1.18e-91 < t < 1.2000000000000001e-35 or 1.7500000000000001e154 < t Initial program 84.4%
*-commutative84.4%
associate-*l/89.8%
*-commutative89.8%
associate-*l/97.0%
Simplified97.0%
associate-/r/96.2%
clear-num96.1%
Applied egg-rr96.1%
Taylor expanded in b around 0 76.2%
associate-/l*83.4%
Simplified83.4%
if -1.9e-27 < t < -6.8000000000000001e-74Initial program 51.1%
*-commutative51.1%
associate-*l/41.6%
*-commutative41.6%
associate-*l/41.6%
Simplified41.6%
Taylor expanded in b around inf 42.1%
Taylor expanded in t around 0 71.8%
times-frac81.1%
Simplified81.1%
if -6.8000000000000001e-74 < t < 6.5999999999999998e-151Initial program 61.6%
*-commutative61.6%
associate-*l/53.6%
*-commutative53.6%
associate-*l/48.0%
Simplified48.0%
Taylor expanded in x around 0 50.4%
Taylor expanded in t around 0 66.0%
if 6.5999999999999998e-151 < t < 1.18e-91 or 1.2000000000000001e-35 < t < 1.7500000000000001e154Initial program 71.3%
*-commutative71.3%
associate-/l*79.9%
associate-*l/86.1%
*-commutative86.1%
cancel-sign-sub86.1%
*-commutative86.1%
associate-*l/79.9%
associate-+r-79.9%
associate-*l/86.1%
*-commutative86.1%
cancel-sign-sub86.1%
*-commutative86.1%
associate-/r/79.6%
Simplified79.6%
associate-/r/79.6%
associate-*l/70.9%
*-commutative70.9%
div-inv70.9%
*-commutative70.9%
Applied egg-rr70.9%
Taylor expanded in a around 0 59.8%
associate-/l*66.3%
associate-/r/66.4%
associate-/l*72.7%
Simplified72.7%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ (* y (/ b t)) (+ a 1.0)))))
(if (<= t -3.2e-30)
t_1
(if (<= t -2.5e-80)
(+ (/ z b) (* (/ t b) (/ x y)))
(if (<= t -6.5e-107)
(/ (+ x (/ y (/ t z))) (+ a 1.0))
(if (<= t 7.8e-202) (/ (* 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 + (z * (y / t))) / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -3.2e-30) {
tmp = t_1;
} else if (t <= -2.5e-80) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (t <= -6.5e-107) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 7.8e-202) {
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 + (z * (y / t))) / ((y * (b / t)) + (a + 1.0d0))
if (t <= (-3.2d-30)) then
tmp = t_1
else if (t <= (-2.5d-80)) then
tmp = (z / b) + ((t / b) * (x / y))
else if (t <= (-6.5d-107)) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else if (t <= 7.8d-202) 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 + (z * (y / t))) / ((y * (b / t)) + (a + 1.0));
double tmp;
if (t <= -3.2e-30) {
tmp = t_1;
} else if (t <= -2.5e-80) {
tmp = (z / b) + ((t / b) * (x / y));
} else if (t <= -6.5e-107) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else if (t <= 7.8e-202) {
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 + (z * (y / t))) / ((y * (b / t)) + (a + 1.0)) tmp = 0 if t <= -3.2e-30: tmp = t_1 elif t <= -2.5e-80: tmp = (z / b) + ((t / b) * (x / y)) elif t <= -6.5e-107: tmp = (x + (y / (t / z))) / (a + 1.0) elif t <= 7.8e-202: 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(z * Float64(y / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))) tmp = 0.0 if (t <= -3.2e-30) tmp = t_1; elseif (t <= -2.5e-80) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); elseif (t <= -6.5e-107) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); elseif (t <= 7.8e-202) 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 + (z * (y / t))) / ((y * (b / t)) + (a + 1.0)); tmp = 0.0; if (t <= -3.2e-30) tmp = t_1; elseif (t <= -2.5e-80) tmp = (z / b) + ((t / b) * (x / y)); elseif (t <= -6.5e-107) tmp = (x + (y / (t / z))) / (a + 1.0); elseif (t <= 7.8e-202) 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[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-30], t$95$1, If[LessEqual[t, -2.5e-80], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-107], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-202], 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 + z \cdot \frac{y}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-80}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-202}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.2e-30 or 7.7999999999999998e-202 < t Initial program 79.6%
*-commutative79.6%
associate-*l/84.2%
*-commutative84.2%
associate-*l/88.9%
Simplified88.9%
Taylor expanded in z around 0 81.9%
*-commutative81.9%
associate-*r/89.9%
Simplified89.9%
if -3.2e-30 < t < -2.5e-80Initial program 54.7%
*-commutative54.7%
associate-*l/47.4%
*-commutative47.4%
associate-*l/47.4%
Simplified47.4%
Taylor expanded in b around inf 40.7%
Taylor expanded in t around 0 71.0%
times-frac78.1%
Simplified78.1%
if -2.5e-80 < t < -6.5000000000000002e-107Initial program 85.7%
*-commutative85.7%
associate-*l/85.7%
*-commutative85.7%
associate-*l/72.1%
Simplified72.1%
associate-/r/71.8%
clear-num72.1%
Applied egg-rr72.1%
Taylor expanded in b around 0 72.1%
associate-/l*72.1%
Simplified72.1%
if -6.5000000000000002e-107 < t < 7.7999999999999998e-202Initial program 58.2%
*-commutative58.2%
associate-*l/50.2%
*-commutative50.2%
associate-*l/44.2%
Simplified44.2%
Taylor expanded in x around 0 52.1%
Taylor expanded in t around 0 70.7%
Final simplification83.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))) (t_2 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -2.85e-72)
t_2
(if (<= y 3.9e-57)
t_1
(if (<= y 0.0034)
(* (/ y t) (/ z (+ a 1.0)))
(if (or (<= y 3.9e+76) (not (<= y 4.8e+108))) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double t_2 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -2.85e-72) {
tmp = t_2;
} else if (y <= 3.9e-57) {
tmp = t_1;
} else if (y <= 0.0034) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((y <= 3.9e+76) || !(y <= 4.8e+108)) {
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 / (a + 1.0d0)
t_2 = (z / b) + ((t / b) * (x / y))
if (y <= (-2.85d-72)) then
tmp = t_2
else if (y <= 3.9d-57) then
tmp = t_1
else if (y <= 0.0034d0) then
tmp = (y / t) * (z / (a + 1.0d0))
else if ((y <= 3.9d+76) .or. (.not. (y <= 4.8d+108))) 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 / (a + 1.0);
double t_2 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -2.85e-72) {
tmp = t_2;
} else if (y <= 3.9e-57) {
tmp = t_1;
} else if (y <= 0.0034) {
tmp = (y / t) * (z / (a + 1.0));
} else if ((y <= 3.9e+76) || !(y <= 4.8e+108)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) t_2 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -2.85e-72: tmp = t_2 elif y <= 3.9e-57: tmp = t_1 elif y <= 0.0034: tmp = (y / t) * (z / (a + 1.0)) elif (y <= 3.9e+76) or not (y <= 4.8e+108): tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) t_2 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -2.85e-72) tmp = t_2; elseif (y <= 3.9e-57) tmp = t_1; elseif (y <= 0.0034) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif ((y <= 3.9e+76) || !(y <= 4.8e+108)) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); t_2 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -2.85e-72) tmp = t_2; elseif (y <= 3.9e-57) tmp = t_1; elseif (y <= 0.0034) tmp = (y / t) * (z / (a + 1.0)); elseif ((y <= 3.9e+76) || ~((y <= 4.8e+108))) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.85e-72], t$95$2, If[LessEqual[y, 3.9e-57], t$95$1, If[LessEqual[y, 0.0034], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.9e+76], N[Not[LessEqual[y, 4.8e+108]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
t_2 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -2.85 \cdot 10^{-72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.0034:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+76} \lor \neg \left(y \leq 4.8 \cdot 10^{+108}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.8500000000000001e-72 or 0.00339999999999999981 < y < 3.89999999999999989e76 or 4.80000000000000037e108 < y Initial program 53.4%
*-commutative53.4%
associate-*l/59.9%
*-commutative59.9%
associate-*l/67.0%
Simplified67.0%
Taylor expanded in b around inf 30.6%
Taylor expanded in t around 0 59.2%
times-frac64.9%
Simplified64.9%
if -2.8500000000000001e-72 < y < 3.90000000000000006e-57 or 3.89999999999999989e76 < y < 4.80000000000000037e108Initial program 92.2%
*-commutative92.2%
associate-*l/85.3%
*-commutative85.3%
associate-*l/79.7%
Simplified79.7%
Taylor expanded in t around inf 58.6%
if 3.90000000000000006e-57 < y < 0.00339999999999999981Initial program 99.6%
*-commutative99.6%
associate-*l/99.4%
*-commutative99.4%
associate-*l/90.7%
Simplified90.7%
Taylor expanded in x around 0 64.6%
Taylor expanded in y around 0 64.2%
times-frac73.3%
Simplified73.3%
Final simplification62.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -1.45e+40)
t_1
(if (<= y 1.7e-199)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= y 3.5e-102)
(/ x (+ 1.0 (+ a (/ b (/ t y)))))
(if (<= y 9.5e+149) (/ (+ x (/ y (/ t z))) (+ a 1.0)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -1.45e+40) {
tmp = t_1;
} else if (y <= 1.7e-199) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 3.5e-102) {
tmp = x / (1.0 + (a + (b / (t / y))));
} else if (y <= 9.5e+149) {
tmp = (x + (y / (t / z))) / (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 = (z / b) + ((t / b) * (x / y))
if (y <= (-1.45d+40)) then
tmp = t_1
else if (y <= 1.7d-199) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (y <= 3.5d-102) then
tmp = x / (1.0d0 + (a + (b / (t / y))))
else if (y <= 9.5d+149) then
tmp = (x + (y / (t / z))) / (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 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -1.45e+40) {
tmp = t_1;
} else if (y <= 1.7e-199) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 3.5e-102) {
tmp = x / (1.0 + (a + (b / (t / y))));
} else if (y <= 9.5e+149) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -1.45e+40: tmp = t_1 elif y <= 1.7e-199: tmp = (x + ((y * z) / t)) / (a + 1.0) elif y <= 3.5e-102: tmp = x / (1.0 + (a + (b / (t / y)))) elif y <= 9.5e+149: tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -1.45e+40) tmp = t_1; elseif (y <= 1.7e-199) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (y <= 3.5e-102) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b / Float64(t / y))))); elseif (y <= 9.5e+149) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -1.45e+40) tmp = t_1; elseif (y <= 1.7e-199) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (y <= 3.5e-102) tmp = x / (1.0 + (a + (b / (t / y)))); elseif (y <= 9.5e+149) tmp = (x + (y / (t / z))) / (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[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e+40], t$95$1, If[LessEqual[y, 1.7e-199], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-102], N[(x / N[(1.0 + N[(a + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+149], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-199}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-102}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+149}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.45000000000000009e40 or 9.49999999999999973e149 < y Initial program 41.4%
*-commutative41.4%
associate-*l/49.5%
*-commutative49.5%
associate-*l/60.4%
Simplified60.4%
Taylor expanded in b around inf 23.3%
Taylor expanded in t around 0 60.3%
times-frac69.3%
Simplified69.3%
if -1.45000000000000009e40 < y < 1.70000000000000003e-199Initial program 92.9%
*-commutative92.9%
associate-*l/85.2%
*-commutative85.2%
associate-*l/80.7%
Simplified80.7%
Taylor expanded in b around 0 73.8%
if 1.70000000000000003e-199 < y < 3.49999999999999986e-102Initial program 99.7%
*-commutative99.7%
associate-/l*99.7%
associate-*l/99.8%
*-commutative99.8%
cancel-sign-sub99.8%
*-commutative99.8%
associate-*l/99.7%
associate-+r-99.7%
associate-*l/99.8%
*-commutative99.8%
cancel-sign-sub99.8%
*-commutative99.8%
associate-/r/84.5%
Simplified84.5%
associate-/r/79.4%
associate-*l/84.5%
*-commutative84.5%
div-inv84.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in x around inf 86.4%
associate-/l*86.6%
Simplified86.6%
if 3.49999999999999986e-102 < y < 9.49999999999999973e149Initial program 83.8%
*-commutative83.8%
associate-*l/85.5%
*-commutative85.5%
associate-*l/83.6%
Simplified83.6%
associate-/r/83.4%
clear-num83.4%
Applied egg-rr83.4%
Taylor expanded in b around 0 59.7%
associate-/l*63.2%
Simplified63.2%
Final simplification70.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.5e-28)
t_1
(if (<= t 4.5e-136)
(/ z b)
(if (<= t 3.2e-24)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t 2.8e+18) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -6.5e-28) {
tmp = t_1;
} else if (t <= 4.5e-136) {
tmp = z / b;
} else if (t <= 3.2e-24) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 2.8e+18) {
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 = x / (a + 1.0d0)
if (t <= (-6.5d-28)) then
tmp = t_1
else if (t <= 4.5d-136) then
tmp = z / b
else if (t <= 3.2d-24) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= 2.8d+18) 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 = x / (a + 1.0);
double tmp;
if (t <= -6.5e-28) {
tmp = t_1;
} else if (t <= 4.5e-136) {
tmp = z / b;
} else if (t <= 3.2e-24) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 2.8e+18) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -6.5e-28: tmp = t_1 elif t <= 4.5e-136: tmp = z / b elif t <= 3.2e-24: tmp = (y / t) * (z / (a + 1.0)) elif t <= 2.8e+18: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -6.5e-28) tmp = t_1; elseif (t <= 4.5e-136) tmp = Float64(z / b); elseif (t <= 3.2e-24) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= 2.8e+18) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -6.5e-28) tmp = t_1; elseif (t <= 4.5e-136) tmp = z / b; elseif (t <= 3.2e-24) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= 2.8e+18) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e-28], t$95$1, If[LessEqual[t, 4.5e-136], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.2e-24], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+18], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-136}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-24}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+18}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.50000000000000043e-28 or 2.8e18 < t Initial program 84.6%
*-commutative84.6%
associate-*l/91.4%
*-commutative91.4%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 61.4%
if -6.50000000000000043e-28 < t < 4.49999999999999972e-136 or 3.20000000000000012e-24 < t < 2.8e18Initial program 58.8%
*-commutative58.8%
associate-*l/52.4%
*-commutative52.4%
associate-*l/47.1%
Simplified47.1%
Taylor expanded in t around 0 56.8%
if 4.49999999999999972e-136 < t < 3.20000000000000012e-24Initial program 83.1%
*-commutative83.1%
associate-*l/87.2%
*-commutative87.2%
associate-*l/83.2%
Simplified83.2%
Taylor expanded in x around 0 34.6%
Taylor expanded in y around 0 28.9%
times-frac37.3%
Simplified37.3%
Final simplification57.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.2e-30)
t_1
(if (<= t 6.4e-138)
(/ z b)
(if (<= t 3.9e+148) (/ x (+ 1.0 (* b (/ y t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3.2e-30) {
tmp = t_1;
} else if (t <= 6.4e-138) {
tmp = z / b;
} else if (t <= 3.9e+148) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-3.2d-30)) then
tmp = t_1
else if (t <= 6.4d-138) then
tmp = z / b
else if (t <= 3.9d+148) then
tmp = x / (1.0d0 + (b * (y / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3.2e-30) {
tmp = t_1;
} else if (t <= 6.4e-138) {
tmp = z / b;
} else if (t <= 3.9e+148) {
tmp = x / (1.0 + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -3.2e-30: tmp = t_1 elif t <= 6.4e-138: tmp = z / b elif t <= 3.9e+148: tmp = x / (1.0 + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -3.2e-30) tmp = t_1; elseif (t <= 6.4e-138) tmp = Float64(z / b); elseif (t <= 3.9e+148) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -3.2e-30) tmp = t_1; elseif (t <= 6.4e-138) tmp = z / b; elseif (t <= 3.9e+148) tmp = x / (1.0 + (b * (y / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-30], t$95$1, If[LessEqual[t, 6.4e-138], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.9e+148], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-138}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.2e-30 or 3.90000000000000002e148 < t Initial program 84.5%
*-commutative84.5%
associate-*l/90.6%
*-commutative90.6%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around inf 64.3%
if -3.2e-30 < t < 6.40000000000000019e-138Initial program 59.4%
*-commutative59.4%
associate-*l/51.5%
*-commutative51.5%
associate-*l/45.8%
Simplified45.8%
Taylor expanded in t around 0 58.2%
if 6.40000000000000019e-138 < t < 3.90000000000000002e148Initial program 77.7%
*-commutative77.7%
associate-*l/85.0%
*-commutative85.0%
associate-*l/84.8%
Simplified84.8%
Taylor expanded in x around inf 53.6%
Taylor expanded in a around 0 45.7%
*-commutative45.7%
associate-*l/46.4%
Applied egg-rr46.4%
Final simplification58.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.2e-30) (not (<= t 9.8e-138))) (/ x (+ 1.0 (+ a (/ b (/ t y))))) (+ (/ z b) (* (/ t b) (/ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.2e-30) || !(t <= 9.8e-138)) {
tmp = x / (1.0 + (a + (b / (t / y))));
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
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.2d-30)) .or. (.not. (t <= 9.8d-138))) then
tmp = x / (1.0d0 + (a + (b / (t / y))))
else
tmp = (z / b) + ((t / b) * (x / y))
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.2e-30) || !(t <= 9.8e-138)) {
tmp = x / (1.0 + (a + (b / (t / y))));
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.2e-30) or not (t <= 9.8e-138): tmp = x / (1.0 + (a + (b / (t / y)))) else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.2e-30) || !(t <= 9.8e-138)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b / Float64(t / y))))); else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3.2e-30) || ~((t <= 9.8e-138))) tmp = x / (1.0 + (a + (b / (t / y)))); else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.2e-30], N[Not[LessEqual[t, 9.8e-138]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{-30} \lor \neg \left(t \leq 9.8 \cdot 10^{-138}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if t < -3.2e-30 or 9.80000000000000033e-138 < t Initial program 82.1%
*-commutative82.1%
associate-/l*88.0%
associate-*l/95.1%
*-commutative95.1%
cancel-sign-sub95.1%
*-commutative95.1%
associate-*l/88.0%
associate-+r-88.0%
associate-*l/95.1%
*-commutative95.1%
cancel-sign-sub95.1%
*-commutative95.1%
associate-/r/93.9%
Simplified93.9%
associate-/r/94.5%
associate-*l/85.4%
*-commutative85.4%
div-inv85.4%
*-commutative85.4%
Applied egg-rr85.4%
Taylor expanded in x around inf 65.3%
associate-/l*68.8%
Simplified68.8%
if -3.2e-30 < t < 9.80000000000000033e-138Initial program 59.4%
*-commutative59.4%
associate-*l/51.5%
*-commutative51.5%
associate-*l/45.8%
Simplified45.8%
Taylor expanded in b around inf 40.8%
Taylor expanded in t around 0 69.1%
times-frac61.0%
Simplified61.0%
Final simplification65.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.5e-26) (not (<= t 4.5e-136))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (+ (/ z b) (* (/ t b) (/ x y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-26) || !(t <= 4.5e-136)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
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-26)) .or. (.not. (t <= 4.5d-136))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else
tmp = (z / b) + ((t / b) * (x / y))
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-26) || !(t <= 4.5e-136)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.5e-26) or not (t <= 4.5e-136): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.5e-26) || !(t <= 4.5e-136)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.5e-26) || ~((t <= 4.5e-136))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.5e-26], N[Not[LessEqual[t, 4.5e-136]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-26} \lor \neg \left(t \leq 4.5 \cdot 10^{-136}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if t < -9.4999999999999995e-26 or 4.49999999999999972e-136 < t Initial program 82.0%
*-commutative82.0%
associate-*l/88.6%
*-commutative88.6%
associate-*l/95.1%
Simplified95.1%
associate-/r/94.5%
clear-num94.5%
Applied egg-rr94.5%
Taylor expanded in b around 0 66.5%
associate-/l*73.1%
Simplified73.1%
if -9.4999999999999995e-26 < t < 4.49999999999999972e-136Initial program 59.8%
*-commutative59.8%
associate-*l/52.0%
*-commutative52.0%
associate-*l/45.4%
Simplified45.4%
Taylor expanded in b around inf 41.3%
Taylor expanded in t around 0 69.3%
times-frac60.5%
Simplified60.5%
Final simplification67.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.8e+181) x (if (<= t -7.6e-26) (/ x a) (if (<= t 6e+62) (/ z b) (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.8e+181) {
tmp = x;
} else if (t <= -7.6e-26) {
tmp = x / a;
} else if (t <= 6e+62) {
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 (t <= (-2.8d+181)) then
tmp = x
else if (t <= (-7.6d-26)) then
tmp = x / a
else if (t <= 6d+62) 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 (t <= -2.8e+181) {
tmp = x;
} else if (t <= -7.6e-26) {
tmp = x / a;
} else if (t <= 6e+62) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.8e+181: tmp = x elif t <= -7.6e-26: tmp = x / a elif t <= 6e+62: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.8e+181) tmp = x; elseif (t <= -7.6e-26) tmp = Float64(x / a); elseif (t <= 6e+62) 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 (t <= -2.8e+181) tmp = x; elseif (t <= -7.6e-26) tmp = x / a; elseif (t <= 6e+62) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.8e+181], x, If[LessEqual[t, -7.6e-26], N[(x / a), $MachinePrecision], If[LessEqual[t, 6e+62], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+181}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+62}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -2.79999999999999984e181Initial program 85.0%
*-commutative85.0%
associate-*l/92.5%
*-commutative92.5%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in x around inf 83.2%
Taylor expanded in a around 0 57.3%
Taylor expanded in b around 0 50.1%
if -2.79999999999999984e181 < t < -7.60000000000000029e-26 or 6e62 < t Initial program 84.3%
*-commutative84.3%
associate-*l/91.4%
*-commutative91.4%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in x around inf 71.2%
Taylor expanded in a around inf 37.9%
if -7.60000000000000029e-26 < t < 6e62Initial program 63.7%
*-commutative63.7%
associate-*l/59.1%
*-commutative59.1%
associate-*l/54.8%
Simplified54.8%
Taylor expanded in t around 0 49.1%
Final simplification45.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.9e-28) (not (<= t 3.2e-101))) (/ 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.9e-28) || !(t <= 3.2e-101)) {
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.9d-28)) .or. (.not. (t <= 3.2d-101))) 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.9e-28) || !(t <= 3.2e-101)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.9e-28) or not (t <= 3.2e-101): 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.9e-28) || !(t <= 3.2e-101)) 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.9e-28) || ~((t <= 3.2e-101))) 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.9e-28], N[Not[LessEqual[t, 3.2e-101]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-28} \lor \neg \left(t \leq 3.2 \cdot 10^{-101}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.90000000000000005e-28 or 3.19999999999999978e-101 < t Initial program 82.2%
*-commutative82.2%
associate-*l/88.3%
*-commutative88.3%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in t around inf 54.9%
if -1.90000000000000005e-28 < t < 3.19999999999999978e-101Initial program 60.3%
*-commutative60.3%
associate-*l/53.6%
*-commutative53.6%
associate-*l/47.3%
Simplified47.3%
Taylor expanded in t around 0 56.1%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -9.5e-22) (/ x a) (if (<= a 1.0) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -9.5e-22) {
tmp = x / a;
} else if (a <= 1.0) {
tmp = x;
} 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 <= (-9.5d-22)) then
tmp = x / a
else if (a <= 1.0d0) then
tmp = x
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 <= -9.5e-22) {
tmp = x / a;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -9.5e-22: tmp = x / a elif a <= 1.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -9.5e-22) tmp = Float64(x / a); elseif (a <= 1.0) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -9.5e-22) tmp = x / a; elseif (a <= 1.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -9.5e-22], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.0], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -9.4999999999999994e-22 or 1 < a Initial program 70.1%
*-commutative70.1%
associate-*l/68.7%
*-commutative68.7%
associate-*l/69.8%
Simplified69.8%
Taylor expanded in x around inf 46.3%
Taylor expanded in a around inf 40.0%
if -9.4999999999999994e-22 < a < 1Initial program 74.8%
*-commutative74.8%
associate-*l/77.1%
*-commutative77.1%
associate-*l/77.6%
Simplified77.6%
Taylor expanded in x around inf 54.9%
Taylor expanded in a around 0 56.1%
Taylor expanded in b around 0 35.4%
Final simplification37.8%
(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 72.4%
*-commutative72.4%
associate-*l/72.7%
*-commutative72.7%
associate-*l/73.6%
Simplified73.6%
Taylor expanded in x around inf 50.4%
Taylor expanded in a around 0 35.1%
Taylor expanded in b around 0 19.1%
Final simplification19.1%
(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 2023293
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(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))))