
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(/ y (/ (* t (+ 1.0 (+ a t_1))) z))
(if (<= t_2 -4e-316)
t_2
(if (<= t_2 0.0)
(/ t (* y (/ b (fma y (/ z t) x))))
(if (<= t_2 2e+306) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = y / ((t * (1.0 + (a + t_1))) / z);
} else if (t_2 <= -4e-316) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = t / (y * (b / fma(y, (z / t), x)));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(y / Float64(Float64(t * Float64(1.0 + Float64(a + t_1))) / z)); elseif (t_2 <= -4e-316) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(t / Float64(y * Float64(b / fma(y, Float64(z / t), x)))); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y / N[(N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-316], t$95$2, If[LessEqual[t$95$2, 0.0], N[(t / N[(y * N[(b / N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1 + \left(a + 1\right)}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{\frac{t \cdot \left(1 + \left(a + t_1\right)\right)}{z}}\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-316}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{t}{y \cdot \frac{b}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.4%
*-commutative24.4%
associate-*l/54.0%
*-commutative54.0%
associate-*l/53.5%
Simplified53.5%
associate-*l/23.9%
*-commutative23.9%
associate-/l*53.4%
Applied egg-rr53.4%
Taylor expanded in x around 0 61.0%
associate-/l*79.6%
*-commutative79.6%
Simplified79.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -3.999999984e-316 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e306Initial program 99.7%
if -3.999999984e-316 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 51.5%
*-commutative51.5%
associate-*l/53.6%
*-commutative53.6%
associate-*l/67.6%
Simplified67.6%
Taylor expanded in b around inf 59.4%
associate-/l*59.8%
*-commutative59.8%
*-lft-identity59.8%
times-frac78.5%
/-rgt-identity78.5%
+-commutative78.5%
associate-*r/76.0%
fma-udef76.0%
Simplified76.0%
if 2.00000000000000003e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 10.4%
*-commutative10.4%
associate-*l/14.9%
*-commutative14.9%
associate-*l/25.7%
Simplified25.7%
Taylor expanded in t around 0 88.9%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(/ y (/ (* t (+ 1.0 (+ a t_1))) z))
(if (<= t_2 -4e-281)
t_2
(if (<= t_2 0.0)
(/ (+ x (/ y (/ t z))) (+ (* y (/ b t)) (+ a 1.0)))
(if (<= t_2 2e+306) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = y / ((t * (1.0 + (a + t_1))) / z);
} else if (t_2 <= -4e-281) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = y / ((t * (1.0 + (a + t_1))) / z);
} else if (t_2 <= -4e-281) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = y / ((t * (1.0 + (a + t_1))) / z) elif t_2 <= -4e-281: tmp = t_2 elif t_2 <= 0.0: tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0)) elif t_2 <= 2e+306: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(y / Float64(Float64(t * Float64(1.0 + Float64(a + t_1))) / z)); elseif (t_2 <= -4e-281) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = y / ((t * (1.0 + (a + t_1))) / z); elseif (t_2 <= -4e-281) tmp = t_2; elseif (t_2 <= 0.0) tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0)); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y / N[(N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -4e-281], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+306], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1 + \left(a + 1\right)}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y}{\frac{t \cdot \left(1 + \left(a + t_1\right)\right)}{z}}\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-281}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 24.4%
*-commutative24.4%
associate-*l/54.0%
*-commutative54.0%
associate-*l/53.5%
Simplified53.5%
associate-*l/23.9%
*-commutative23.9%
associate-/l*53.4%
Applied egg-rr53.4%
Taylor expanded in x around 0 61.0%
associate-/l*79.6%
*-commutative79.6%
Simplified79.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.0000000000000001e-281 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e306Initial program 99.7%
if -4.0000000000000001e-281 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 55.8%
*-commutative55.8%
associate-*l/57.7%
*-commutative57.7%
associate-*l/70.4%
Simplified70.4%
associate-*l/68.6%
*-commutative68.6%
associate-/l*70.5%
Applied egg-rr70.5%
if 2.00000000000000003e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 10.4%
*-commutative10.4%
associate-*l/14.9%
*-commutative14.9%
associate-*l/25.7%
Simplified25.7%
Taylor expanded in t around 0 88.9%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (* y (/ b t))))
(if (<= t -2.9e+123)
(/ x (+ a (+ 1.0 (/ b (/ t y)))))
(if (<= t -4.6e+66)
(* (/ y t) (/ z (+ 1.0 (+ a t_2))))
(if (<= t -1.26e-77)
(* (+ x (* z (/ y t))) (/ 1.0 (+ a 1.0)))
(if (<= t -5.8e-99)
(/ z b)
(if (<= t -2.55e-163)
(/ x (+ t_2 (+ a 1.0)))
(if (<= t 4.2e-212)
(/ z b)
(if (<= t 1.05e-153)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 4e-111)
(/ (* t t_1) (* y b))
(/ t_1 (+ a 1.0))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = y * (b / t);
double tmp;
if (t <= -2.9e+123) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else if (t <= -4.6e+66) {
tmp = (y / t) * (z / (1.0 + (a + t_2)));
} else if (t <= -1.26e-77) {
tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0));
} else if (t <= -5.8e-99) {
tmp = z / b;
} else if (t <= -2.55e-163) {
tmp = x / (t_2 + (a + 1.0));
} else if (t <= 4.2e-212) {
tmp = z / b;
} else if (t <= 1.05e-153) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 4e-111) {
tmp = (t * t_1) / (y * b);
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = y * (b / t)
if (t <= (-2.9d+123)) then
tmp = x / (a + (1.0d0 + (b / (t / y))))
else if (t <= (-4.6d+66)) then
tmp = (y / t) * (z / (1.0d0 + (a + t_2)))
else if (t <= (-1.26d-77)) then
tmp = (x + (z * (y / t))) * (1.0d0 / (a + 1.0d0))
else if (t <= (-5.8d-99)) then
tmp = z / b
else if (t <= (-2.55d-163)) then
tmp = x / (t_2 + (a + 1.0d0))
else if (t <= 4.2d-212) then
tmp = z / b
else if (t <= 1.05d-153) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 4d-111) then
tmp = (t * t_1) / (y * b)
else
tmp = t_1 / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = y * (b / t);
double tmp;
if (t <= -2.9e+123) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else if (t <= -4.6e+66) {
tmp = (y / t) * (z / (1.0 + (a + t_2)));
} else if (t <= -1.26e-77) {
tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0));
} else if (t <= -5.8e-99) {
tmp = z / b;
} else if (t <= -2.55e-163) {
tmp = x / (t_2 + (a + 1.0));
} else if (t <= 4.2e-212) {
tmp = z / b;
} else if (t <= 1.05e-153) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 4e-111) {
tmp = (t * t_1) / (y * b);
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = y * (b / t) tmp = 0 if t <= -2.9e+123: tmp = x / (a + (1.0 + (b / (t / y)))) elif t <= -4.6e+66: tmp = (y / t) * (z / (1.0 + (a + t_2))) elif t <= -1.26e-77: tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0)) elif t <= -5.8e-99: tmp = z / b elif t <= -2.55e-163: tmp = x / (t_2 + (a + 1.0)) elif t <= 4.2e-212: tmp = z / b elif t <= 1.05e-153: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 4e-111: tmp = (t * t_1) / (y * b) else: tmp = t_1 / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(y * Float64(b / t)) tmp = 0.0 if (t <= -2.9e+123) tmp = Float64(x / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); elseif (t <= -4.6e+66) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + t_2)))); elseif (t <= -1.26e-77) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) * Float64(1.0 / Float64(a + 1.0))); elseif (t <= -5.8e-99) tmp = Float64(z / b); elseif (t <= -2.55e-163) tmp = Float64(x / Float64(t_2 + Float64(a + 1.0))); elseif (t <= 4.2e-212) tmp = Float64(z / b); elseif (t <= 1.05e-153) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 4e-111) tmp = Float64(Float64(t * t_1) / Float64(y * b)); else tmp = Float64(t_1 / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = y * (b / t); tmp = 0.0; if (t <= -2.9e+123) tmp = x / (a + (1.0 + (b / (t / y)))); elseif (t <= -4.6e+66) tmp = (y / t) * (z / (1.0 + (a + t_2))); elseif (t <= -1.26e-77) tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0)); elseif (t <= -5.8e-99) tmp = z / b; elseif (t <= -2.55e-163) tmp = x / (t_2 + (a + 1.0)); elseif (t <= 4.2e-212) tmp = z / b; elseif (t <= 1.05e-153) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 4e-111) tmp = (t * t_1) / (y * b); else tmp = t_1 / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+123], N[(x / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.6e+66], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.26e-77], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e-99], N[(z / b), $MachinePrecision], If[LessEqual[t, -2.55e-163], N[(x / N[(t$95$2 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-212], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.05e-153], 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, 4e-111], N[(N[(t * t$95$1), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+123}:\\
\;\;\;\;\frac{x}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + t_2\right)}\\
\mathbf{elif}\;t \leq -1.26 \cdot 10^{-77}:\\
\;\;\;\;\left(x + z \cdot \frac{y}{t}\right) \cdot \frac{1}{a + 1}\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-99}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{t_2 + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-212}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-153}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-111}:\\
\;\;\;\;\frac{t \cdot t_1}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a + 1}\\
\end{array}
\end{array}
if t < -2.9000000000000001e123Initial program 77.9%
*-commutative77.9%
associate-*l/84.4%
*-commutative84.4%
associate-*l/96.7%
Simplified96.7%
associate-*l/84.2%
*-commutative84.2%
associate-/l*96.6%
Applied egg-rr96.6%
Taylor expanded in x around inf 74.7%
+-commutative74.7%
associate-+l+74.7%
+-commutative74.7%
associate-/l*81.1%
Simplified81.1%
if -2.9000000000000001e123 < t < -4.6e66Initial program 65.0%
*-commutative65.0%
associate-*l/82.3%
*-commutative82.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in x around 0 56.0%
times-frac81.8%
associate-*l/90.7%
*-commutative90.7%
Simplified90.7%
if -4.6e66 < t < -1.2599999999999999e-77Initial program 86.5%
*-commutative86.5%
associate-*l/83.3%
*-commutative83.3%
associate-*l/86.5%
Simplified86.5%
Taylor expanded in b around 0 76.6%
div-inv76.7%
associate-/l*73.4%
+-commutative73.4%
associate-/r/76.6%
fma-def76.6%
+-commutative76.6%
Applied egg-rr76.6%
fma-udef76.6%
Applied egg-rr76.6%
if -1.2599999999999999e-77 < t < -5.79999999999999971e-99 or -2.54999999999999995e-163 < t < 4.1999999999999999e-212Initial program 41.6%
*-commutative41.6%
associate-*l/38.1%
*-commutative38.1%
associate-*l/34.7%
Simplified34.7%
Taylor expanded in t around 0 77.9%
if -5.79999999999999971e-99 < t < -2.54999999999999995e-163Initial program 91.4%
*-commutative91.4%
associate-*l/83.7%
*-commutative83.7%
associate-*l/83.8%
Simplified83.8%
Taylor expanded in x around inf 83.8%
if 4.1999999999999999e-212 < t < 1.05000000000000002e-153Initial program 61.0%
*-commutative61.0%
associate-*l/48.3%
*-commutative48.3%
associate-*l/42.2%
Simplified42.2%
Taylor expanded in x around 0 61.2%
if 1.05000000000000002e-153 < t < 4.00000000000000035e-111Initial program 72.1%
*-commutative72.1%
associate-*l/71.9%
*-commutative71.9%
associate-*l/72.1%
Simplified72.1%
Taylor expanded in b around inf 99.6%
if 4.00000000000000035e-111 < t Initial program 88.3%
*-commutative88.3%
associate-*l/86.3%
*-commutative86.3%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in b around 0 79.0%
Final simplification79.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= t -1.4e-166)
(/ (+ x (/ z (/ t y))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t 8.4e-212)
(/ z b)
(if (<= t 9.1e-153)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 9e-108)
(/ (* t t_1) (* y b))
(if (<= t 4.3e-94)
(/ t_1 (+ a 1.0))
(/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double tmp;
if (t <= -1.4e-166) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else if (t <= 8.4e-212) {
tmp = z / b;
} else if (t <= 9.1e-153) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 9e-108) {
tmp = (t * t_1) / (y * b);
} else if (t <= 4.3e-94) {
tmp = t_1 / (a + 1.0);
} else {
tmp = (x + (y * (z / t))) / ((y * (b / 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 * z) / t)
if (t <= (-1.4d-166)) then
tmp = (x + (z / (t / y))) / (a + (1.0d0 + (y / (t / b))))
else if (t <= 8.4d-212) then
tmp = z / b
else if (t <= 9.1d-153) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 9d-108) then
tmp = (t * t_1) / (y * b)
else if (t <= 4.3d-94) then
tmp = t_1 / (a + 1.0d0)
else
tmp = (x + (y * (z / t))) / ((y * (b / 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 * z) / t);
double tmp;
if (t <= -1.4e-166) {
tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b))));
} else if (t <= 8.4e-212) {
tmp = z / b;
} else if (t <= 9.1e-153) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 9e-108) {
tmp = (t * t_1) / (y * b);
} else if (t <= 4.3e-94) {
tmp = t_1 / (a + 1.0);
} else {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if t <= -1.4e-166: tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))) elif t <= 8.4e-212: tmp = z / b elif t <= 9.1e-153: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 9e-108: tmp = (t * t_1) / (y * b) elif t <= 4.3e-94: tmp = t_1 / (a + 1.0) else: tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (t <= -1.4e-166) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t <= 8.4e-212) tmp = Float64(z / b); elseif (t <= 9.1e-153) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 9e-108) tmp = Float64(Float64(t * t_1) / Float64(y * b)); elseif (t <= 4.3e-94) tmp = Float64(t_1 / Float64(a + 1.0)); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); tmp = 0.0; if (t <= -1.4e-166) tmp = (x + (z / (t / y))) / (a + (1.0 + (y / (t / b)))); elseif (t <= 8.4e-212) tmp = z / b; elseif (t <= 9.1e-153) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 9e-108) tmp = (t * t_1) / (y * b); elseif (t <= 4.3e-94) tmp = t_1 / (a + 1.0); else tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-166], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.4e-212], N[(z / b), $MachinePrecision], If[LessEqual[t, 9.1e-153], 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, 9e-108], N[(N[(t * t$95$1), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-94], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-166}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{-212}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 9.1 \cdot 10^{-153}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-108}:\\
\;\;\;\;\frac{t \cdot t_1}{y \cdot b}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-94}:\\
\;\;\;\;\frac{t_1}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -1.4e-166Initial program 78.1%
*-commutative78.1%
associate-/l*82.4%
associate-*l/87.8%
*-commutative87.8%
cancel-sign-sub87.8%
*-commutative87.8%
associate-*l/82.4%
associate-+r-82.4%
associate-*l/87.8%
*-commutative87.8%
cancel-sign-sub87.8%
*-commutative87.8%
associate-/r/87.8%
Simplified87.8%
if -1.4e-166 < t < 8.3999999999999999e-212Initial program 42.4%
*-commutative42.4%
associate-*l/38.4%
*-commutative38.4%
associate-*l/34.7%
Simplified34.7%
Taylor expanded in t around 0 75.8%
if 8.3999999999999999e-212 < t < 9.10000000000000045e-153Initial program 61.0%
*-commutative61.0%
associate-*l/48.3%
*-commutative48.3%
associate-*l/42.2%
Simplified42.2%
Taylor expanded in x around 0 61.2%
if 9.10000000000000045e-153 < t < 8.99999999999999941e-108Initial program 72.1%
*-commutative72.1%
associate-*l/71.9%
*-commutative71.9%
associate-*l/72.1%
Simplified72.1%
Taylor expanded in b around inf 99.6%
if 8.99999999999999941e-108 < t < 4.2999999999999998e-94Initial program 79.8%
*-commutative79.8%
associate-*l/51.0%
*-commutative51.0%
associate-*l/41.3%
Simplified41.3%
Taylor expanded in b around 0 70.8%
if 4.2999999999999998e-94 < t Initial program 89.3%
*-commutative89.3%
associate-*l/90.6%
*-commutative90.6%
associate-*l/97.6%
Simplified97.6%
Final simplification86.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (/ b t))))
(if (<= t -3e+123)
(/ x (+ a (+ 1.0 (/ b (/ t y)))))
(if (<= t -4.6e+66)
(* (/ y t) (/ z (+ 1.0 (+ a t_1))))
(if (<= t -9.5e-75)
(* (+ x (* z (/ y t))) (/ 1.0 (+ a 1.0)))
(if (<= t -3.2e-104)
(/ z b)
(if (<= t -2.2e-163)
(/ x (+ t_1 (+ a 1.0)))
(if (<= t 1.35e-110)
(/ z 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 = y * (b / t);
double tmp;
if (t <= -3e+123) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else if (t <= -4.6e+66) {
tmp = (y / t) * (z / (1.0 + (a + t_1)));
} else if (t <= -9.5e-75) {
tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0));
} else if (t <= -3.2e-104) {
tmp = z / b;
} else if (t <= -2.2e-163) {
tmp = x / (t_1 + (a + 1.0));
} else if (t <= 1.35e-110) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y * (b / t)
if (t <= (-3d+123)) then
tmp = x / (a + (1.0d0 + (b / (t / y))))
else if (t <= (-4.6d+66)) then
tmp = (y / t) * (z / (1.0d0 + (a + t_1)))
else if (t <= (-9.5d-75)) then
tmp = (x + (z * (y / t))) * (1.0d0 / (a + 1.0d0))
else if (t <= (-3.2d-104)) then
tmp = z / b
else if (t <= (-2.2d-163)) then
tmp = x / (t_1 + (a + 1.0d0))
else if (t <= 1.35d-110) then
tmp = z / b
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b / t);
double tmp;
if (t <= -3e+123) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else if (t <= -4.6e+66) {
tmp = (y / t) * (z / (1.0 + (a + t_1)));
} else if (t <= -9.5e-75) {
tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0));
} else if (t <= -3.2e-104) {
tmp = z / b;
} else if (t <= -2.2e-163) {
tmp = x / (t_1 + (a + 1.0));
} else if (t <= 1.35e-110) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b / t) tmp = 0 if t <= -3e+123: tmp = x / (a + (1.0 + (b / (t / y)))) elif t <= -4.6e+66: tmp = (y / t) * (z / (1.0 + (a + t_1))) elif t <= -9.5e-75: tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0)) elif t <= -3.2e-104: tmp = z / b elif t <= -2.2e-163: tmp = x / (t_1 + (a + 1.0)) elif t <= 1.35e-110: tmp = z / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b / t)) tmp = 0.0 if (t <= -3e+123) tmp = Float64(x / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); elseif (t <= -4.6e+66) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + t_1)))); elseif (t <= -9.5e-75) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) * Float64(1.0 / Float64(a + 1.0))); elseif (t <= -3.2e-104) tmp = Float64(z / b); elseif (t <= -2.2e-163) tmp = Float64(x / Float64(t_1 + Float64(a + 1.0))); elseif (t <= 1.35e-110) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b / t); tmp = 0.0; if (t <= -3e+123) tmp = x / (a + (1.0 + (b / (t / y)))); elseif (t <= -4.6e+66) tmp = (y / t) * (z / (1.0 + (a + t_1))); elseif (t <= -9.5e-75) tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0)); elseif (t <= -3.2e-104) tmp = z / b; elseif (t <= -2.2e-163) tmp = x / (t_1 + (a + 1.0)); elseif (t <= 1.35e-110) tmp = z / 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[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+123], N[(x / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.6e+66], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.5e-75], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-104], N[(z / b), $MachinePrecision], If[LessEqual[t, -2.2e-163], N[(x / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-110], N[(z / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+123}:\\
\;\;\;\;\frac{x}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + t_1\right)}\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-75}:\\
\;\;\;\;\left(x + z \cdot \frac{y}{t}\right) \cdot \frac{1}{a + 1}\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-104}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{t_1 + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-110}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -3.00000000000000008e123Initial program 77.9%
*-commutative77.9%
associate-*l/84.4%
*-commutative84.4%
associate-*l/96.7%
Simplified96.7%
associate-*l/84.2%
*-commutative84.2%
associate-/l*96.6%
Applied egg-rr96.6%
Taylor expanded in x around inf 74.7%
+-commutative74.7%
associate-+l+74.7%
+-commutative74.7%
associate-/l*81.1%
Simplified81.1%
if -3.00000000000000008e123 < t < -4.6e66Initial program 65.0%
*-commutative65.0%
associate-*l/82.3%
*-commutative82.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in x around 0 56.0%
times-frac81.8%
associate-*l/90.7%
*-commutative90.7%
Simplified90.7%
if -4.6e66 < t < -9.4999999999999991e-75Initial program 86.5%
*-commutative86.5%
associate-*l/83.3%
*-commutative83.3%
associate-*l/86.5%
Simplified86.5%
Taylor expanded in b around 0 76.6%
div-inv76.7%
associate-/l*73.4%
+-commutative73.4%
associate-/r/76.6%
fma-def76.6%
+-commutative76.6%
Applied egg-rr76.6%
fma-udef76.6%
Applied egg-rr76.6%
if -9.4999999999999991e-75 < t < -3.19999999999999989e-104 or -2.20000000000000011e-163 < t < 1.3499999999999999e-110Initial program 47.9%
*-commutative47.9%
associate-*l/43.0%
*-commutative43.0%
associate-*l/39.4%
Simplified39.4%
Taylor expanded in t around 0 68.4%
if -3.19999999999999989e-104 < t < -2.20000000000000011e-163Initial program 91.4%
*-commutative91.4%
associate-*l/83.7%
*-commutative83.7%
associate-*l/83.8%
Simplified83.8%
Taylor expanded in x around inf 83.8%
if 1.3499999999999999e-110 < t Initial program 88.3%
*-commutative88.3%
associate-*l/86.3%
*-commutative86.3%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in b around 0 79.0%
Final simplification76.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0))))
(if (<= t -2.6e+183)
(/ x (+ a (+ 1.0 (/ b (/ t y)))))
(if (<= t -3.2e-76)
t_1
(if (<= t -1.4e-100)
(/ z b)
(if (<= t -2.55e-163)
(/ x (+ (* y (/ b t)) (+ a 1.0)))
(if (<= t 9.6e-108) (/ z 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 <= -2.6e+183) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else if (t <= -3.2e-76) {
tmp = t_1;
} else if (t <= -1.4e-100) {
tmp = z / b;
} else if (t <= -2.55e-163) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= 9.6e-108) {
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 + ((y * z) / t)) / (a + 1.0d0)
if (t <= (-2.6d+183)) then
tmp = x / (a + (1.0d0 + (b / (t / y))))
else if (t <= (-3.2d-76)) then
tmp = t_1
else if (t <= (-1.4d-100)) then
tmp = z / b
else if (t <= (-2.55d-163)) then
tmp = x / ((y * (b / t)) + (a + 1.0d0))
else if (t <= 9.6d-108) 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 + ((y * z) / t)) / (a + 1.0);
double tmp;
if (t <= -2.6e+183) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else if (t <= -3.2e-76) {
tmp = t_1;
} else if (t <= -1.4e-100) {
tmp = z / b;
} else if (t <= -2.55e-163) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= 9.6e-108) {
tmp = z / 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 <= -2.6e+183: tmp = x / (a + (1.0 + (b / (t / y)))) elif t <= -3.2e-76: tmp = t_1 elif t <= -1.4e-100: tmp = z / b elif t <= -2.55e-163: tmp = x / ((y * (b / t)) + (a + 1.0)) elif t <= 9.6e-108: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.6e+183) tmp = Float64(x / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); elseif (t <= -3.2e-76) tmp = t_1; elseif (t <= -1.4e-100) tmp = Float64(z / b); elseif (t <= -2.55e-163) tmp = Float64(x / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); elseif (t <= 9.6e-108) 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 + ((y * z) / t)) / (a + 1.0); tmp = 0.0; if (t <= -2.6e+183) tmp = x / (a + (1.0 + (b / (t / y)))); elseif (t <= -3.2e-76) tmp = t_1; elseif (t <= -1.4e-100) tmp = z / b; elseif (t <= -2.55e-163) tmp = x / ((y * (b / t)) + (a + 1.0)); elseif (t <= 9.6e-108) tmp = z / 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[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+183], N[(x / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-76], t$95$1, If[LessEqual[t, -1.4e-100], N[(z / b), $MachinePrecision], If[LessEqual[t, -2.55e-163], N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e-108], N[(z / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+183}:\\
\;\;\;\;\frac{x}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-100}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-108}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.5999999999999999e183Initial program 65.8%
*-commutative65.8%
associate-*l/75.8%
*-commutative75.8%
associate-*l/94.9%
Simplified94.9%
associate-*l/75.5%
*-commutative75.5%
associate-/l*94.9%
Applied egg-rr94.9%
Taylor expanded in x around inf 67.0%
+-commutative67.0%
associate-+l+67.0%
+-commutative67.0%
associate-/l*76.9%
Simplified76.9%
if -2.5999999999999999e183 < t < -3.1999999999999998e-76 or 9.60000000000000068e-108 < t Initial program 87.1%
*-commutative87.1%
associate-*l/86.4%
*-commutative86.4%
associate-*l/90.5%
Simplified90.5%
Taylor expanded in b around 0 77.1%
if -3.1999999999999998e-76 < t < -1.39999999999999998e-100 or -2.54999999999999995e-163 < t < 9.60000000000000068e-108Initial program 47.9%
*-commutative47.9%
associate-*l/43.0%
*-commutative43.0%
associate-*l/39.4%
Simplified39.4%
Taylor expanded in t around 0 68.4%
if -1.39999999999999998e-100 < t < -2.54999999999999995e-163Initial program 91.4%
*-commutative91.4%
associate-*l/83.7%
*-commutative83.7%
associate-*l/83.8%
Simplified83.8%
Taylor expanded in x around inf 83.8%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -7e+198)
(* (/ y t) (/ z (+ 1.0 (+ a (/ 1.0 (/ (/ t y) b))))))
(if (<= z 2.3e+96)
(/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0)))
(/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7e+198) {
tmp = (y / t) * (z / (1.0 + (a + (1.0 / ((t / y) / b)))));
} else if (z <= 2.3e+96) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-7d+198)) then
tmp = (y / t) * (z / (1.0d0 + (a + (1.0d0 / ((t / y) / b)))))
else if (z <= 2.3d+96) then
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7e+198) {
tmp = (y / t) * (z / (1.0 + (a + (1.0 / ((t / y) / b)))));
} else if (z <= 2.3e+96) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7e+198: tmp = (y / t) * (z / (1.0 + (a + (1.0 / ((t / y) / b))))) elif z <= 2.3e+96: tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7e+198) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(1.0 / Float64(Float64(t / y) / b)))))); elseif (z <= 2.3e+96) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7e+198) tmp = (y / t) * (z / (1.0 + (a + (1.0 / ((t / y) / b))))); elseif (z <= 2.3e+96) tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7e+198], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(1.0 / N[(N[(t / y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+96], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+198}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + \frac{1}{\frac{\frac{t}{y}}{b}}\right)}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+96}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if z < -7.00000000000000026e198Initial program 48.4%
*-commutative48.4%
associate-*l/23.1%
*-commutative23.1%
associate-*l/29.3%
Simplified29.3%
Taylor expanded in x around 0 40.6%
times-frac53.7%
associate-*l/53.7%
*-commutative53.7%
Simplified53.7%
*-commutative53.7%
associate-/r/60.1%
clear-num60.2%
Applied egg-rr60.2%
if -7.00000000000000026e198 < z < 2.30000000000000015e96Initial program 82.4%
*-commutative82.4%
associate-*l/82.9%
*-commutative82.9%
associate-*l/85.4%
Simplified85.4%
if 2.30000000000000015e96 < z Initial program 43.9%
*-commutative43.9%
associate-*l/42.0%
*-commutative42.0%
associate-*l/44.0%
Simplified44.0%
Taylor expanded in t around 0 62.9%
Final simplification79.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -2.9e+123)
t_1
(if (<= t -4.6e+66)
(* (/ z t) (/ y (+ a 1.0)))
(if (<= t -4.2e-32)
t_1
(if (<= t -7e-75)
(* (/ 1.0 t) (/ (* y z) (+ a 1.0)))
(if (<= t 5.5e-104) (/ 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 <= -2.9e+123) {
tmp = t_1;
} else if (t <= -4.6e+66) {
tmp = (z / t) * (y / (a + 1.0));
} else if (t <= -4.2e-32) {
tmp = t_1;
} else if (t <= -7e-75) {
tmp = (1.0 / t) * ((y * z) / (a + 1.0));
} else if (t <= 5.5e-104) {
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 <= (-2.9d+123)) then
tmp = t_1
else if (t <= (-4.6d+66)) then
tmp = (z / t) * (y / (a + 1.0d0))
else if (t <= (-4.2d-32)) then
tmp = t_1
else if (t <= (-7d-75)) then
tmp = (1.0d0 / t) * ((y * z) / (a + 1.0d0))
else if (t <= 5.5d-104) 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 <= -2.9e+123) {
tmp = t_1;
} else if (t <= -4.6e+66) {
tmp = (z / t) * (y / (a + 1.0));
} else if (t <= -4.2e-32) {
tmp = t_1;
} else if (t <= -7e-75) {
tmp = (1.0 / t) * ((y * z) / (a + 1.0));
} else if (t <= 5.5e-104) {
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 <= -2.9e+123: tmp = t_1 elif t <= -4.6e+66: tmp = (z / t) * (y / (a + 1.0)) elif t <= -4.2e-32: tmp = t_1 elif t <= -7e-75: tmp = (1.0 / t) * ((y * z) / (a + 1.0)) elif t <= 5.5e-104: 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 <= -2.9e+123) tmp = t_1; elseif (t <= -4.6e+66) tmp = Float64(Float64(z / t) * Float64(y / Float64(a + 1.0))); elseif (t <= -4.2e-32) tmp = t_1; elseif (t <= -7e-75) tmp = Float64(Float64(1.0 / t) * Float64(Float64(y * z) / Float64(a + 1.0))); elseif (t <= 5.5e-104) 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 <= -2.9e+123) tmp = t_1; elseif (t <= -4.6e+66) tmp = (z / t) * (y / (a + 1.0)); elseif (t <= -4.2e-32) tmp = t_1; elseif (t <= -7e-75) tmp = (1.0 / t) * ((y * z) / (a + 1.0)); elseif (t <= 5.5e-104) 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, -2.9e+123], t$95$1, If[LessEqual[t, -4.6e+66], N[(N[(z / t), $MachinePrecision] * N[(y / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.2e-32], t$95$1, If[LessEqual[t, -7e-75], N[(N[(1.0 / t), $MachinePrecision] * N[(N[(y * z), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-104], N[(z / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a + 1}\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-75}:\\
\;\;\;\;\frac{1}{t} \cdot \frac{y \cdot z}{a + 1}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.9000000000000001e123 or -4.6e66 < t < -4.1999999999999998e-32 or 5.4999999999999998e-104 < t Initial program 84.9%
*-commutative84.9%
associate-*l/85.0%
*-commutative85.0%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in t around inf 64.1%
if -2.9000000000000001e123 < t < -4.6e66Initial program 65.0%
*-commutative65.0%
associate-*l/82.3%
*-commutative82.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in b around 0 39.5%
Taylor expanded in x around 0 39.1%
*-commutative39.1%
+-commutative39.1%
times-frac48.1%
+-commutative48.1%
Applied egg-rr48.1%
if -4.1999999999999998e-32 < t < -6.9999999999999997e-75Initial program 99.5%
*-commutative99.5%
associate-*l/90.1%
*-commutative90.1%
associate-*l/90.0%
Simplified90.0%
Taylor expanded in b around 0 80.9%
Taylor expanded in x around 0 71.8%
*-un-lft-identity71.8%
+-commutative71.8%
times-frac71.9%
+-commutative71.9%
Applied egg-rr71.9%
if -6.9999999999999997e-75 < t < 5.4999999999999998e-104Initial program 53.6%
*-commutative53.6%
associate-*l/48.3%
*-commutative48.3%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in t around 0 64.3%
Final simplification63.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.2e-76)
(* (+ x (* z (/ y t))) (/ 1.0 (+ a 1.0)))
(if (<= t -8.5e-104)
(/ z b)
(if (<= t -2.55e-163)
(/ x (+ (* y (/ b t)) (+ a 1.0)))
(if (<= t 9.5e-106) (/ z b) (/ (+ x (/ (* y z) t)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.2e-76) {
tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0));
} else if (t <= -8.5e-104) {
tmp = z / b;
} else if (t <= -2.55e-163) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= 9.5e-106) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.2d-76)) then
tmp = (x + (z * (y / t))) * (1.0d0 / (a + 1.0d0))
else if (t <= (-8.5d-104)) then
tmp = z / b
else if (t <= (-2.55d-163)) then
tmp = x / ((y * (b / t)) + (a + 1.0d0))
else if (t <= 9.5d-106) then
tmp = z / b
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.2e-76) {
tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0));
} else if (t <= -8.5e-104) {
tmp = z / b;
} else if (t <= -2.55e-163) {
tmp = x / ((y * (b / t)) + (a + 1.0));
} else if (t <= 9.5e-106) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.2e-76: tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0)) elif t <= -8.5e-104: tmp = z / b elif t <= -2.55e-163: tmp = x / ((y * (b / t)) + (a + 1.0)) elif t <= 9.5e-106: tmp = z / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.2e-76) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) * Float64(1.0 / Float64(a + 1.0))); elseif (t <= -8.5e-104) tmp = Float64(z / b); elseif (t <= -2.55e-163) tmp = Float64(x / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); elseif (t <= 9.5e-106) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.2e-76) tmp = (x + (z * (y / t))) * (1.0 / (a + 1.0)); elseif (t <= -8.5e-104) tmp = z / b; elseif (t <= -2.55e-163) tmp = x / ((y * (b / t)) + (a + 1.0)); elseif (t <= 9.5e-106) tmp = z / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.2e-76], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.5e-104], N[(z / b), $MachinePrecision], If[LessEqual[t, -2.55e-163], N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e-106], N[(z / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-76}:\\
\;\;\;\;\left(x + z \cdot \frac{y}{t}\right) \cdot \frac{1}{a + 1}\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-104}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -2.19999999999999999e-76Initial program 79.4%
*-commutative79.4%
associate-*l/83.6%
*-commutative83.6%
associate-*l/90.3%
Simplified90.3%
Taylor expanded in b around 0 68.6%
div-inv68.6%
associate-/l*71.9%
+-commutative71.9%
associate-/r/73.2%
fma-def73.2%
+-commutative73.2%
Applied egg-rr73.2%
fma-udef73.2%
Applied egg-rr73.2%
if -2.19999999999999999e-76 < t < -8.50000000000000007e-104 or -2.54999999999999995e-163 < t < 9.4999999999999994e-106Initial program 47.9%
*-commutative47.9%
associate-*l/43.0%
*-commutative43.0%
associate-*l/39.4%
Simplified39.4%
Taylor expanded in t around 0 68.4%
if -8.50000000000000007e-104 < t < -2.54999999999999995e-163Initial program 91.4%
*-commutative91.4%
associate-*l/83.7%
*-commutative83.7%
associate-*l/83.8%
Simplified83.8%
Taylor expanded in x around inf 83.8%
if 9.4999999999999994e-106 < t Initial program 88.3%
*-commutative88.3%
associate-*l/86.3%
*-commutative86.3%
associate-*l/91.5%
Simplified91.5%
Taylor expanded in b around 0 79.0%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.3e+123)
t_1
(if (<= t -2.65e+66)
(* (/ z t) (/ y (+ a 1.0)))
(if (<= t -9.2e-33)
t_1
(if (<= t -2.15e-73)
(/ (* y z) (* t (+ a 1.0)))
(if (<= t 1e-104) (/ 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 <= -3.3e+123) {
tmp = t_1;
} else if (t <= -2.65e+66) {
tmp = (z / t) * (y / (a + 1.0));
} else if (t <= -9.2e-33) {
tmp = t_1;
} else if (t <= -2.15e-73) {
tmp = (y * z) / (t * (a + 1.0));
} else if (t <= 1e-104) {
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 <= (-3.3d+123)) then
tmp = t_1
else if (t <= (-2.65d+66)) then
tmp = (z / t) * (y / (a + 1.0d0))
else if (t <= (-9.2d-33)) then
tmp = t_1
else if (t <= (-2.15d-73)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (t <= 1d-104) 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 <= -3.3e+123) {
tmp = t_1;
} else if (t <= -2.65e+66) {
tmp = (z / t) * (y / (a + 1.0));
} else if (t <= -9.2e-33) {
tmp = t_1;
} else if (t <= -2.15e-73) {
tmp = (y * z) / (t * (a + 1.0));
} else if (t <= 1e-104) {
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 <= -3.3e+123: tmp = t_1 elif t <= -2.65e+66: tmp = (z / t) * (y / (a + 1.0)) elif t <= -9.2e-33: tmp = t_1 elif t <= -2.15e-73: tmp = (y * z) / (t * (a + 1.0)) elif t <= 1e-104: 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 <= -3.3e+123) tmp = t_1; elseif (t <= -2.65e+66) tmp = Float64(Float64(z / t) * Float64(y / Float64(a + 1.0))); elseif (t <= -9.2e-33) tmp = t_1; elseif (t <= -2.15e-73) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (t <= 1e-104) 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 <= -3.3e+123) tmp = t_1; elseif (t <= -2.65e+66) tmp = (z / t) * (y / (a + 1.0)); elseif (t <= -9.2e-33) tmp = t_1; elseif (t <= -2.15e-73) tmp = (y * z) / (t * (a + 1.0)); elseif (t <= 1e-104) 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, -3.3e+123], t$95$1, If[LessEqual[t, -2.65e+66], N[(N[(z / t), $MachinePrecision] * N[(y / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e-33], t$95$1, If[LessEqual[t, -2.15e-73], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-104], N[(z / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.65 \cdot 10^{+66}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a + 1}\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{-73}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 10^{-104}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.30000000000000003e123 or -2.6499999999999998e66 < t < -9.19999999999999942e-33 or 9.99999999999999927e-105 < t Initial program 84.9%
*-commutative84.9%
associate-*l/85.0%
*-commutative85.0%
associate-*l/91.7%
Simplified91.7%
Taylor expanded in t around inf 64.1%
if -3.30000000000000003e123 < t < -2.6499999999999998e66Initial program 65.0%
*-commutative65.0%
associate-*l/82.3%
*-commutative82.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in b around 0 39.5%
Taylor expanded in x around 0 39.1%
*-commutative39.1%
+-commutative39.1%
times-frac48.1%
+-commutative48.1%
Applied egg-rr48.1%
if -9.19999999999999942e-33 < t < -2.1499999999999999e-73Initial program 99.5%
*-commutative99.5%
associate-*l/90.1%
*-commutative90.1%
associate-*l/90.0%
Simplified90.0%
Taylor expanded in b around 0 80.9%
Taylor expanded in x around 0 71.8%
if -2.1499999999999999e-73 < t < 9.99999999999999927e-105Initial program 53.6%
*-commutative53.6%
associate-*l/48.3%
*-commutative48.3%
associate-*l/45.2%
Simplified45.2%
Taylor expanded in t around 0 64.3%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.25e+42) (/ z b) (if (<= y 1.36e+72) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.25e+42) {
tmp = z / b;
} else if (y <= 1.36e+72) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-2.25d+42)) then
tmp = z / b
else if (y <= 1.36d+72) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.25e+42) {
tmp = z / b;
} else if (y <= 1.36e+72) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.25e+42: tmp = z / b elif y <= 1.36e+72: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.25e+42) tmp = Float64(z / b); elseif (y <= 1.36e+72) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.25e+42) tmp = z / b; elseif (y <= 1.36e+72) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.25e+42], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.36e+72], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+42}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.36 \cdot 10^{+72}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.25000000000000006e42 or 1.3599999999999999e72 < y Initial program 46.5%
*-commutative46.5%
associate-*l/51.6%
*-commutative51.6%
associate-*l/61.6%
Simplified61.6%
Taylor expanded in t around 0 60.8%
if -2.25000000000000006e42 < y < 1.3599999999999999e72Initial program 89.8%
*-commutative89.8%
associate-*l/84.3%
*-commutative84.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in x around inf 65.5%
Final simplification63.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3e+200) (/ z b) (if (<= y 3.7e+75) (/ x (+ a (+ 1.0 (/ b (/ t y))))) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3e+200) {
tmp = z / b;
} else if (y <= 3.7e+75) {
tmp = x / (a + (1.0 + (b / (t / y))));
} 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 (y <= (-3d+200)) then
tmp = z / b
else if (y <= 3.7d+75) then
tmp = x / (a + (1.0d0 + (b / (t / y))))
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 (y <= -3e+200) {
tmp = z / b;
} else if (y <= 3.7e+75) {
tmp = x / (a + (1.0 + (b / (t / y))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3e+200: tmp = z / b elif y <= 3.7e+75: tmp = x / (a + (1.0 + (b / (t / y)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3e+200) tmp = Float64(z / b); elseif (y <= 3.7e+75) tmp = Float64(x / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3e+200) tmp = z / b; elseif (y <= 3.7e+75) tmp = x / (a + (1.0 + (b / (t / y)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3e+200], N[(z / b), $MachinePrecision], If[LessEqual[y, 3.7e+75], N[(x / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+200}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3.7 \cdot 10^{+75}:\\
\;\;\;\;\frac{x}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.99999999999999991e200 or 3.70000000000000011e75 < y Initial program 39.0%
*-commutative39.0%
associate-*l/43.2%
*-commutative43.2%
associate-*l/53.9%
Simplified53.9%
Taylor expanded in t around 0 67.4%
if -2.99999999999999991e200 < y < 3.70000000000000011e75Initial program 86.8%
*-commutative86.8%
associate-*l/83.1%
*-commutative83.1%
associate-*l/82.6%
Simplified82.6%
associate-*l/85.3%
*-commutative85.3%
associate-/l*82.6%
Applied egg-rr82.6%
Taylor expanded in x around inf 62.0%
+-commutative62.0%
associate-+l+62.0%
+-commutative62.0%
associate-/l*63.0%
Simplified63.0%
Final simplification64.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -2.9e+123)
(not
(or (<= t -4.2e+66) (and (not (<= t -3.3e-13)) (<= t 5.4e-111)))))
(/ x (+ a 1.0))
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.9e+123) || !((t <= -4.2e+66) || (!(t <= -3.3e-13) && (t <= 5.4e-111)))) {
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 <= (-2.9d+123)) .or. (.not. (t <= (-4.2d+66)) .or. (.not. (t <= (-3.3d-13))) .and. (t <= 5.4d-111))) 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 <= -2.9e+123) || !((t <= -4.2e+66) || (!(t <= -3.3e-13) && (t <= 5.4e-111)))) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.9e+123) or not ((t <= -4.2e+66) or (not (t <= -3.3e-13) and (t <= 5.4e-111))): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.9e+123) || !((t <= -4.2e+66) || (!(t <= -3.3e-13) && (t <= 5.4e-111)))) 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 <= -2.9e+123) || ~(((t <= -4.2e+66) || (~((t <= -3.3e-13)) && (t <= 5.4e-111))))) 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, -2.9e+123], N[Not[Or[LessEqual[t, -4.2e+66], And[N[Not[LessEqual[t, -3.3e-13]], $MachinePrecision], LessEqual[t, 5.4e-111]]]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+123} \lor \neg \left(t \leq -4.2 \cdot 10^{+66} \lor \neg \left(t \leq -3.3 \cdot 10^{-13}\right) \land t \leq 5.4 \cdot 10^{-111}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.9000000000000001e123 or -4.20000000000000011e66 < t < -3.3000000000000001e-13 or 5.39999999999999977e-111 < t Initial program 85.3%
*-commutative85.3%
associate-*l/85.4%
*-commutative85.4%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in t around inf 64.6%
if -2.9000000000000001e123 < t < -4.20000000000000011e66 or -3.3000000000000001e-13 < t < 5.39999999999999977e-111Initial program 59.0%
*-commutative59.0%
associate-*l/55.6%
*-commutative55.6%
associate-*l/53.1%
Simplified53.1%
Taylor expanded in t around 0 59.0%
Final simplification62.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -2.9e+123)
t_1
(if (<= t -4.6e+66)
(* (/ y t) (/ z a))
(if (or (<= t -1.75e-14) (not (<= t 7e-109))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.9e+123) {
tmp = t_1;
} else if (t <= -4.6e+66) {
tmp = (y / t) * (z / a);
} else if ((t <= -1.75e-14) || !(t <= 7e-109)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-2.9d+123)) then
tmp = t_1
else if (t <= (-4.6d+66)) then
tmp = (y / t) * (z / a)
else if ((t <= (-1.75d-14)) .or. (.not. (t <= 7d-109))) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.9e+123) {
tmp = t_1;
} else if (t <= -4.6e+66) {
tmp = (y / t) * (z / a);
} else if ((t <= -1.75e-14) || !(t <= 7e-109)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -2.9e+123: tmp = t_1 elif t <= -4.6e+66: tmp = (y / t) * (z / a) elif (t <= -1.75e-14) or not (t <= 7e-109): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.9e+123) tmp = t_1; elseif (t <= -4.6e+66) tmp = Float64(Float64(y / t) * Float64(z / a)); elseif ((t <= -1.75e-14) || !(t <= 7e-109)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -2.9e+123) tmp = t_1; elseif (t <= -4.6e+66) tmp = (y / t) * (z / a); elseif ((t <= -1.75e-14) || ~((t <= 7e-109))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.9e+123], t$95$1, If[LessEqual[t, -4.6e+66], N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.75e-14], N[Not[LessEqual[t, 7e-109]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-14} \lor \neg \left(t \leq 7 \cdot 10^{-109}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.9000000000000001e123 or -4.6e66 < t < -1.7500000000000001e-14 or 7e-109 < t Initial program 85.3%
*-commutative85.3%
associate-*l/85.4%
*-commutative85.4%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in t around inf 64.6%
if -2.9000000000000001e123 < t < -4.6e66Initial program 65.0%
*-commutative65.0%
associate-*l/82.3%
*-commutative82.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in x around 0 56.0%
times-frac81.8%
associate-*l/90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in a around inf 47.8%
if -1.7500000000000001e-14 < t < 7e-109Initial program 58.3%
*-commutative58.3%
associate-*l/52.8%
*-commutative52.8%
associate-*l/50.1%
Simplified50.1%
Taylor expanded in t around 0 60.3%
Final simplification62.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3e+123)
t_1
(if (<= t -3.15e+61)
(* (/ z t) (/ y (+ a 1.0)))
(if (or (<= t -4.5e-12) (not (<= t 9e-105))) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3e+123) {
tmp = t_1;
} else if (t <= -3.15e+61) {
tmp = (z / t) * (y / (a + 1.0));
} else if ((t <= -4.5e-12) || !(t <= 9e-105)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-3d+123)) then
tmp = t_1
else if (t <= (-3.15d+61)) then
tmp = (z / t) * (y / (a + 1.0d0))
else if ((t <= (-4.5d-12)) .or. (.not. (t <= 9d-105))) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3e+123) {
tmp = t_1;
} else if (t <= -3.15e+61) {
tmp = (z / t) * (y / (a + 1.0));
} else if ((t <= -4.5e-12) || !(t <= 9e-105)) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -3e+123: tmp = t_1 elif t <= -3.15e+61: tmp = (z / t) * (y / (a + 1.0)) elif (t <= -4.5e-12) or not (t <= 9e-105): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -3e+123) tmp = t_1; elseif (t <= -3.15e+61) tmp = Float64(Float64(z / t) * Float64(y / Float64(a + 1.0))); elseif ((t <= -4.5e-12) || !(t <= 9e-105)) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -3e+123) tmp = t_1; elseif (t <= -3.15e+61) tmp = (z / t) * (y / (a + 1.0)); elseif ((t <= -4.5e-12) || ~((t <= 9e-105))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3e+123], t$95$1, If[LessEqual[t, -3.15e+61], N[(N[(z / t), $MachinePrecision] * N[(y / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -4.5e-12], N[Not[LessEqual[t, 9e-105]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3 \cdot 10^{+123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.15 \cdot 10^{+61}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a + 1}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-12} \lor \neg \left(t \leq 9 \cdot 10^{-105}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.00000000000000008e123 or -3.14999999999999988e61 < t < -4.49999999999999981e-12 or 8.9999999999999995e-105 < t Initial program 85.3%
*-commutative85.3%
associate-*l/85.4%
*-commutative85.4%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in t around inf 64.6%
if -3.00000000000000008e123 < t < -3.14999999999999988e61Initial program 65.0%
*-commutative65.0%
associate-*l/82.3%
*-commutative82.3%
associate-*l/82.5%
Simplified82.5%
Taylor expanded in b around 0 39.5%
Taylor expanded in x around 0 39.1%
*-commutative39.1%
+-commutative39.1%
times-frac48.1%
+-commutative48.1%
Applied egg-rr48.1%
if -4.49999999999999981e-12 < t < 8.9999999999999995e-105Initial program 58.3%
*-commutative58.3%
associate-*l/52.8%
*-commutative52.8%
associate-*l/50.1%
Simplified50.1%
Taylor expanded in t around 0 60.3%
Final simplification62.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.9e+123) (/ x a) (if (<= t 2.7e-95) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e+123) {
tmp = x / a;
} else if (t <= 2.7e-95) {
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.9d+123)) then
tmp = x / a
else if (t <= 2.7d-95) 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.9e+123) {
tmp = x / a;
} else if (t <= 2.7e-95) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.9e+123: tmp = x / a elif t <= 2.7e-95: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.9e+123) tmp = Float64(x / a); elseif (t <= 2.7e-95) 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.9e+123) tmp = x / a; elseif (t <= 2.7e-95) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.9e+123], N[(x / a), $MachinePrecision], If[LessEqual[t, 2.7e-95], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+123}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-95}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -2.9000000000000001e123 or 2.7e-95 < t Initial program 86.5%
*-commutative86.5%
associate-*l/88.3%
*-commutative88.3%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in t around inf 65.5%
Taylor expanded in a around inf 39.5%
if -2.9000000000000001e123 < t < 2.7e-95Initial program 62.5%
*-commutative62.5%
associate-*l/58.3%
*-commutative58.3%
associate-*l/56.3%
Simplified56.3%
Taylor expanded in t around 0 53.8%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 73.4%
*-commutative73.4%
associate-*l/71.9%
*-commutative71.9%
associate-*l/74.5%
Simplified74.5%
Taylor expanded in t around inf 41.8%
Taylor expanded in a around inf 25.2%
Final simplification25.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023279
(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))))