
(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 18 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 (* (/ y t) (/ z (fma y (/ b t) (+ a 1.0))))))
(if (<= t_2 (- INFINITY))
t_3
(if (<= t_2 -5e-246)
t_2
(if (<= t_2 1e+303)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_2 INFINITY) 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 = (y / t) * (z / fma(y, (b / t), (a + 1.0)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_2 <= -5e-246) {
tmp = t_2;
} else if (t_2 <= 1e+303) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = 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(Float64(y / t) * Float64(z / fma(y, Float64(b / t), Float64(a + 1.0)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_3; elseif (t_2 <= -5e-246) tmp = t_2; elseif (t_2 <= 1e+303) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(z / b); end return 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[(N[(y / t), $MachinePrecision] * N[(z / N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, -5e-246], t$95$2, If[LessEqual[t$95$2, 1e+303], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(z / b), $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 := \frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-246}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10^{+303}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\
\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.0 or 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 26.9%
associate-/l*62.0%
associate-/l*61.8%
Simplified61.8%
Taylor expanded in x around 0 45.0%
times-frac93.0%
associate-+r+93.0%
associate-*r/86.3%
*-commutative86.3%
associate-/r/89.6%
+-commutative89.6%
associate-/r/86.3%
*-commutative86.3%
associate-*r/93.0%
associate-*l/89.7%
*-commutative89.7%
fma-define89.7%
Simplified89.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999997e-246Initial program 99.6%
if -4.9999999999999997e-246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 83.9%
*-commutative83.9%
associate-/l*87.6%
Applied egg-rr87.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.7%
associate-/l*25.1%
Simplified25.1%
Taylor expanded in y around inf 88.2%
Final simplification91.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ t_1 (+ a 1.0))))
(t_4 (+ 1.0 (+ a t_1))))
(if (<= t_3 -1e-262)
(+ (/ x t_4) (/ (* y z) (* t t_4)))
(if (<= t_3 2e+301)
(/ t_2 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_3 INFINITY)
(* y (/ (/ z t) (+ 1.0 (fma y (/ b t) a))))
(/ 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);
double t_3 = t_2 / (t_1 + (a + 1.0));
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_3 <= -1e-262) {
tmp = (x / t_4) + ((y * z) / (t * t_4));
} else if (t_3 <= 2e+301) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = y * ((z / t) / (1.0 + fma(y, (b / t), a)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(t_1 + Float64(a + 1.0))) t_4 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_3 <= -1e-262) tmp = Float64(Float64(x / t_4) + Float64(Float64(y * z) / Float64(t * t_4))); elseif (t_3 <= 2e+301) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_3 <= Inf) tmp = Float64(y * Float64(Float64(z / t) / Float64(1.0 + fma(y, Float64(b / t), a)))); 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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-262], N[(N[(x / t$95$4), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+301], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(y * N[(N[(z / t), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1 + \left(a + 1\right)}\\
t_4 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-262}:\\
\;\;\;\;\frac{x}{t\_4} + \frac{y \cdot z}{t \cdot t\_4}\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;y \cdot \frac{\frac{z}{t}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.00000000000000001e-262Initial program 91.5%
associate-/l*89.1%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in x around 0 92.6%
if -1.00000000000000001e-262 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301Initial program 83.6%
*-commutative83.6%
associate-/l*87.3%
Applied egg-rr87.3%
if 2.00000000000000011e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 27.8%
associate-/l*54.9%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in x around 0 49.1%
associate-/l*81.2%
associate-+r+81.2%
associate-*r/71.9%
*-commutative71.9%
associate-/r/76.3%
+-commutative76.3%
associate-/r/71.9%
*-commutative71.9%
associate-*r/81.2%
associate-*l/76.4%
*-commutative76.4%
fma-define76.4%
+-commutative76.4%
associate-/r*82.0%
fma-undefine82.0%
associate-*r/82.2%
associate-*l/72.8%
associate-/r/81.8%
associate-+r+81.8%
+-commutative81.8%
Simplified82.0%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.7%
associate-/l*25.1%
Simplified25.1%
Taylor expanded in y around inf 88.2%
Final simplification88.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.45e+29) (not (<= t 9e-114)))
(/ (+ x (/ y (/ t z))) (+ (* y (/ b t)) (+ a 1.0)))
(+
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(pow (+ (* t (+ (/ 1.0 (* y z)) (/ a (* y z)))) (/ b z)) -1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.45e+29) || !(t <= 9e-114)) {
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (x / (1.0 + (a + ((y * b) / t)))) + pow(((t * ((1.0 / (y * z)) + (a / (y * z)))) + (b / z)), -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 <= (-1.45d+29)) .or. (.not. (t <= 9d-114))) then
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0d0))
else
tmp = (x / (1.0d0 + (a + ((y * b) / t)))) + (((t * ((1.0d0 / (y * z)) + (a / (y * z)))) + (b / z)) ** (-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 <= -1.45e+29) || !(t <= 9e-114)) {
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (x / (1.0 + (a + ((y * b) / t)))) + Math.pow(((t * ((1.0 / (y * z)) + (a / (y * z)))) + (b / z)), -1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.45e+29) or not (t <= 9e-114): tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0)) else: tmp = (x / (1.0 + (a + ((y * b) / t)))) + math.pow(((t * ((1.0 / (y * z)) + (a / (y * z)))) + (b / z)), -1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.45e+29) || !(t <= 9e-114)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))) + (Float64(Float64(t * Float64(Float64(1.0 / Float64(y * z)) + Float64(a / Float64(y * z)))) + Float64(b / z)) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.45e+29) || ~((t <= 9e-114))) tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0)); else tmp = (x / (1.0 + (a + ((y * b) / t)))) + (((t * ((1.0 / (y * z)) + (a / (y * z)))) + (b / z)) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.45e+29], N[Not[LessEqual[t, 9e-114]], $MachinePrecision]], 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], N[(N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Power[N[(N[(t * N[(N[(1.0 / N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+29} \lor \neg \left(t \leq 9 \cdot 10^{-114}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)} + {\left(t \cdot \left(\frac{1}{y \cdot z} + \frac{a}{y \cdot z}\right) + \frac{b}{z}\right)}^{-1}\\
\end{array}
\end{array}
if t < -1.45e29 or 8.99999999999999937e-114 < t Initial program 76.5%
associate-/l*83.6%
associate-/l*93.5%
Simplified93.5%
clear-num73.3%
un-div-inv73.3%
Applied egg-rr93.6%
if -1.45e29 < t < 8.99999999999999937e-114Initial program 70.4%
associate-/l*61.6%
associate-/l*54.4%
Simplified54.4%
Taylor expanded in x around 0 76.6%
clear-num76.5%
inv-pow76.5%
*-commutative76.5%
times-frac61.4%
associate-+r+61.4%
*-commutative61.4%
*-un-lft-identity61.4%
associate-*l/60.6%
+-commutative60.6%
associate-*l/61.4%
*-un-lft-identity61.4%
*-commutative61.4%
associate-/l*53.9%
fma-define53.9%
Applied egg-rr53.9%
Taylor expanded in t around 0 86.9%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0)))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 t_1)))
(if (<= t_3 (- INFINITY))
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_3 -5e-246)
t_3
(if (<= t_3 1e+303) (/ t_2 (+ (+ a 1.0) (* b (/ y t)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= -5e-246) {
tmp = t_3;
} else if (t_3 <= 1e+303) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_3 <= -5e-246) {
tmp = t_3;
} else if (t_3 <= 1e+303) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = x + ((y * z) / t) t_3 = t_2 / t_1 tmp = 0 if t_3 <= -math.inf: tmp = (x + (z * (y / t))) / t_1 elif t_3 <= -5e-246: tmp = t_3 elif t_3 <= 1e+303: tmp = t_2 / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_3 <= -5e-246) tmp = t_3; elseif (t_3 <= 1e+303) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = x + ((y * z) / t); t_3 = t_2 / t_1; tmp = 0.0; if (t_3 <= -Inf) tmp = (x + (z * (y / t))) / t_1; elseif (t_3 <= -5e-246) tmp = t_3; elseif (t_3 <= 1e+303) tmp = t_2 / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$3, -5e-246], t$95$3, If[LessEqual[t$95$3, 1e+303], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_3 \leq -5 \cdot 10^{-246}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 10^{+303}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\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 32.6%
*-commutative32.6%
associate-/l*80.7%
Applied egg-rr80.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999997e-246Initial program 99.6%
if -4.9999999999999997e-246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 83.9%
*-commutative83.9%
associate-/l*87.6%
Applied egg-rr87.6%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 11.0%
associate-/l*24.4%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in y around inf 71.6%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ t_1 (+ a 1.0))))
(t_4 (+ 1.0 (+ a t_1))))
(if (<= t_3 -1e-262)
(+ (/ x t_4) (/ (* y z) (* t t_4)))
(if (<= t_3 1e+303) (/ t_2 (+ (+ a 1.0) (* b (/ y t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / (t_1 + (a + 1.0));
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_3 <= -1e-262) {
tmp = (x / t_4) + ((y * z) / (t * t_4));
} else if (t_3 <= 1e+303) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (y * b) / t
t_2 = x + ((y * z) / t)
t_3 = t_2 / (t_1 + (a + 1.0d0))
t_4 = 1.0d0 + (a + t_1)
if (t_3 <= (-1d-262)) then
tmp = (x / t_4) + ((y * z) / (t * t_4))
else if (t_3 <= 1d+303) then
tmp = t_2 / ((a + 1.0d0) + (b * (y / t)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / (t_1 + (a + 1.0));
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_3 <= -1e-262) {
tmp = (x / t_4) + ((y * z) / (t * t_4));
} else if (t_3 <= 1e+303) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} 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_3 = t_2 / (t_1 + (a + 1.0)) t_4 = 1.0 + (a + t_1) tmp = 0 if t_3 <= -1e-262: tmp = (x / t_4) + ((y * z) / (t * t_4)) elif t_3 <= 1e+303: tmp = t_2 / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(t_1 + Float64(a + 1.0))) t_4 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_3 <= -1e-262) tmp = Float64(Float64(x / t_4) + Float64(Float64(y * z) / Float64(t * t_4))); elseif (t_3 <= 1e+303) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = x + ((y * z) / t); t_3 = t_2 / (t_1 + (a + 1.0)); t_4 = 1.0 + (a + t_1); tmp = 0.0; if (t_3 <= -1e-262) tmp = (x / t_4) + ((y * z) / (t * t_4)); elseif (t_3 <= 1e+303) tmp = t_2 / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-262], N[(N[(x / t$95$4), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+303], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1 + \left(a + 1\right)}\\
t_4 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_3 \leq -1 \cdot 10^{-262}:\\
\;\;\;\;\frac{x}{t\_4} + \frac{y \cdot z}{t \cdot t\_4}\\
\mathbf{elif}\;t\_3 \leq 10^{+303}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\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))) < -1.00000000000000001e-262Initial program 91.5%
associate-/l*89.1%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in x around 0 92.6%
if -1.00000000000000001e-262 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 83.7%
*-commutative83.7%
associate-/l*87.4%
Applied egg-rr87.4%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 11.0%
associate-/l*24.4%
associate-/l*37.5%
Simplified37.5%
Taylor expanded in y around inf 71.6%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= t -2.7e-18)
t_1
(if (<= t -8.4e-47)
(/ x (+ 1.0 (+ a (* b (/ y t)))))
(if (<= t -5.7e-56)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t -3.2e-106)
(/ z b)
(if (<= t 3.5e-159)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 3.4e-59) (/ x (+ 1.0 (+ a (/ (* y b) t)))) 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 <= -2.7e-18) {
tmp = t_1;
} else if (t <= -8.4e-47) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= -5.7e-56) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= -3.2e-106) {
tmp = z / b;
} else if (t <= 3.5e-159) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 3.4e-59) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
if (t <= (-2.7d-18)) then
tmp = t_1
else if (t <= (-8.4d-47)) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else if (t <= (-5.7d-56)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (t <= (-3.2d-106)) then
tmp = z / b
else if (t <= 3.5d-159) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 3.4d-59) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -2.7e-18) {
tmp = t_1;
} else if (t <= -8.4e-47) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= -5.7e-56) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= -3.2e-106) {
tmp = z / b;
} else if (t <= 3.5e-159) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 3.4e-59) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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 <= -2.7e-18: tmp = t_1 elif t <= -8.4e-47: tmp = x / (1.0 + (a + (b * (y / t)))) elif t <= -5.7e-56: tmp = (x + (y * (z / t))) / (a + 1.0) elif t <= -3.2e-106: tmp = z / b elif t <= 3.5e-159: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 3.4e-59: tmp = x / (1.0 + (a + ((y * b) / t))) 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 <= -2.7e-18) tmp = t_1; elseif (t <= -8.4e-47) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); elseif (t <= -5.7e-56) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t <= -3.2e-106) tmp = Float64(z / b); elseif (t <= 3.5e-159) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 3.4e-59) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); 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 <= -2.7e-18) tmp = t_1; elseif (t <= -8.4e-47) tmp = x / (1.0 + (a + (b * (y / t)))); elseif (t <= -5.7e-56) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (t <= -3.2e-106) tmp = z / b; elseif (t <= 3.5e-159) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 3.4e-59) tmp = x / (1.0 + (a + ((y * b) / t))); 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, -2.7e-18], t$95$1, If[LessEqual[t, -8.4e-47], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.7e-56], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-106], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.5e-159], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e-59], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.4 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t \leq -5.7 \cdot 10^{-56}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-159}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{-59}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.69999999999999989e-18 or 3.40000000000000018e-59 < t Initial program 74.2%
associate-/l*81.4%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around 0 73.2%
clear-num73.1%
un-div-inv73.2%
Applied egg-rr73.2%
if -2.69999999999999989e-18 < t < -8.4000000000000003e-47Initial program 99.3%
associate-/l*99.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 86.0%
associate-/l*86.3%
Applied egg-rr86.3%
if -8.4000000000000003e-47 < t < -5.6999999999999998e-56Initial program 100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
if -5.6999999999999998e-56 < t < -3.2e-106Initial program 63.6%
associate-/l*63.2%
associate-/l*51.3%
Simplified51.3%
Taylor expanded in y around inf 88.0%
if -3.2e-106 < t < 3.50000000000000002e-159Initial program 65.1%
associate-/l*53.9%
associate-/l*46.5%
Simplified46.5%
Taylor expanded in x around 0 56.8%
Taylor expanded in t around 0 75.7%
if 3.50000000000000002e-159 < t < 3.40000000000000018e-59Initial program 89.1%
associate-/l*81.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around inf 74.7%
Final simplification75.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0))))
(if (<= t -2.65e-18)
t_1
(if (<= t -1.12e-46)
(/ x (+ 1.0 (+ a (* b (/ y t)))))
(if (<= t -1.5e-56)
t_1
(if (<= t 1.38e-164)
(/ z b)
(if (<= t 2.25e-57) (/ x (+ 1.0 (+ a (/ (* y b) t)))) 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.65e-18) {
tmp = t_1;
} else if (t <= -1.12e-46) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= -1.5e-56) {
tmp = t_1;
} else if (t <= 1.38e-164) {
tmp = z / b;
} else if (t <= 2.25e-57) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / (a + 1.0d0)
if (t <= (-2.65d-18)) then
tmp = t_1
else if (t <= (-1.12d-46)) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else if (t <= (-1.5d-56)) then
tmp = t_1
else if (t <= 1.38d-164) then
tmp = z / b
else if (t <= 2.25d-57) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -2.65e-18) {
tmp = t_1;
} else if (t <= -1.12e-46) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= -1.5e-56) {
tmp = t_1;
} else if (t <= 1.38e-164) {
tmp = z / b;
} else if (t <= 2.25e-57) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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.65e-18: tmp = t_1 elif t <= -1.12e-46: tmp = x / (1.0 + (a + (b * (y / t)))) elif t <= -1.5e-56: tmp = t_1 elif t <= 1.38e-164: tmp = z / b elif t <= 2.25e-57: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.65e-18) tmp = t_1; elseif (t <= -1.12e-46) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); elseif (t <= -1.5e-56) tmp = t_1; elseif (t <= 1.38e-164) tmp = Float64(z / b); elseif (t <= 2.25e-57) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); 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.65e-18) tmp = t_1; elseif (t <= -1.12e-46) tmp = x / (1.0 + (a + (b * (y / t)))); elseif (t <= -1.5e-56) tmp = t_1; elseif (t <= 1.38e-164) tmp = z / b; elseif (t <= 2.25e-57) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e-18], t$95$1, If[LessEqual[t, -1.12e-46], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.5e-56], t$95$1, If[LessEqual[t, 1.38e-164], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.25e-57], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-46}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.38 \cdot 10^{-164}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.65000000000000015e-18 or -1.11999999999999997e-46 < t < -1.49999999999999995e-56 or 2.24999999999999986e-57 < t Initial program 74.8%
associate-/l*81.8%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in y around 0 73.7%
if -2.65000000000000015e-18 < t < -1.11999999999999997e-46Initial program 99.3%
associate-/l*99.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 86.0%
associate-/l*86.3%
Applied egg-rr86.3%
if -1.49999999999999995e-56 < t < 1.38000000000000003e-164Initial program 64.6%
associate-/l*55.4%
associate-/l*47.4%
Simplified47.4%
Taylor expanded in y around inf 62.5%
if 1.38000000000000003e-164 < t < 2.24999999999999986e-57Initial program 89.5%
associate-/l*79.1%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in x around inf 71.9%
Final simplification70.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= t -2.15e-17)
t_1
(if (<= t -1.92e-47)
(/ x (+ 1.0 (+ a (* b (/ y t)))))
(if (<= t -9.6e-57)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t 2.9e-168)
(/ z b)
(if (<= t 1.12e-55) (/ x (+ 1.0 (+ a (/ (* y b) t)))) 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 <= -2.15e-17) {
tmp = t_1;
} else if (t <= -1.92e-47) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= -9.6e-57) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= 2.9e-168) {
tmp = z / b;
} else if (t <= 1.12e-55) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / (a + 1.0d0)
if (t <= (-2.15d-17)) then
tmp = t_1
else if (t <= (-1.92d-47)) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else if (t <= (-9.6d-57)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (t <= 2.9d-168) then
tmp = z / b
else if (t <= 1.12d-55) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (t <= -2.15e-17) {
tmp = t_1;
} else if (t <= -1.92e-47) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else if (t <= -9.6e-57) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= 2.9e-168) {
tmp = z / b;
} else if (t <= 1.12e-55) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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 <= -2.15e-17: tmp = t_1 elif t <= -1.92e-47: tmp = x / (1.0 + (a + (b * (y / t)))) elif t <= -9.6e-57: tmp = (x + (y * (z / t))) / (a + 1.0) elif t <= 2.9e-168: tmp = z / b elif t <= 1.12e-55: tmp = x / (1.0 + (a + ((y * b) / t))) 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 <= -2.15e-17) tmp = t_1; elseif (t <= -1.92e-47) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); elseif (t <= -9.6e-57) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t <= 2.9e-168) tmp = Float64(z / b); elseif (t <= 1.12e-55) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); 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 <= -2.15e-17) tmp = t_1; elseif (t <= -1.92e-47) tmp = x / (1.0 + (a + (b * (y / t)))); elseif (t <= -9.6e-57) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (t <= 2.9e-168) tmp = z / b; elseif (t <= 1.12e-55) tmp = x / (1.0 + (a + ((y * b) / t))); 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, -2.15e-17], t$95$1, If[LessEqual[t, -1.92e-47], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.6e-57], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e-168], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.12e-55], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;t \leq -2.15 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.92 \cdot 10^{-47}:\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-57}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-168}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.15000000000000012e-17 or 1.11999999999999997e-55 < t Initial program 74.2%
associate-/l*81.4%
associate-/l*92.0%
Simplified92.0%
Taylor expanded in y around 0 73.2%
clear-num73.1%
un-div-inv73.2%
Applied egg-rr73.2%
if -2.15000000000000012e-17 < t < -1.92e-47Initial program 99.3%
associate-/l*99.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 86.0%
associate-/l*86.3%
Applied egg-rr86.3%
if -1.92e-47 < t < -9.60000000000000025e-57Initial program 100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
if -9.60000000000000025e-57 < t < 2.8999999999999998e-168Initial program 64.6%
associate-/l*55.4%
associate-/l*47.4%
Simplified47.4%
Taylor expanded in y around inf 62.5%
if 2.8999999999999998e-168 < t < 1.11999999999999997e-55Initial program 89.5%
associate-/l*79.1%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in x around inf 71.9%
Final simplification70.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x (+ a 1.0)) (* y (/ (/ z t) (+ a 1.0))))))
(if (<= t -8.5e-56)
t_1
(if (<= t 1.45e-160)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 3.8e-64) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a + 1.0)) + (y * ((z / t) / (a + 1.0)));
double tmp;
if (t <= -8.5e-56) {
tmp = t_1;
} else if (t <= 1.45e-160) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 3.8e-64) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x / (a + 1.0d0)) + (y * ((z / t) / (a + 1.0d0)))
if (t <= (-8.5d-56)) then
tmp = t_1
else if (t <= 1.45d-160) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 3.8d-64) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / (a + 1.0)) + (y * ((z / t) / (a + 1.0)));
double tmp;
if (t <= -8.5e-56) {
tmp = t_1;
} else if (t <= 1.45e-160) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 3.8e-64) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / (a + 1.0)) + (y * ((z / t) / (a + 1.0))) tmp = 0 if t <= -8.5e-56: tmp = t_1 elif t <= 1.45e-160: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 3.8e-64: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / Float64(a + 1.0)) + Float64(y * Float64(Float64(z / t) / Float64(a + 1.0)))) tmp = 0.0 if (t <= -8.5e-56) tmp = t_1; elseif (t <= 1.45e-160) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 3.8e-64) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / (a + 1.0)) + (y * ((z / t) / (a + 1.0))); tmp = 0.0; if (t <= -8.5e-56) tmp = t_1; elseif (t <= 1.45e-160) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 3.8e-64) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(z / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e-56], t$95$1, If[LessEqual[t, 1.45e-160], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-64], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1} + y \cdot \frac{\frac{z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-160}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.49999999999999932e-56 or 3.8000000000000002e-64 < t Initial program 75.9%
associate-/l*82.6%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in y around 0 71.1%
Taylor expanded in x around 0 64.1%
+-commutative64.1%
associate-/l*69.0%
associate-/r*73.0%
Simplified73.0%
if -8.49999999999999932e-56 < t < 1.45e-160Initial program 65.0%
associate-/l*54.8%
associate-/l*46.9%
Simplified46.9%
Taylor expanded in x around 0 57.5%
Taylor expanded in t around 0 74.6%
if 1.45e-160 < t < 3.8000000000000002e-64Initial program 89.1%
associate-/l*81.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around inf 74.7%
Final simplification73.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.9e-12)
(+ t_1 (* z (/ (/ y t) (+ a 1.0))))
(if (<= t 9.6e-155)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 2e-62)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(+ t_1 (* y (/ (/ z t) (+ a 1.0)))))))))
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.9e-12) {
tmp = t_1 + (z * ((y / t) / (a + 1.0)));
} else if (t <= 9.6e-155) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2e-62) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1 + (y * ((z / t) / (a + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-3.9d-12)) then
tmp = t_1 + (z * ((y / t) / (a + 1.0d0)))
else if (t <= 9.6d-155) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 2d-62) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = t_1 + (y * ((z / t) / (a + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3.9e-12) {
tmp = t_1 + (z * ((y / t) / (a + 1.0)));
} else if (t <= 9.6e-155) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2e-62) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1 + (y * ((z / t) / (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -3.9e-12: tmp = t_1 + (z * ((y / t) / (a + 1.0))) elif t <= 9.6e-155: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 2e-62: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 + (y * ((z / t) / (a + 1.0))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -3.9e-12) tmp = Float64(t_1 + Float64(z * Float64(Float64(y / t) / Float64(a + 1.0)))); elseif (t <= 9.6e-155) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 2e-62) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(t_1 + Float64(y * Float64(Float64(z / t) / Float64(a + 1.0)))); 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.9e-12) tmp = t_1 + (z * ((y / t) / (a + 1.0))); elseif (t <= 9.6e-155) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 2e-62) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = t_1 + (y * ((z / t) / (a + 1.0))); 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.9e-12], N[(t$95$1 + N[(z * N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e-155], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-62], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * N[(N[(z / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{-12}:\\
\;\;\;\;t\_1 + z \cdot \frac{\frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-155}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-62}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 + y \cdot \frac{\frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -3.89999999999999994e-12Initial program 65.9%
associate-/l*73.4%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in y around 0 69.3%
Taylor expanded in x around 0 58.3%
associate-/l*66.1%
Applied egg-rr66.1%
associate-*r/58.3%
*-commutative58.3%
associate-*r/65.7%
associate-/r*71.6%
Simplified71.6%
if -3.89999999999999994e-12 < t < 9.600000000000001e-155Initial program 69.6%
associate-/l*60.8%
associate-/l*54.0%
Simplified54.0%
Taylor expanded in x around 0 57.4%
Taylor expanded in t around 0 72.2%
if 9.600000000000001e-155 < t < 2.0000000000000001e-62Initial program 89.1%
associate-/l*81.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around inf 74.7%
if 2.0000000000000001e-62 < t Initial program 81.3%
associate-/l*88.4%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in y around 0 77.0%
Taylor expanded in x around 0 72.5%
+-commutative72.5%
associate-/l*74.1%
associate-/r*78.4%
Simplified78.4%
Final simplification73.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.2e-165) (not (<= t 4.8e-115))) (/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.2e-165) || !(t <= 4.8e-115)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (y * z) / ((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) :: tmp
if ((t <= (-5.2d-165)) .or. (.not. (t <= 4.8d-115))) then
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
else
tmp = (y * z) / ((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 tmp;
if ((t <= -5.2e-165) || !(t <= 4.8e-115)) {
tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.2e-165) or not (t <= 4.8e-115): tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.2e-165) || !(t <= 4.8e-115)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.2e-165) || ~((t <= 4.8e-115))) tmp = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0)); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.2e-165], N[Not[LessEqual[t, 4.8e-115]], $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[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-165} \lor \neg \left(t \leq 4.8 \cdot 10^{-115}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -5.20000000000000015e-165 or 4.80000000000000042e-115 < t Initial program 78.4%
associate-/l*82.7%
associate-/l*89.6%
Simplified89.6%
if -5.20000000000000015e-165 < t < 4.80000000000000042e-115Initial program 62.4%
associate-/l*51.0%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in x around 0 52.3%
Taylor expanded in t around 0 73.9%
Final simplification85.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6e-168) (not (<= t 1.2e-114))) (/ (+ x (/ y (/ t z))) (+ (* y (/ b t)) (+ a 1.0))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6e-168) || !(t <= 1.2e-114)) {
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (y * z) / ((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) :: tmp
if ((t <= (-6d-168)) .or. (.not. (t <= 1.2d-114))) then
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0d0))
else
tmp = (y * z) / ((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 tmp;
if ((t <= -6e-168) || !(t <= 1.2e-114)) {
tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6e-168) or not (t <= 1.2e-114): tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0)) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6e-168) || !(t <= 1.2e-114)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(y * Float64(b / t)) + Float64(a + 1.0))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -6e-168) || ~((t <= 1.2e-114))) tmp = (x + (y / (t / z))) / ((y * (b / t)) + (a + 1.0)); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -6e-168], N[Not[LessEqual[t, 1.2e-114]], $MachinePrecision]], 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], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-168} \lor \neg \left(t \leq 1.2 \cdot 10^{-114}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -5.99999999999999983e-168 or 1.2000000000000001e-114 < t Initial program 78.4%
associate-/l*82.7%
associate-/l*89.6%
Simplified89.6%
clear-num66.1%
un-div-inv66.1%
Applied egg-rr89.8%
if -5.99999999999999983e-168 < t < 1.2000000000000001e-114Initial program 62.4%
associate-/l*51.0%
associate-/l*40.9%
Simplified40.9%
Taylor expanded in x around 0 52.3%
Taylor expanded in t around 0 73.9%
Final simplification85.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.05e+41) (not (<= t 8.2e-166))) (+ (* z (/ y t)) (/ x (+ a 1.0))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.05e+41) || !(t <= 8.2e-166)) {
tmp = (z * (y / t)) + (x / (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.05d+41)) .or. (.not. (t <= 8.2d-166))) then
tmp = (z * (y / t)) + (x / (a + 1.0d0))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.05e+41) || !(t <= 8.2e-166)) {
tmp = (z * (y / t)) + (x / (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.05e+41) or not (t <= 8.2e-166): tmp = (z * (y / t)) + (x / (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.05e+41) || !(t <= 8.2e-166)) tmp = Float64(Float64(z * Float64(y / t)) + Float64(x / Float64(a + 1.0))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.05e+41) || ~((t <= 8.2e-166))) tmp = (z * (y / t)) + (x / (a + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.05e+41], N[Not[LessEqual[t, 8.2e-166]], $MachinePrecision]], N[(N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+41} \lor \neg \left(t \leq 8.2 \cdot 10^{-166}\right):\\
\;\;\;\;z \cdot \frac{y}{t} + \frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.05e41 or 8.1999999999999995e-166 < t Initial program 76.2%
associate-/l*81.1%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in y around 0 69.9%
Taylor expanded in x around 0 64.6%
Taylor expanded in a around 0 54.8%
*-commutative54.8%
associate-/l*58.1%
Simplified58.1%
if -1.05e41 < t < 8.1999999999999995e-166Initial program 70.5%
associate-/l*63.7%
associate-/l*57.8%
Simplified57.8%
Taylor expanded in y around inf 55.7%
Final simplification57.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.8e-56) (not (<= t 4.3e-172))) (/ 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-56) || !(t <= 4.3e-172)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.8d-56)) .or. (.not. (t <= 4.3d-172))) then
tmp = x / (1.0d0 + (a + (b * (y / t))))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.8e-56) || !(t <= 4.3e-172)) {
tmp = x / (1.0 + (a + (b * (y / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.8e-56) or not (t <= 4.3e-172): tmp = x / (1.0 + (a + (b * (y / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.8e-56) || !(t <= 4.3e-172)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.8e-56) || ~((t <= 4.3e-172))) tmp = x / (1.0 + (a + (b * (y / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.8e-56], N[Not[LessEqual[t, 4.3e-172]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-56} \lor \neg \left(t \leq 4.3 \cdot 10^{-172}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.79999999999999993e-56 or 4.2999999999999997e-172 < t Initial program 78.1%
associate-/l*82.1%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in x around inf 61.4%
associate-/l*64.2%
Applied egg-rr64.2%
if -2.79999999999999993e-56 < t < 4.2999999999999997e-172Initial program 64.6%
associate-/l*55.4%
associate-/l*47.4%
Simplified47.4%
Taylor expanded in y around inf 62.5%
Final simplification63.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -4.5e-107) (/ z b) (if (<= y 4.2e-210) x (if (<= y 4.2e-101) (/ x a) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -4.5e-107) {
tmp = z / b;
} else if (y <= 4.2e-210) {
tmp = x;
} else if (y <= 4.2e-101) {
tmp = x / a;
} 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 <= (-4.5d-107)) then
tmp = z / b
else if (y <= 4.2d-210) then
tmp = x
else if (y <= 4.2d-101) then
tmp = x / a
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 <= -4.5e-107) {
tmp = z / b;
} else if (y <= 4.2e-210) {
tmp = x;
} else if (y <= 4.2e-101) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -4.5e-107: tmp = z / b elif y <= 4.2e-210: tmp = x elif y <= 4.2e-101: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -4.5e-107) tmp = Float64(z / b); elseif (y <= 4.2e-210) tmp = x; elseif (y <= 4.2e-101) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -4.5e-107) tmp = z / b; elseif (y <= 4.2e-210) tmp = x; elseif (y <= 4.2e-101) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -4.5e-107], N[(z / b), $MachinePrecision], If[LessEqual[y, 4.2e-210], x, If[LessEqual[y, 4.2e-101], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-210}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-101}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.50000000000000016e-107 or 4.20000000000000031e-101 < y Initial program 59.9%
associate-/l*64.8%
associate-/l*71.9%
Simplified71.9%
Taylor expanded in y around inf 50.3%
if -4.50000000000000016e-107 < y < 4.20000000000000032e-210Initial program 97.0%
associate-/l*90.7%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in a around 0 54.0%
Taylor expanded in y around 0 45.5%
if 4.20000000000000032e-210 < y < 4.20000000000000031e-101Initial program 99.7%
associate-/l*84.4%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in x around inf 62.7%
Taylor expanded in a around inf 41.1%
Final simplification48.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.3e-56) (not (<= t 1.38e-164))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.3e-56) || !(t <= 1.38e-164)) {
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 <= (-3.3d-56)) .or. (.not. (t <= 1.38d-164))) 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 <= -3.3e-56) || !(t <= 1.38e-164)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.3e-56) or not (t <= 1.38e-164): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.3e-56) || !(t <= 1.38e-164)) 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 <= -3.3e-56) || ~((t <= 1.38e-164))) 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, -3.3e-56], N[Not[LessEqual[t, 1.38e-164]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.3 \cdot 10^{-56} \lor \neg \left(t \leq 1.38 \cdot 10^{-164}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.29999999999999984e-56 or 1.38000000000000003e-164 < t Initial program 78.1%
associate-/l*82.1%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in y around 0 53.6%
if -3.29999999999999984e-56 < t < 1.38000000000000003e-164Initial program 64.6%
associate-/l*55.4%
associate-/l*47.4%
Simplified47.4%
Taylor expanded in y around inf 62.5%
Final simplification56.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.65) (not (<= a 6.2e-16))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.65) || !(a <= 6.2e-16)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.65d0)) .or. (.not. (a <= 6.2d-16))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.65) || !(a <= 6.2e-16)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.65) or not (a <= 6.2e-16): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.65) || !(a <= 6.2e-16)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.65) || ~((a <= 6.2e-16))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.65], N[Not[LessEqual[a, 6.2e-16]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \lor \neg \left(a \leq 6.2 \cdot 10^{-16}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.6499999999999999 or 6.2000000000000002e-16 < a Initial program 67.2%
associate-/l*67.2%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in x around inf 44.2%
Taylor expanded in a around inf 36.7%
if -1.6499999999999999 < a < 6.2000000000000002e-16Initial program 82.6%
associate-/l*81.9%
associate-/l*82.9%
Simplified82.9%
Taylor expanded in a around 0 80.9%
Taylor expanded in y around 0 43.0%
Final simplification39.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 73.7%
associate-/l*73.4%
associate-/l*75.3%
Simplified75.3%
Taylor expanded in a around 0 47.1%
Taylor expanded in y around 0 20.4%
Final simplification20.4%
(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 2024043
(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))))