
(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 11 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)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))
(if (<= t_1 1e+300) t_1 (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else if (t_1 <= 1e+300) {
tmp = t_1;
} 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 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else if (t_1 <= 1e+300) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t)))) elif t_1 <= 1e+300: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))))); elseif (t_1 <= 1e+300) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t)))); elseif (t_1 <= 1e+300) tmp = t_1; else tmp = 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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+300], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_1 \leq 10^{+300}:\\
\;\;\;\;t\_1\\
\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 20.3%
associate-/l*49.6%
associate-/l*49.2%
Simplified49.2%
Taylor expanded in x around 0 55.3%
times-frac77.8%
associate-+r+77.8%
associate-*r/76.6%
Simplified76.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e300Initial program 90.9%
if 1.0000000000000001e300 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 16.2%
associate-/l*19.2%
associate-/l*24.8%
Simplified24.8%
Taylor expanded in y around inf 85.9%
Final simplification89.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)))
(if (<= a -1.9e-27)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= a 1.95e-24)
(/ (+ x (/ (* y z) t)) (+ 1.0 t_1))
(if (<= a 1.35e+110)
(+ (/ x (+ a 1.0)) (* y (/ z (* t a))))
(if (<= a 1.6e+133)
(/ (* y z) (* t (+ 1.0 (+ a t_1))))
(+ (/ x a) (* z (/ (/ y t) a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double tmp;
if (a <= -1.9e-27) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (a <= 1.95e-24) {
tmp = (x + ((y * z) / t)) / (1.0 + t_1);
} else if (a <= 1.35e+110) {
tmp = (x / (a + 1.0)) + (y * (z / (t * a)));
} else if (a <= 1.6e+133) {
tmp = (y * z) / (t * (1.0 + (a + t_1)));
} else {
tmp = (x / a) + (z * ((y / t) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * b) / t
if (a <= (-1.9d-27)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (a <= 1.95d-24) then
tmp = (x + ((y * z) / t)) / (1.0d0 + t_1)
else if (a <= 1.35d+110) then
tmp = (x / (a + 1.0d0)) + (y * (z / (t * a)))
else if (a <= 1.6d+133) then
tmp = (y * z) / (t * (1.0d0 + (a + t_1)))
else
tmp = (x / a) + (z * ((y / t) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double tmp;
if (a <= -1.9e-27) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (a <= 1.95e-24) {
tmp = (x + ((y * z) / t)) / (1.0 + t_1);
} else if (a <= 1.35e+110) {
tmp = (x / (a + 1.0)) + (y * (z / (t * a)));
} else if (a <= 1.6e+133) {
tmp = (y * z) / (t * (1.0 + (a + t_1)));
} else {
tmp = (x / a) + (z * ((y / t) / a));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t tmp = 0 if a <= -1.9e-27: tmp = (x + (z * (y / t))) / (a + 1.0) elif a <= 1.95e-24: tmp = (x + ((y * z) / t)) / (1.0 + t_1) elif a <= 1.35e+110: tmp = (x / (a + 1.0)) + (y * (z / (t * a))) elif a <= 1.6e+133: tmp = (y * z) / (t * (1.0 + (a + t_1))) else: tmp = (x / a) + (z * ((y / t) / a)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) tmp = 0.0 if (a <= -1.9e-27) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (a <= 1.95e-24) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + t_1)); elseif (a <= 1.35e+110) tmp = Float64(Float64(x / Float64(a + 1.0)) + Float64(y * Float64(z / Float64(t * a)))); elseif (a <= 1.6e+133) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + t_1)))); else tmp = Float64(Float64(x / a) + Float64(z * Float64(Float64(y / t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; tmp = 0.0; if (a <= -1.9e-27) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (a <= 1.95e-24) tmp = (x + ((y * z) / t)) / (1.0 + t_1); elseif (a <= 1.35e+110) tmp = (x / (a + 1.0)) + (y * (z / (t * a))); elseif (a <= 1.6e+133) tmp = (y * z) / (t * (1.0 + (a + t_1))); else tmp = (x / a) + (z * ((y / t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[a, -1.9e-27], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e-24], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+110], N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.6e+133], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / a), $MachinePrecision] + N[(z * N[(N[(y / t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
\mathbf{if}\;a \leq -1.9 \cdot 10^{-27}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-24}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + t\_1}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+110}:\\
\;\;\;\;\frac{x}{a + 1} + y \cdot \frac{z}{t \cdot a}\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+133}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a} + z \cdot \frac{\frac{y}{t}}{a}\\
\end{array}
\end{array}
if a < -1.9e-27Initial program 78.0%
associate-/l*74.7%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in b around 0 66.2%
*-commutative66.2%
associate-/l*70.0%
Applied egg-rr70.0%
if -1.9e-27 < a < 1.95e-24Initial program 77.0%
associate-/l*72.0%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in a around 0 77.0%
if 1.95e-24 < a < 1.35000000000000005e110Initial program 70.0%
associate-/l*70.2%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in x around 0 78.7%
Taylor expanded in a around inf 67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in b around 0 67.9%
associate-/l*70.8%
*-commutative70.8%
Simplified70.8%
if 1.35000000000000005e110 < a < 1.59999999999999999e133Initial program 63.5%
associate-/l*39.6%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in x around 0 76.0%
if 1.59999999999999999e133 < a Initial program 87.1%
associate-/l*84.4%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in x around 0 85.0%
Taylor expanded in a around inf 78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in a around inf 77.1%
associate-/r*79.3%
*-commutative79.3%
associate-*r/81.9%
*-un-lft-identity81.9%
times-frac84.3%
Applied egg-rr84.3%
Final simplification75.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* b (/ y t)))))
(if (<= z -2.8e+76)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= z -6.6e+44)
(/ z b)
(if (<= z 1.56e+31) (/ x t_1) (* (/ y t) (/ z t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double tmp;
if (z <= -2.8e+76) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (z <= -6.6e+44) {
tmp = z / b;
} else if (z <= 1.56e+31) {
tmp = x / t_1;
} else {
tmp = (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 = (a + 1.0d0) + (b * (y / t))
if (z <= (-2.8d+76)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (z <= (-6.6d+44)) then
tmp = z / b
else if (z <= 1.56d+31) then
tmp = x / t_1
else
tmp = (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 = (a + 1.0) + (b * (y / t));
double tmp;
if (z <= -2.8e+76) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (z <= -6.6e+44) {
tmp = z / b;
} else if (z <= 1.56e+31) {
tmp = x / t_1;
} else {
tmp = (y / t) * (z / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (b * (y / t)) tmp = 0 if z <= -2.8e+76: tmp = (x + (z * (y / t))) / (a + 1.0) elif z <= -6.6e+44: tmp = z / b elif z <= 1.56e+31: tmp = x / t_1 else: tmp = (y / t) * (z / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))) tmp = 0.0 if (z <= -2.8e+76) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (z <= -6.6e+44) tmp = Float64(z / b); elseif (z <= 1.56e+31) tmp = Float64(x / t_1); else tmp = Float64(Float64(y / t) * Float64(z / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (b * (y / t)); tmp = 0.0; if (z <= -2.8e+76) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (z <= -6.6e+44) tmp = z / b; elseif (z <= 1.56e+31) tmp = x / t_1; else tmp = (y / t) * (z / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+76], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.6e+44], N[(z / b), $MachinePrecision], If[LessEqual[z, 1.56e+31], N[(x / t$95$1), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + b \cdot \frac{y}{t}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+76}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;z \leq -6.6 \cdot 10^{+44}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{+31}:\\
\;\;\;\;\frac{x}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_1}\\
\end{array}
\end{array}
if z < -2.7999999999999999e76Initial program 76.6%
associate-/l*60.0%
associate-/l*59.9%
Simplified59.9%
Taylor expanded in b around 0 66.2%
*-commutative66.2%
associate-/l*68.3%
Applied egg-rr68.3%
if -2.7999999999999999e76 < z < -6.60000000000000027e44Initial program 41.9%
associate-/l*32.3%
associate-/l*32.1%
Simplified32.1%
Taylor expanded in y around inf 81.0%
if -6.60000000000000027e44 < z < 1.56000000000000004e31Initial program 84.0%
associate-/l*83.9%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in x around inf 74.1%
associate-+r+74.1%
associate-*r/75.6%
Simplified75.6%
if 1.56000000000000004e31 < z Initial program 68.0%
associate-/l*64.7%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in x around 0 61.2%
times-frac66.2%
associate-+r+66.2%
associate-*r/62.7%
Simplified62.7%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.38e-155) (not (<= t 7e-134))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.38e-155) || !(t <= 7e-134)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.38d-155)) .or. (.not. (t <= 7d-134))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.38e-155) || !(t <= 7e-134)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.38e-155) or not (t <= 7e-134): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.38e-155) || !(t <= 7e-134)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.38e-155) || ~((t <= 7e-134))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.38e-155], N[Not[LessEqual[t, 7e-134]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.38 \cdot 10^{-155} \lor \neg \left(t \leq 7 \cdot 10^{-134}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.38000000000000007e-155 or 6.9999999999999997e-134 < t Initial program 84.2%
associate-/l*84.7%
associate-/l*88.4%
Simplified88.4%
if -1.38000000000000007e-155 < t < 6.9999999999999997e-134Initial program 60.8%
associate-/l*44.9%
associate-/l*36.8%
Simplified36.8%
Taylor expanded in y around inf 58.7%
Final simplification79.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1e+151)
(/ z b)
(if (<= y 1e-57)
(/ (+ x (* z (/ y t))) (+ (+ a 1.0) (/ (* y b) t)))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1e+151) {
tmp = z / b;
} else if (y <= 1e-57) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} else {
tmp = (x + (y * (z / t))) / ((a + 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 (y <= (-1d+151)) then
tmp = z / b
else if (y <= 1d-57) then
tmp = (x + (z * (y / t))) / ((a + 1.0d0) + ((y * b) / t))
else
tmp = (x + (y * (z / t))) / ((a + 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 (y <= -1e+151) {
tmp = z / b;
} else if (y <= 1e-57) {
tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1e+151: tmp = z / b elif y <= 1e-57: tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1e+151) tmp = Float64(z / b); elseif (y <= 1e-57) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1e+151) tmp = z / b; elseif (y <= 1e-57) tmp = (x + (z * (y / t))) / ((a + 1.0) + ((y * b) / t)); else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1e+151], N[(z / b), $MachinePrecision], If[LessEqual[y, 1e-57], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+151}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 10^{-57}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if y < -1.00000000000000002e151Initial program 49.7%
associate-/l*50.0%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around inf 72.4%
if -1.00000000000000002e151 < y < 9.99999999999999955e-58Initial program 89.5%
*-commutative71.1%
associate-/l*69.3%
Applied egg-rr88.4%
if 9.99999999999999955e-58 < y Initial program 61.5%
associate-/l*67.8%
associate-/l*73.1%
Simplified73.1%
Final simplification82.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -3.7e+25)
(and (not (<= a 2.15e+27))
(or (<= a 2.75e+109) (not (<= a 4.5e+133)))))
(/ x a)
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.7e+25) || (!(a <= 2.15e+27) && ((a <= 2.75e+109) || !(a <= 4.5e+133)))) {
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 ((a <= (-3.7d+25)) .or. (.not. (a <= 2.15d+27)) .and. (a <= 2.75d+109) .or. (.not. (a <= 4.5d+133))) 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 ((a <= -3.7e+25) || (!(a <= 2.15e+27) && ((a <= 2.75e+109) || !(a <= 4.5e+133)))) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.7e+25) or (not (a <= 2.15e+27) and ((a <= 2.75e+109) or not (a <= 4.5e+133))): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.7e+25) || (!(a <= 2.15e+27) && ((a <= 2.75e+109) || !(a <= 4.5e+133)))) 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 ((a <= -3.7e+25) || (~((a <= 2.15e+27)) && ((a <= 2.75e+109) || ~((a <= 4.5e+133))))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.7e+25], And[N[Not[LessEqual[a, 2.15e+27]], $MachinePrecision], Or[LessEqual[a, 2.75e+109], N[Not[LessEqual[a, 4.5e+133]], $MachinePrecision]]]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+25} \lor \neg \left(a \leq 2.15 \cdot 10^{+27}\right) \land \left(a \leq 2.75 \cdot 10^{+109} \lor \neg \left(a \leq 4.5 \cdot 10^{+133}\right)\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -3.6999999999999999e25 or 2.15000000000000004e27 < a < 2.7499999999999999e109 or 4.49999999999999985e133 < a Initial program 81.8%
associate-/l*78.3%
associate-/l*77.4%
Simplified77.4%
Taylor expanded in x around inf 63.5%
associate-+r+63.5%
associate-*r/65.2%
Simplified65.2%
Taylor expanded in a around inf 60.9%
if -3.6999999999999999e25 < a < 2.15000000000000004e27 or 2.7499999999999999e109 < a < 4.49999999999999985e133Initial program 73.8%
associate-/l*69.1%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in y around inf 48.0%
Final simplification53.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.2e+47) (not (<= y 0.0152))) (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.2e+47) || !(y <= 0.0152)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((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 ((y <= (-8.2d+47)) .or. (.not. (y <= 0.0152d0))) then
tmp = z / b
else
tmp = x / (1.0d0 + (a + ((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 ((y <= -8.2e+47) || !(y <= 0.0152)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.2e+47) or not (y <= 0.0152): tmp = z / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.2e+47) || !(y <= 0.0152)) tmp = Float64(z / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.2e+47) || ~((y <= 0.0152))) tmp = z / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.2e+47], N[Not[LessEqual[y, 0.0152]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+47} \lor \neg \left(y \leq 0.0152\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -8.2000000000000002e47 or 0.0152 < y Initial program 54.8%
associate-/l*58.7%
associate-/l*66.3%
Simplified66.3%
Taylor expanded in y around inf 58.9%
if -8.2000000000000002e47 < y < 0.0152Initial program 92.0%
associate-/l*82.5%
associate-/l*78.1%
Simplified78.1%
Taylor expanded in x around inf 69.3%
Final simplification65.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.4e+100) (not (<= y 6.1e+62))) (/ z b) (/ (+ x (* z (/ y t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e+100) || !(y <= 6.1e+62)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / 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 ((y <= (-5.4d+100)) .or. (.not. (y <= 6.1d+62))) then
tmp = z / b
else
tmp = (x + (z * (y / 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 ((y <= -5.4e+100) || !(y <= 6.1e+62)) {
tmp = z / b;
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.4e+100) or not (y <= 6.1e+62): tmp = z / b else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.4e+100) || !(y <= 6.1e+62)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.4e+100) || ~((y <= 6.1e+62))) tmp = z / b; else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.4e+100], N[Not[LessEqual[y, 6.1e+62]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+100} \lor \neg \left(y \leq 6.1 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -5.39999999999999997e100 or 6.0999999999999997e62 < y Initial program 53.1%
associate-/l*56.8%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in y around inf 62.9%
if -5.39999999999999997e100 < y < 6.0999999999999997e62Initial program 88.9%
associate-/l*81.0%
associate-/l*77.5%
Simplified77.5%
Taylor expanded in b around 0 72.8%
*-commutative72.8%
associate-/l*72.1%
Applied egg-rr72.1%
Final simplification69.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.55e+97) (not (<= y 0.023))) (/ z b) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.55e+97) || !(y <= 0.023)) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.55d+97)) .or. (.not. (y <= 0.023d0))) then
tmp = z / b
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.55e+97) || !(y <= 0.023)) {
tmp = z / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.55e+97) or not (y <= 0.023): tmp = z / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.55e+97) || !(y <= 0.023)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.55e+97) || ~((y <= 0.023))) tmp = z / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.55e+97], N[Not[LessEqual[y, 0.023]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+97} \lor \neg \left(y \leq 0.023\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.54999999999999991e97 or 0.023 < y Initial program 53.9%
associate-/l*58.3%
associate-/l*65.7%
Simplified65.7%
Taylor expanded in y around inf 61.9%
if -1.54999999999999991e97 < y < 0.023Initial program 90.2%
associate-/l*81.3%
associate-/l*77.7%
Simplified77.7%
Taylor expanded in b around 0 74.4%
Final simplification70.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.6e+33) (not (<= y 0.018))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e+33) || !(y <= 0.018)) {
tmp = z / b;
} else {
tmp = x / (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 ((y <= (-3.6d+33)) .or. (.not. (y <= 0.018d0))) then
tmp = z / b
else
tmp = x / (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 ((y <= -3.6e+33) || !(y <= 0.018)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e+33) or not (y <= 0.018): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e+33) || !(y <= 0.018)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e+33) || ~((y <= 0.018))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e+33], N[Not[LessEqual[y, 0.018]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+33} \lor \neg \left(y \leq 0.018\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -3.6000000000000003e33 or 0.0179999999999999986 < y Initial program 55.2%
associate-/l*59.0%
associate-/l*66.4%
Simplified66.4%
Taylor expanded in y around inf 58.3%
if -3.6000000000000003e33 < y < 0.0179999999999999986Initial program 92.4%
associate-/l*82.8%
associate-/l*78.3%
Simplified78.3%
Taylor expanded in y around 0 62.8%
Final simplification61.0%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 77.4%
associate-/l*73.2%
associate-/l*73.5%
Simplified73.5%
Taylor expanded in x around inf 52.1%
associate-+r+52.1%
associate-*r/53.3%
Simplified53.3%
Taylor expanded in a around inf 30.2%
Final simplification30.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024039
(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))))