
(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 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (+ 1.0 (+ a (* b (/ y t))))))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z t_3))
(if (<= t_2 -2e-308)
t_2
(if (<= t_2 0.0)
(/ (+ z (* t (/ x y))) b)
(if (<= t_2 1e+275)
(/ t_1 (+ (* (/ 1.0 t) (* y b)) (+ a 1.0)))
(+ (/ x t_3) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = 1.0 + (a + (b * (y / t)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / t_3);
} else if (t_2 <= -2e-308) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z + (t * (x / y))) / b;
} else if (t_2 <= 1e+275) {
tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0));
} else {
tmp = (x / t_3) + (z / b);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = 1.0 + (a + (b * (y / t)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / t_3);
} else if (t_2 <= -2e-308) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (z + (t * (x / y))) / b;
} else if (t_2 <= 1e+275) {
tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0));
} else {
tmp = (x / t_3) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / (((y * b) / t) + (a + 1.0)) t_3 = 1.0 + (a + (b * (y / t))) tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / t_3) elif t_2 <= -2e-308: tmp = t_2 elif t_2 <= 0.0: tmp = (z + (t * (x / y))) / b elif t_2 <= 1e+275: tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0)) else: tmp = (x / t_3) + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = Float64(1.0 + Float64(a + Float64(b * Float64(y / t)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / t_3)); elseif (t_2 <= -2e-308) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (t_2 <= 1e+275) tmp = Float64(t_1 / Float64(Float64(Float64(1.0 / t) * Float64(y * b)) + Float64(a + 1.0))); else tmp = Float64(Float64(x / t_3) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / (((y * b) / t) + (a + 1.0)); t_3 = 1.0 + (a + (b * (y / t))); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / t_3); elseif (t_2 <= -2e-308) tmp = t_2; elseif (t_2 <= 0.0) tmp = (z + (t * (x / y))) / b; elseif (t_2 <= 1e+275) tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0)); else tmp = (x / t_3) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-308], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$2, 1e+275], N[(t$95$1 / N[(N[(N[(1.0 / t), $MachinePrecision] * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t$95$3), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_3}\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;t\_2 \leq 10^{+275}:\\
\;\;\;\;\frac{t\_1}{\frac{1}{t} \cdot \left(y \cdot b\right) + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t\_3} + \frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 33.8%
associate-/l*52.8%
associate-/l*52.8%
Simplified52.8%
clear-num52.7%
un-div-inv52.8%
Applied egg-rr52.8%
Taylor expanded in x around 0 61.9%
times-frac94.1%
associate-/l*84.1%
Simplified84.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999998e-308Initial program 99.7%
if -1.9999999999999998e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 50.4%
associate-/l*54.7%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in b around inf 55.1%
Taylor expanded in t around 0 63.1%
times-frac73.1%
Simplified73.1%
Taylor expanded in b around 0 70.2%
associate-*r/75.3%
Simplified75.3%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e274Initial program 99.4%
clear-num99.3%
associate-/r/99.4%
Applied egg-rr99.4%
if 9.9999999999999996e274 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 6.6%
associate-/l*17.5%
associate-/l*40.4%
Simplified40.4%
clear-num40.5%
un-div-inv40.5%
Applied egg-rr40.5%
Taylor expanded in x around 0 19.3%
+-commutative19.3%
times-frac30.1%
associate-/l*42.5%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in y around inf 82.3%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ 1.0 (+ a (* b (/ y t))))))
(if (<= t_1 (- INFINITY))
(* (/ y t) (/ z t_2))
(if (<= t_1 -2e-308)
t_1
(if (<= t_1 0.0)
(/ (+ z (* t (/ x y))) b)
(if (<= t_1 1e+275) t_1 (+ (/ x t_2) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = 1.0 + (a + (b * (y / t)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y / t) * (z / t_2);
} else if (t_1 <= -2e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z + (t * (x / y))) / b;
} else if (t_1 <= 1e+275) {
tmp = t_1;
} else {
tmp = (x / t_2) + (z / b);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = 1.0 + (a + (b * (y / t)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / t_2);
} else if (t_1 <= -2e-308) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z + (t * (x / y))) / b;
} else if (t_1 <= 1e+275) {
tmp = t_1;
} else {
tmp = (x / t_2) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = 1.0 + (a + (b * (y / t))) tmp = 0 if t_1 <= -math.inf: tmp = (y / t) * (z / t_2) elif t_1 <= -2e-308: tmp = t_1 elif t_1 <= 0.0: tmp = (z + (t * (x / y))) / b elif t_1 <= 1e+275: tmp = t_1 else: tmp = (x / t_2) + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(1.0 + Float64(a + Float64(b * Float64(y / t)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / t_2)); elseif (t_1 <= -2e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (t_1 <= 1e+275) tmp = t_1; else tmp = Float64(Float64(x / t_2) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); t_2 = 1.0 + (a + (b * (y / t))); tmp = 0.0; if (t_1 <= -Inf) tmp = (y / t) * (z / t_2); elseif (t_1 <= -2e-308) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z + (t * (x / y))) / b; elseif (t_1 <= 1e+275) tmp = t_1; else tmp = (x / t_2) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-308], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 1e+275], t$95$1, N[(N[(x / t$95$2), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_2}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;t\_1 \leq 10^{+275}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t\_2} + \frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 33.8%
associate-/l*52.8%
associate-/l*52.8%
Simplified52.8%
clear-num52.7%
un-div-inv52.8%
Applied egg-rr52.8%
Taylor expanded in x around 0 61.9%
times-frac94.1%
associate-/l*84.1%
Simplified84.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999998e-308 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e274Initial program 99.5%
if -1.9999999999999998e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 50.4%
associate-/l*54.7%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in b around inf 55.1%
Taylor expanded in t around 0 63.1%
times-frac73.1%
Simplified73.1%
Taylor expanded in b around 0 70.2%
associate-*r/75.3%
Simplified75.3%
if 9.9999999999999996e274 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 6.6%
associate-/l*17.5%
associate-/l*40.4%
Simplified40.4%
clear-num40.5%
un-div-inv40.5%
Applied egg-rr40.5%
Taylor expanded in x around 0 19.3%
+-commutative19.3%
times-frac30.1%
associate-/l*42.5%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in y around inf 82.3%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (+ 1.0 (+ a (* b (/ y t)))))
(t_4 (/ x t_3)))
(if (<= t_2 -2e-308)
(+ (* (/ y t) (/ z t_3)) t_4)
(if (<= t_2 0.0)
(/ (+ z (* t (/ x y))) b)
(if (<= t_2 1e+275)
(/ t_1 (+ (* (/ 1.0 t) (* y b)) (+ a 1.0)))
(+ t_4 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = 1.0 + (a + (b * (y / t)));
double t_4 = x / t_3;
double tmp;
if (t_2 <= -2e-308) {
tmp = ((y / t) * (z / t_3)) + t_4;
} else if (t_2 <= 0.0) {
tmp = (z + (t * (x / y))) / b;
} else if (t_2 <= 1e+275) {
tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0));
} else {
tmp = t_4 + (z / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = t_1 / (((y * b) / t) + (a + 1.0d0))
t_3 = 1.0d0 + (a + (b * (y / t)))
t_4 = x / t_3
if (t_2 <= (-2d-308)) then
tmp = ((y / t) * (z / t_3)) + t_4
else if (t_2 <= 0.0d0) then
tmp = (z + (t * (x / y))) / b
else if (t_2 <= 1d+275) then
tmp = t_1 / (((1.0d0 / t) * (y * b)) + (a + 1.0d0))
else
tmp = t_4 + (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 + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = 1.0 + (a + (b * (y / t)));
double t_4 = x / t_3;
double tmp;
if (t_2 <= -2e-308) {
tmp = ((y / t) * (z / t_3)) + t_4;
} else if (t_2 <= 0.0) {
tmp = (z + (t * (x / y))) / b;
} else if (t_2 <= 1e+275) {
tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0));
} else {
tmp = t_4 + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / (((y * b) / t) + (a + 1.0)) t_3 = 1.0 + (a + (b * (y / t))) t_4 = x / t_3 tmp = 0 if t_2 <= -2e-308: tmp = ((y / t) * (z / t_3)) + t_4 elif t_2 <= 0.0: tmp = (z + (t * (x / y))) / b elif t_2 <= 1e+275: tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0)) else: tmp = t_4 + (z / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = Float64(1.0 + Float64(a + Float64(b * Float64(y / t)))) t_4 = Float64(x / t_3) tmp = 0.0 if (t_2 <= -2e-308) tmp = Float64(Float64(Float64(y / t) * Float64(z / t_3)) + t_4); elseif (t_2 <= 0.0) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (t_2 <= 1e+275) tmp = Float64(t_1 / Float64(Float64(Float64(1.0 / t) * Float64(y * b)) + Float64(a + 1.0))); else tmp = Float64(t_4 + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / (((y * b) / t) + (a + 1.0)); t_3 = 1.0 + (a + (b * (y / t))); t_4 = x / t_3; tmp = 0.0; if (t_2 <= -2e-308) tmp = ((y / t) * (z / t_3)) + t_4; elseif (t_2 <= 0.0) tmp = (z + (t * (x / y))) / b; elseif (t_2 <= 1e+275) tmp = t_1 / (((1.0 / t) * (y * b)) + (a + 1.0)); else tmp = t_4 + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x / t$95$3), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-308], N[(N[(N[(y / t), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$2, 1e+275], N[(t$95$1 / N[(N[(N[(1.0 / t), $MachinePrecision] * N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 + N[(z / b), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\
t_4 := \frac{x}{t\_3}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-308}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_3} + t\_4\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;t\_2 \leq 10^{+275}:\\
\;\;\;\;\frac{t\_1}{\frac{1}{t} \cdot \left(y \cdot b\right) + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_4 + \frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.9999999999999998e-308Initial program 91.1%
associate-/l*91.1%
associate-/l*89.8%
Simplified89.8%
clear-num89.7%
un-div-inv89.9%
Applied egg-rr89.9%
Taylor expanded in x around 0 94.8%
+-commutative94.8%
times-frac95.9%
associate-/l*94.6%
associate-/l*94.6%
Simplified94.6%
if -1.9999999999999998e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 50.4%
associate-/l*54.7%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in b around inf 55.1%
Taylor expanded in t around 0 63.1%
times-frac73.1%
Simplified73.1%
Taylor expanded in b around 0 70.2%
associate-*r/75.3%
Simplified75.3%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e274Initial program 99.4%
clear-num99.3%
associate-/r/99.4%
Applied egg-rr99.4%
if 9.9999999999999996e274 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 6.6%
associate-/l*17.5%
associate-/l*40.4%
Simplified40.4%
clear-num40.5%
un-div-inv40.5%
Applied egg-rr40.5%
Taylor expanded in x around 0 19.3%
+-commutative19.3%
times-frac30.1%
associate-/l*42.5%
associate-/l*50.2%
Simplified50.2%
Taylor expanded in y around inf 82.3%
Final simplification91.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1e-119) (not (<= t 1.66e-128))) (/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0))) (+ (/ x (+ 1.0 (+ a (* b (/ y t))))) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1e-119) || !(t <= 1.66e-128)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (x / (1.0 + (a + (b * (y / t))))) + (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 <= (-1d-119)) .or. (.not. (t <= 1.66d-128))) then
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
else
tmp = (x / (1.0d0 + (a + (b * (y / t))))) + (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 <= -1e-119) || !(t <= 1.66e-128)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1e-119) or not (t <= 1.66e-128): tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) else: tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1e-119) || !(t <= 1.66e-128)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1e-119) || ~((t <= 1.66e-128))) tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); else tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1e-119], N[Not[LessEqual[t, 1.66e-128]], $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], N[(N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{-119} \lor \neg \left(t \leq 1.66 \cdot 10^{-128}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)} + \frac{z}{b}\\
\end{array}
\end{array}
if t < -1.00000000000000001e-119 or 1.66e-128 < t Initial program 79.9%
associate-/l*83.3%
associate-/l*89.6%
Simplified89.6%
if -1.00000000000000001e-119 < t < 1.66e-128Initial program 62.2%
associate-/l*53.0%
associate-/l*49.0%
Simplified49.0%
clear-num48.9%
un-div-inv50.0%
Applied egg-rr50.0%
Taylor expanded in x around 0 69.0%
+-commutative69.0%
times-frac57.5%
associate-/l*53.3%
associate-/l*53.3%
Simplified53.3%
Taylor expanded in y around inf 79.8%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* y (/ b t)) (+ a 1.0))))
(if (<= t -9e-119)
(/ (+ x (* y (/ z t))) t_1)
(if (<= t 1.36e-128)
(+ (/ x (+ 1.0 (+ a (* b (/ y t))))) (/ z b))
(/ (+ x (/ y (/ t z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -9e-119) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 1.36e-128) {
tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b);
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * (b / t)) + (a + 1.0d0)
if (t <= (-9d-119)) then
tmp = (x + (y * (z / t))) / t_1
else if (t <= 1.36d-128) then
tmp = (x / (1.0d0 + (a + (b * (y / t))))) + (z / b)
else
tmp = (x + (y / (t / z))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * (b / t)) + (a + 1.0);
double tmp;
if (t <= -9e-119) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= 1.36e-128) {
tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b);
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * (b / t)) + (a + 1.0) tmp = 0 if t <= -9e-119: tmp = (x + (y * (z / t))) / t_1 elif t <= 1.36e-128: tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b) else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0)) tmp = 0.0 if (t <= -9e-119) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); elseif (t <= 1.36e-128) tmp = Float64(Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))) + Float64(z / b)); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * (b / t)) + (a + 1.0); tmp = 0.0; if (t <= -9e-119) tmp = (x + (y * (z / t))) / t_1; elseif (t <= 1.36e-128) tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b); else tmp = (x + (y / (t / z))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9e-119], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 1.36e-128], N[(N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{b}{t} + \left(a + 1\right)\\
\mathbf{if}\;t \leq -9 \cdot 10^{-119}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{-128}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)} + \frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\end{array}
\end{array}
if t < -9.0000000000000005e-119Initial program 78.3%
associate-/l*82.9%
associate-/l*90.8%
Simplified90.8%
if -9.0000000000000005e-119 < t < 1.36000000000000005e-128Initial program 62.2%
associate-/l*53.0%
associate-/l*49.0%
Simplified49.0%
clear-num48.9%
un-div-inv50.0%
Applied egg-rr50.0%
Taylor expanded in x around 0 69.0%
+-commutative69.0%
times-frac57.5%
associate-/l*53.3%
associate-/l*53.3%
Simplified53.3%
Taylor expanded in y around inf 79.8%
if 1.36000000000000005e-128 < t Initial program 81.3%
associate-/l*83.6%
associate-/l*88.5%
Simplified88.5%
clear-num88.6%
un-div-inv88.6%
Applied egg-rr88.6%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= t -4.2)
t_1
(if (<= t -2.45e-303)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 7e-28) (/ (+ z (/ (* x t) y)) b) 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 <= -4.2) {
tmp = t_1;
} else if (t <= -2.45e-303) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 7e-28) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
if (t <= (-4.2d0)) then
tmp = t_1
else if (t <= (-2.45d-303)) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 7d-28) then
tmp = (z + ((x * t) / y)) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -4.2) {
tmp = t_1;
} else if (t <= -2.45e-303) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 7e-28) {
tmp = (z + ((x * t) / y)) / b;
} 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 <= -4.2: tmp = t_1 elif t <= -2.45e-303: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 7e-28: tmp = (z + ((x * t) / y)) / b 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 <= -4.2) tmp = t_1; elseif (t <= -2.45e-303) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 7e-28) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); 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 <= -4.2) tmp = t_1; elseif (t <= -2.45e-303) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 7e-28) tmp = (z + ((x * t) / y)) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2], t$95$1, If[LessEqual[t, -2.45e-303], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-28], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $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 -4.2:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.45 \cdot 10^{-303}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-28}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.20000000000000018 or 6.9999999999999999e-28 < t Initial program 81.0%
associate-/l*85.3%
associate-/l*94.3%
Simplified94.3%
clear-num94.2%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in y around 0 77.4%
if -4.20000000000000018 < t < -2.45e-303Initial program 71.3%
associate-/l*69.9%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in x around 0 65.0%
Taylor expanded in t around 0 75.6%
if -2.45e-303 < t < 6.9999999999999999e-28Initial program 63.3%
associate-/l*53.0%
associate-/l*49.6%
Simplified49.6%
Taylor expanded in b around inf 47.6%
Taylor expanded in t around 0 72.4%
times-frac65.3%
Simplified65.3%
Taylor expanded in b around 0 72.4%
Final simplification75.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.8e+48) (not (<= t 8.8e-27))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (+ (/ x (+ 1.0 (+ a (* b (/ y t))))) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.8e+48) || !(t <= 8.8e-27)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (x / (1.0 + (a + (b * (y / t))))) + (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.8d+48)) .or. (.not. (t <= 8.8d-27))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else
tmp = (x / (1.0d0 + (a + (b * (y / t))))) + (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.8e+48) || !(t <= 8.8e-27)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.8e+48) or not (t <= 8.8e-27): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.8e+48) || !(t <= 8.8e-27)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = Float64(Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))) + Float64(z / b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.8e+48) || ~((t <= 8.8e-27))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = (x / (1.0 + (a + (b * (y / t))))) + (z / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.8e+48], N[Not[LessEqual[t, 8.8e-27]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+48} \lor \neg \left(t \leq 8.8 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)} + \frac{z}{b}\\
\end{array}
\end{array}
if t < -2.80000000000000012e48 or 8.79999999999999948e-27 < t Initial program 80.4%
associate-/l*85.0%
associate-/l*94.6%
Simplified94.6%
clear-num94.6%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around 0 78.8%
if -2.80000000000000012e48 < t < 8.79999999999999948e-27Initial program 69.2%
associate-/l*64.2%
associate-/l*61.2%
Simplified61.2%
clear-num61.1%
un-div-inv61.8%
Applied egg-rr61.8%
Taylor expanded in x around 0 75.3%
+-commutative75.3%
times-frac65.0%
associate-/l*62.5%
associate-/l*62.5%
Simplified62.5%
Taylor expanded in y around inf 73.9%
Final simplification76.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.8e+48) (not (<= t 1.8e-29))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (+ (/ z b) (/ x (+ 1.0 (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.8e+48) || !(t <= 1.8e-29)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z / b) + (x / (1.0 + ((y * b) / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.8d+48)) .or. (.not. (t <= 1.8d-29))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else
tmp = (z / b) + (x / (1.0d0 + ((y * b) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.8e+48) || !(t <= 1.8e-29)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z / b) + (x / (1.0 + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.8e+48) or not (t <= 1.8e-29): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = (z / b) + (x / (1.0 + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.8e+48) || !(t <= 1.8e-29)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.8e+48) || ~((t <= 1.8e-29))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = (z / b) + (x / (1.0 + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.8e+48], N[Not[LessEqual[t, 1.8e-29]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+48} \lor \neg \left(t \leq 1.8 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x}{1 + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if t < -2.80000000000000012e48 or 1.79999999999999987e-29 < t Initial program 80.4%
associate-/l*85.0%
associate-/l*94.6%
Simplified94.6%
clear-num94.6%
un-div-inv94.6%
Applied egg-rr94.6%
Taylor expanded in y around 0 78.8%
if -2.80000000000000012e48 < t < 1.79999999999999987e-29Initial program 69.2%
associate-/l*64.2%
associate-/l*61.2%
Simplified61.2%
clear-num61.1%
un-div-inv61.8%
Applied egg-rr61.8%
Taylor expanded in x around 0 75.3%
+-commutative75.3%
times-frac65.0%
associate-/l*62.5%
associate-/l*62.5%
Simplified62.5%
Taylor expanded in y around inf 73.9%
Taylor expanded in a around 0 68.6%
Final simplification73.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -15.0) (not (<= t 95000.0))) (/ x (+ 1.0 (+ a (* b (/ y t))))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -15.0) || !(t <= 95000.0)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-15.0d0)) .or. (.not. (t <= 95000.0d0))) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -15.0) || !(t <= 95000.0)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -15.0) or not (t <= 95000.0): tmp = x / (1.0 + (a + (b * (y / t)))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -15.0) || !(t <= 95000.0)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -15.0) || ~((t <= 95000.0))) tmp = x / (1.0 + (a + (b * (y / t)))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -15.0], N[Not[LessEqual[t, 95000.0]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -15 \lor \neg \left(t \leq 95000\right):\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -15 or 95000 < t Initial program 81.3%
associate-/l*86.1%
associate-/l*96.0%
Simplified96.0%
clear-num95.9%
un-div-inv96.0%
Applied egg-rr96.0%
Taylor expanded in x around inf 65.8%
associate-/l*70.5%
Simplified70.5%
if -15 < t < 95000Initial program 68.7%
associate-/l*63.8%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in b around inf 47.3%
Taylor expanded in t around 0 66.0%
times-frac63.8%
Simplified63.8%
Taylor expanded in b around 0 66.8%
Final simplification68.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.2) (not (<= t 3e-29))) (/ (+ x (* y (/ z t))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.2) || !(t <= 3e-29)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-6.2d0)) .or. (.not. (t <= 3d-29))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.2) || !(t <= 3e-29)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.2) or not (t <= 3e-29): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.2) || !(t <= 3e-29)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6.2) || ~((t <= 3e-29))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6.2], N[Not[LessEqual[t, 3e-29]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \lor \neg \left(t \leq 3 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -6.20000000000000018 or 3.0000000000000003e-29 < t Initial program 81.0%
associate-/l*85.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 77.4%
if -6.20000000000000018 < t < 3.0000000000000003e-29Initial program 67.7%
associate-/l*62.2%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in b around inf 49.7%
Taylor expanded in t around 0 69.1%
times-frac66.0%
Simplified66.0%
Taylor expanded in b around 0 69.2%
Final simplification73.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.5) (not (<= t 4e-26))) (/ (+ x (/ y (/ t z))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.5) || !(t <= 4e-26)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.5d0)) .or. (.not. (t <= 4d-26))) then
tmp = (x + (y / (t / z))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.5) || !(t <= 4e-26)) {
tmp = (x + (y / (t / z))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.5) or not (t <= 4e-26): tmp = (x + (y / (t / z))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.5) || !(t <= 4e-26)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.5) || ~((t <= 4e-26))) tmp = (x + (y / (t / z))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.5], N[Not[LessEqual[t, 4e-26]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \lor \neg \left(t \leq 4 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.5 or 4.0000000000000002e-26 < t Initial program 81.0%
associate-/l*85.3%
associate-/l*94.3%
Simplified94.3%
clear-num94.2%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in y around 0 77.4%
if -4.5 < t < 4.0000000000000002e-26Initial program 67.7%
associate-/l*62.2%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in b around inf 49.7%
Taylor expanded in t around 0 69.1%
times-frac66.0%
Simplified66.0%
Taylor expanded in b around 0 69.2%
Final simplification73.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -950.0) (not (<= t 115000.0))) (/ x (+ a 1.0)) (/ (+ z (* t (/ x y))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -950.0) || !(t <= 115000.0)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-950.0d0)) .or. (.not. (t <= 115000.0d0))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + (t * (x / y))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -950.0) || !(t <= 115000.0)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -950.0) or not (t <= 115000.0): tmp = x / (a + 1.0) else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -950.0) || !(t <= 115000.0)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -950.0) || ~((t <= 115000.0))) tmp = x / (a + 1.0); else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -950.0], N[Not[LessEqual[t, 115000.0]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -950 \lor \neg \left(t \leq 115000\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if t < -950 or 115000 < t Initial program 81.3%
associate-/l*86.1%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in y around 0 61.9%
if -950 < t < 115000Initial program 68.7%
associate-/l*63.8%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in b around inf 47.3%
Taylor expanded in t around 0 66.0%
times-frac63.8%
Simplified63.8%
Taylor expanded in b around 0 66.8%
associate-*r/65.3%
Simplified65.3%
Final simplification63.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -52.0) (not (<= t 96000.0))) (/ x (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -52.0) || !(t <= 96000.0)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-52.0d0)) .or. (.not. (t <= 96000.0d0))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -52.0) || !(t <= 96000.0)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -52.0) or not (t <= 96000.0): tmp = x / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -52.0) || !(t <= 96000.0)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -52.0) || ~((t <= 96000.0))) tmp = x / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -52.0], N[Not[LessEqual[t, 96000.0]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -52 \lor \neg \left(t \leq 96000\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -52 or 96000 < t Initial program 81.3%
associate-/l*86.1%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in y around 0 61.9%
if -52 < t < 96000Initial program 68.7%
associate-/l*63.8%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in b around inf 47.3%
Taylor expanded in t around 0 66.0%
times-frac63.8%
Simplified63.8%
Taylor expanded in b around 0 66.8%
Final simplification64.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -55.0) (not (<= t 3.9e-30))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -55.0) || !(t <= 3.9e-30)) {
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 <= (-55.0d0)) .or. (.not. (t <= 3.9d-30))) 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 <= -55.0) || !(t <= 3.9e-30)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -55.0) or not (t <= 3.9e-30): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -55.0) || !(t <= 3.9e-30)) 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 <= -55.0) || ~((t <= 3.9e-30))) 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, -55.0], N[Not[LessEqual[t, 3.9e-30]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -55 \lor \neg \left(t \leq 3.9 \cdot 10^{-30}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -55 or 3.9000000000000003e-30 < t Initial program 81.0%
associate-/l*85.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 58.6%
if -55 < t < 3.9000000000000003e-30Initial program 67.7%
associate-/l*62.2%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in y around inf 58.8%
Final simplification58.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6.8e+149) x (if (<= t 2e+19) (/ z b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.8e+149) {
tmp = x;
} else if (t <= 2e+19) {
tmp = z / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-6.8d+149)) then
tmp = x
else if (t <= 2d+19) then
tmp = z / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.8e+149) {
tmp = x;
} else if (t <= 2e+19) {
tmp = z / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.8e+149: tmp = x elif t <= 2e+19: tmp = z / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.8e+149) tmp = x; elseif (t <= 2e+19) tmp = Float64(z / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.8e+149) tmp = x; elseif (t <= 2e+19) tmp = z / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.8e+149], x, If[LessEqual[t, 2e+19], N[(z / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+149}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+19}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.7999999999999997e149 or 2e19 < t Initial program 80.5%
associate-/l*85.0%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in y around 0 65.5%
Taylor expanded in a around 0 36.2%
if -6.7999999999999997e149 < t < 2e19Initial program 71.8%
associate-/l*69.1%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 50.3%
Final simplification45.2%
(FPCore (x y z t a b) :precision binary64 (if (<= t -6.5e+149) (- x (* x a)) (if (<= t 4.5e+20) (/ z b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.5e+149) {
tmp = x - (x * a);
} else if (t <= 4.5e+20) {
tmp = z / b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-6.5d+149)) then
tmp = x - (x * a)
else if (t <= 4.5d+20) then
tmp = z / b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.5e+149) {
tmp = x - (x * a);
} else if (t <= 4.5e+20) {
tmp = z / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.5e+149: tmp = x - (x * a) elif t <= 4.5e+20: tmp = z / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.5e+149) tmp = Float64(x - Float64(x * a)); elseif (t <= 4.5e+20) tmp = Float64(z / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.5e+149) tmp = x - (x * a); elseif (t <= 4.5e+20) tmp = z / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.5e+149], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+20], N[(z / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+149}:\\
\;\;\;\;x - x \cdot a\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+20}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.50000000000000015e149Initial program 72.6%
associate-/l*79.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 66.1%
Taylor expanded in a around 0 35.4%
mul-1-neg35.4%
unsub-neg35.4%
Simplified35.4%
if -6.50000000000000015e149 < t < 4.5e20Initial program 71.8%
associate-/l*69.1%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 50.3%
if 4.5e20 < t Initial program 84.2%
associate-/l*87.5%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in y around 0 65.2%
Taylor expanded in a around 0 36.7%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 74.9%
associate-/l*74.7%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in y around 0 41.1%
Taylor expanded in a around 0 19.0%
Final simplification19.0%
(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 2024071
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))