
(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 15 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))))
(t_2
(+
(* y (/ (/ z t) (+ 1.0 (fma y (/ b t) a))))
(/ x (+ (+ a 1.0) (* y (/ b t)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 5e+299) t_1 (if (<= t_1 INFINITY) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (y * ((z / t) / (1.0 + fma(y, (b / t), a)))) + (x / ((a + 1.0) + (y * (b / t))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= 5e+299) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} 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))) t_2 = Float64(Float64(y * Float64(Float64(z / t) / Float64(1.0 + fma(y, Float64(b / t), a)))) + Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= 5e+299) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(z / t), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, 5e+299], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, 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}}\\
t_2 := y \cdot \frac{\frac{z}{t}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} + \frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 5.0000000000000003e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 23.0%
*-commutative23.0%
associate-*l/65.2%
*-commutative65.2%
associate-*l/65.2%
Simplified65.2%
Taylor expanded in x around 0 39.4%
+-commutative39.4%
associate-/r*23.0%
associate-*r/65.2%
associate-+r+65.2%
associate-*l/65.2%
*-commutative65.2%
associate-+r+65.2%
associate-*l/65.2%
*-commutative65.2%
Simplified65.2%
Taylor expanded in z around 0 39.4%
*-commutative39.4%
+-commutative39.4%
+-commutative39.4%
*-commutative39.4%
associate-*r/39.4%
associate-+r+39.4%
+-commutative39.4%
fma-udef39.4%
associate-*r/82.4%
associate-/l/82.7%
fma-udef82.7%
associate-+r+82.7%
+-commutative82.7%
associate-+r+82.7%
fma-def82.7%
Simplified82.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e299Initial program 91.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-*l/0.2%
*-commutative0.2%
associate-*l/7.5%
Simplified7.5%
Taylor expanded in t around 0 100.0%
Final simplification91.8%
(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 -2e+175)
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t_1 5e+299) 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 <= -2e+175) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= 5e+299) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
if (t_1 <= (-2d+175)) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / b))))
else if (t_1 <= 5d+299) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -2e+175) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= 5e+299) {
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 <= -2e+175: tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) elif t_1 <= 5e+299: 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 <= -2e+175) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t_1 <= 5e+299) 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 <= -2e+175) tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); elseif (t_1 <= 5e+299) 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, -2e+175], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+299], 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 -2 \cdot 10^{+175}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;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))) < -1.9999999999999999e175Initial program 54.7%
associate-/l*83.4%
associate-+l+83.4%
associate-/l*83.4%
Simplified83.4%
associate-/r/88.7%
Applied egg-rr88.7%
if -1.9999999999999999e175 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e299Initial program 91.6%
if 5.0000000000000003e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 8.8%
*-commutative8.8%
associate-*l/21.7%
*-commutative21.7%
associate-*l/26.2%
Simplified26.2%
Taylor expanded in t around 0 78.1%
Final simplification89.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ (+ z (/ t (/ y x))) b)))
(if (<= y -4.5e+23)
t_2
(if (<= y 1.35e-43)
(/ t_1 (+ a 1.0))
(if (<= y 2.6e+95)
(/ t_1 (+ 1.0 (/ (* y b) t)))
(if (<= y 2.2e+123)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 3e+145) (/ (* y z) (* t a)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -4.5e+23) {
tmp = t_2;
} else if (y <= 1.35e-43) {
tmp = t_1 / (a + 1.0);
} else if (y <= 2.6e+95) {
tmp = t_1 / (1.0 + ((y * b) / t));
} else if (y <= 2.2e+123) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 3e+145) {
tmp = (y * z) / (t * a);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = (z + (t / (y / x))) / b
if (y <= (-4.5d+23)) then
tmp = t_2
else if (y <= 1.35d-43) then
tmp = t_1 / (a + 1.0d0)
else if (y <= 2.6d+95) then
tmp = t_1 / (1.0d0 + ((y * b) / t))
else if (y <= 2.2d+123) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 3d+145) then
tmp = (y * z) / (t * a)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -4.5e+23) {
tmp = t_2;
} else if (y <= 1.35e-43) {
tmp = t_1 / (a + 1.0);
} else if (y <= 2.6e+95) {
tmp = t_1 / (1.0 + ((y * b) / t));
} else if (y <= 2.2e+123) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 3e+145) {
tmp = (y * z) / (t * a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = (z + (t / (y / x))) / b tmp = 0 if y <= -4.5e+23: tmp = t_2 elif y <= 1.35e-43: tmp = t_1 / (a + 1.0) elif y <= 2.6e+95: tmp = t_1 / (1.0 + ((y * b) / t)) elif y <= 2.2e+123: tmp = (y / t) * (z / (a + 1.0)) elif y <= 3e+145: tmp = (y * z) / (t * a) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (y <= -4.5e+23) tmp = t_2; elseif (y <= 1.35e-43) tmp = Float64(t_1 / Float64(a + 1.0)); elseif (y <= 2.6e+95) tmp = Float64(t_1 / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= 2.2e+123) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 3e+145) tmp = Float64(Float64(y * z) / Float64(t * a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = (z + (t / (y / x))) / b; tmp = 0.0; if (y <= -4.5e+23) tmp = t_2; elseif (y <= 1.35e-43) tmp = t_1 / (a + 1.0); elseif (y <= 2.6e+95) tmp = t_1 / (1.0 + ((y * b) / t)); elseif (y <= 2.2e+123) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 3e+145) tmp = (y * z) / (t * a); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -4.5e+23], t$95$2, If[LessEqual[y, 1.35e-43], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+95], N[(t$95$1 / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+123], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+145], N[(N[(y * z), $MachinePrecision] / N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;y \leq -4.5 \cdot 10^{+23}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-43}:\\
\;\;\;\;\frac{t\_1}{a + 1}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+95}:\\
\;\;\;\;\frac{t\_1}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+123}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+145}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot a}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.49999999999999979e23 or 3.0000000000000002e145 < y Initial program 46.2%
*-commutative46.2%
associate-*l/55.4%
*-commutative55.4%
associate-*l/60.5%
Simplified60.5%
Taylor expanded in b around inf 31.1%
times-frac38.9%
+-commutative38.9%
associate-*r/42.0%
fma-udef42.0%
Simplified42.0%
Taylor expanded in t around 0 64.2%
associate-/r*64.9%
Simplified64.9%
Taylor expanded in b around 0 66.0%
associate-/l*68.2%
Simplified68.2%
if -4.49999999999999979e23 < y < 1.34999999999999996e-43Initial program 97.6%
*-commutative97.6%
associate-*l/88.5%
*-commutative88.5%
associate-*l/84.6%
Simplified84.6%
Taylor expanded in b around 0 85.5%
if 1.34999999999999996e-43 < y < 2.5999999999999999e95Initial program 77.7%
*-commutative77.7%
associate-*l/81.5%
*-commutative81.5%
associate-*l/85.2%
Simplified85.2%
Taylor expanded in a around 0 66.6%
if 2.5999999999999999e95 < y < 2.19999999999999992e123Initial program 60.3%
*-commutative60.3%
associate-*l/79.4%
*-commutative79.4%
associate-*l/79.4%
Simplified79.4%
Taylor expanded in x around 0 42.1%
associate-/r*60.3%
associate-*r/79.4%
associate-+r+79.4%
associate-*l/79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in y around 0 41.6%
times-frac79.8%
Simplified79.8%
if 2.19999999999999992e123 < y < 3.0000000000000002e145Initial program 42.6%
*-commutative42.6%
associate-*l/42.6%
*-commutative42.6%
associate-*l/42.6%
Simplified42.6%
Taylor expanded in x around 0 61.2%
associate-/r*42.6%
associate-*r/42.6%
associate-+r+42.6%
associate-*l/42.6%
*-commutative42.6%
Simplified42.6%
Taylor expanded in a around inf 80.5%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.45e+24) (not (<= y 1.9e+192))) (/ (+ z (/ t (/ y x))) b) (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.45e+24) || !(y <= 1.9e+192)) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / 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 <= (-1.45d+24)) .or. (.not. (y <= 1.9d+192))) then
tmp = (z + (t / (y / x))) / b
else
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / 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 <= -1.45e+24) || !(y <= 1.9e+192)) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.45e+24) or not (y <= 1.9e+192): tmp = (z + (t / (y / x))) / b else: tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.45e+24) || !(y <= 1.9e+192)) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.45e+24) || ~((y <= 1.9e+192))) tmp = (z + (t / (y / x))) / b; else tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.45e+24], N[Not[LessEqual[y, 1.9e+192]], $MachinePrecision]], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+24} \lor \neg \left(y \leq 1.9 \cdot 10^{+192}\right):\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\end{array}
\end{array}
if y < -1.4499999999999999e24 or 1.9e192 < y Initial program 44.6%
*-commutative44.6%
associate-*l/52.8%
*-commutative52.8%
associate-*l/57.4%
Simplified57.4%
Taylor expanded in b around inf 31.2%
times-frac40.0%
+-commutative40.0%
associate-*r/43.5%
fma-udef43.5%
Simplified43.5%
Taylor expanded in t around 0 66.5%
associate-/r*67.3%
Simplified67.3%
Taylor expanded in b around 0 68.5%
associate-/l*71.0%
Simplified71.0%
if -1.4499999999999999e24 < y < 1.9e192Initial program 89.4%
associate-/l*85.0%
associate-+l+85.0%
associate-/l*83.3%
Simplified83.3%
associate-/r/87.7%
Applied egg-rr87.7%
Final simplification82.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.6e-150) (not (<= t 4.2e-173))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e-150) || !(t <= 4.2e-173)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.6d-150)) .or. (.not. (t <= 4.2d-173))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e-150) || !(t <= 4.2e-173)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.6e-150) or not (t <= 4.2e-173): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.6e-150) || !(t <= 4.2e-173)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.6e-150) || ~((t <= 4.2e-173))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.6e-150], N[Not[LessEqual[t, 4.2e-173]], $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[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-150} \lor \neg \left(t \leq 4.2 \cdot 10^{-173}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.5999999999999999e-150 or 4.20000000000000003e-173 < t Initial program 82.1%
*-commutative82.1%
associate-*l/86.1%
*-commutative86.1%
associate-*l/88.0%
Simplified88.0%
if -1.5999999999999999e-150 < t < 4.20000000000000003e-173Initial program 52.3%
*-commutative52.3%
associate-*l/38.4%
*-commutative38.4%
associate-*l/33.7%
Simplified33.7%
Taylor expanded in b around inf 37.3%
times-frac24.7%
+-commutative24.7%
associate-*r/24.7%
fma-udef24.7%
Simplified24.7%
Taylor expanded in t around 0 70.1%
Final simplification83.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5e-203) (not (<= t 2.6e-175))) (/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (/ y (/ t b))))) (+ (/ z b) (/ (/ (* x t) b) y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5e-203) || !(t <= 2.6e-175)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = (z / b) + (((x * t) / b) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-5d-203)) .or. (.not. (t <= 2.6d-175))) then
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (y / (t / b))))
else
tmp = (z / b) + (((x * t) / b) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5e-203) || !(t <= 2.6e-175)) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
} else {
tmp = (z / b) + (((x * t) / b) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5e-203) or not (t <= 2.6e-175): tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))) else: tmp = (z / b) + (((x * t) / b) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5e-203) || !(t <= 2.6e-175)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); else tmp = Float64(Float64(z / b) + Float64(Float64(Float64(x * t) / b) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5e-203) || ~((t <= 2.6e-175))) tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))); else tmp = (z / b) + (((x * t) / b) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5e-203], N[Not[LessEqual[t, 2.6e-175]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-203} \lor \neg \left(t \leq 2.6 \cdot 10^{-175}\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\
\end{array}
\end{array}
if t < -5.0000000000000002e-203 or 2.6e-175 < t Initial program 81.8%
associate-/l*84.6%
associate-+l+84.6%
associate-/l*86.4%
Simplified86.4%
if -5.0000000000000002e-203 < t < 2.6e-175Initial program 45.8%
*-commutative45.8%
associate-*l/32.1%
*-commutative32.1%
associate-*l/26.2%
Simplified26.2%
Taylor expanded in b around inf 32.7%
times-frac18.8%
+-commutative18.8%
associate-*r/18.8%
fma-udef18.8%
Simplified18.8%
Taylor expanded in t around 0 72.2%
associate-/r*72.2%
Simplified72.2%
Final simplification83.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ t (/ y x))) b)))
(if (<= y -1.05e+22)
t_1
(if (<= y -4.6e-84)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 4.5e+23) (/ 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 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -1.05e+22) {
tmp = t_1;
} else if (y <= -4.6e-84) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 4.5e+23) {
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 = (z + (t / (y / x))) / b
if (y <= (-1.05d+22)) then
tmp = t_1
else if (y <= (-4.6d-84)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 4.5d+23) 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 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -1.05e+22) {
tmp = t_1;
} else if (y <= -4.6e-84) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 4.5e+23) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t / (y / x))) / b tmp = 0 if y <= -1.05e+22: tmp = t_1 elif y <= -4.6e-84: tmp = (y / t) * (z / (a + 1.0)) elif y <= 4.5e+23: 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(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (y <= -1.05e+22) tmp = t_1; elseif (y <= -4.6e-84) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 4.5e+23) 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 = (z + (t / (y / x))) / b; tmp = 0.0; if (y <= -1.05e+22) tmp = t_1; elseif (y <= -4.6e-84) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 4.5e+23) 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[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.05e+22], t$95$1, If[LessEqual[y, -4.6e-84], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+23], 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{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-84}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.0499999999999999e22 or 4.49999999999999979e23 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in b around inf 32.9%
times-frac38.3%
+-commutative38.3%
associate-*r/40.8%
fma-udef40.9%
Simplified40.9%
Taylor expanded in t around 0 60.9%
associate-/r*62.2%
Simplified62.2%
Taylor expanded in b around 0 63.3%
associate-/l*65.0%
Simplified65.0%
if -1.0499999999999999e22 < y < -4.59999999999999961e-84Initial program 91.0%
*-commutative91.0%
associate-*l/91.0%
*-commutative91.0%
associate-*l/91.0%
Simplified91.0%
Taylor expanded in x around 0 59.1%
associate-/r*63.2%
associate-*r/63.2%
associate-+r+63.2%
associate-*l/63.2%
*-commutative63.2%
Simplified63.2%
Taylor expanded in y around 0 59.1%
times-frac67.6%
Simplified67.6%
if -4.59999999999999961e-84 < y < 4.49999999999999979e23Initial program 98.3%
*-commutative98.3%
associate-*l/87.6%
*-commutative87.6%
associate-*l/83.4%
Simplified83.4%
Taylor expanded in x around inf 76.5%
Final simplification70.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ t (/ y x))) b)))
(if (<= y -9e+20)
t_1
(if (<= y -1.35e-98)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 4.1e+21) (/ x (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -9e+20) {
tmp = t_1;
} else if (y <= -1.35e-98) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 4.1e+21) {
tmp = x / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + (t / (y / x))) / b
if (y <= (-9d+20)) then
tmp = t_1
else if (y <= (-1.35d-98)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 4.1d+21) then
tmp = x / (a + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t / (y / x))) / b;
double tmp;
if (y <= -9e+20) {
tmp = t_1;
} else if (y <= -1.35e-98) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 4.1e+21) {
tmp = x / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t / (y / x))) / b tmp = 0 if y <= -9e+20: tmp = t_1 elif y <= -1.35e-98: tmp = (y / t) * (z / (a + 1.0)) elif y <= 4.1e+21: tmp = x / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t / Float64(y / x))) / b) tmp = 0.0 if (y <= -9e+20) tmp = t_1; elseif (y <= -1.35e-98) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 4.1e+21) tmp = Float64(x / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t / (y / x))) / b; tmp = 0.0; if (y <= -9e+20) tmp = t_1; elseif (y <= -1.35e-98) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 4.1e+21) tmp = x / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -9e+20], t$95$1, If[LessEqual[y, -1.35e-98], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+21], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9e20 or 4.1e21 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in b around inf 32.9%
times-frac38.3%
+-commutative38.3%
associate-*r/40.8%
fma-udef40.9%
Simplified40.9%
Taylor expanded in t around 0 60.9%
associate-/r*62.2%
Simplified62.2%
Taylor expanded in b around 0 63.3%
associate-/l*65.0%
Simplified65.0%
if -9e20 < y < -1.3499999999999999e-98Initial program 91.8%
*-commutative91.8%
associate-*l/88.0%
*-commutative88.0%
associate-*l/84.0%
Simplified84.0%
Taylor expanded in x around 0 58.5%
associate-/r*62.3%
associate-*r/58.5%
associate-+r+58.5%
associate-*l/58.5%
*-commutative58.5%
Simplified58.5%
Taylor expanded in y around 0 58.4%
times-frac66.2%
Simplified66.2%
if -1.3499999999999999e-98 < y < 4.1e21Initial program 98.3%
*-commutative98.3%
associate-*l/88.1%
*-commutative88.1%
associate-*l/84.7%
Simplified84.7%
Taylor expanded in t around inf 69.3%
Final simplification67.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7.2e+19)
(/ z b)
(if (<= y -9e-163)
(/ x a)
(if (<= y -6e-300) x (if (<= y 3.2e+21) (/ x a) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.2e+19) {
tmp = z / b;
} else if (y <= -9e-163) {
tmp = x / a;
} else if (y <= -6e-300) {
tmp = x;
} else if (y <= 3.2e+21) {
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 <= (-7.2d+19)) then
tmp = z / b
else if (y <= (-9d-163)) then
tmp = x / a
else if (y <= (-6d-300)) then
tmp = x
else if (y <= 3.2d+21) 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 <= -7.2e+19) {
tmp = z / b;
} else if (y <= -9e-163) {
tmp = x / a;
} else if (y <= -6e-300) {
tmp = x;
} else if (y <= 3.2e+21) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.2e+19: tmp = z / b elif y <= -9e-163: tmp = x / a elif y <= -6e-300: tmp = x elif y <= 3.2e+21: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.2e+19) tmp = Float64(z / b); elseif (y <= -9e-163) tmp = Float64(x / a); elseif (y <= -6e-300) tmp = x; elseif (y <= 3.2e+21) 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 <= -7.2e+19) tmp = z / b; elseif (y <= -9e-163) tmp = x / a; elseif (y <= -6e-300) tmp = x; elseif (y <= 3.2e+21) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.2e+19], N[(z / b), $MachinePrecision], If[LessEqual[y, -9e-163], N[(x / a), $MachinePrecision], If[LessEqual[y, -6e-300], x, If[LessEqual[y, 3.2e+21], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+19}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-163}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-300}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -7.2e19 or 3.2e21 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in t around 0 57.8%
if -7.2e19 < y < -8.9999999999999995e-163 or -6.00000000000000048e-300 < y < 3.2e21Initial program 97.0%
*-commutative97.0%
associate-*l/87.8%
*-commutative87.8%
associate-*l/84.0%
Simplified84.0%
Taylor expanded in x around inf 66.1%
Taylor expanded in a around inf 43.7%
if -8.9999999999999995e-163 < y < -6.00000000000000048e-300Initial program 97.4%
*-commutative97.4%
associate-*l/89.1%
*-commutative89.1%
associate-*l/86.3%
Simplified86.3%
Taylor expanded in x around inf 69.7%
Taylor expanded in a around 0 48.1%
Taylor expanded in b around 0 42.8%
Final simplification50.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e+23) (not (<= y 9.5e+27))) (/ (+ z (/ t (/ y x))) 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.15e+23) || !(y <= 9.5e+27)) {
tmp = (z + (t / (y / x))) / 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.15d+23)) .or. (.not. (y <= 9.5d+27))) then
tmp = (z + (t / (y / x))) / 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.15e+23) || !(y <= 9.5e+27)) {
tmp = (z + (t / (y / x))) / 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.15e+23) or not (y <= 9.5e+27): tmp = (z + (t / (y / x))) / 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.15e+23) || !(y <= 9.5e+27)) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / 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.15e+23) || ~((y <= 9.5e+27))) tmp = (z + (t / (y / x))) / 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.15e+23], N[Not[LessEqual[y, 9.5e+27]], $MachinePrecision]], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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.15 \cdot 10^{+23} \lor \neg \left(y \leq 9.5 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.15e23 or 9.4999999999999997e27 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in b around inf 32.9%
times-frac38.3%
+-commutative38.3%
associate-*r/40.8%
fma-udef40.9%
Simplified40.9%
Taylor expanded in t around 0 60.9%
associate-/r*62.2%
Simplified62.2%
Taylor expanded in b around 0 63.3%
associate-/l*65.0%
Simplified65.0%
if -1.15e23 < y < 9.4999999999999997e27Initial program 97.1%
*-commutative97.1%
associate-*l/88.1%
*-commutative88.1%
associate-*l/84.6%
Simplified84.6%
Taylor expanded in b around 0 83.9%
Final simplification75.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -9.5e+23)
(/ z b)
(if (<= y -2.25e-97)
(* z (/ y (* t (+ a 1.0))))
(if (<= y 5.6e+22) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -9.5e+23) {
tmp = z / b;
} else if (y <= -2.25e-97) {
tmp = z * (y / (t * (a + 1.0)));
} else if (y <= 5.6e+22) {
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 (y <= (-9.5d+23)) then
tmp = z / b
else if (y <= (-2.25d-97)) then
tmp = z * (y / (t * (a + 1.0d0)))
else if (y <= 5.6d+22) 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 (y <= -9.5e+23) {
tmp = z / b;
} else if (y <= -2.25e-97) {
tmp = z * (y / (t * (a + 1.0)));
} else if (y <= 5.6e+22) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -9.5e+23: tmp = z / b elif y <= -2.25e-97: tmp = z * (y / (t * (a + 1.0))) elif y <= 5.6e+22: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -9.5e+23) tmp = Float64(z / b); elseif (y <= -2.25e-97) tmp = Float64(z * Float64(y / Float64(t * Float64(a + 1.0)))); elseif (y <= 5.6e+22) 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 (y <= -9.5e+23) tmp = z / b; elseif (y <= -2.25e-97) tmp = z * (y / (t * (a + 1.0))); elseif (y <= 5.6e+22) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -9.5e+23], N[(z / b), $MachinePrecision], If[LessEqual[y, -2.25e-97], N[(z * N[(y / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e+22], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+23}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2.25 \cdot 10^{-97}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+22}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -9.50000000000000038e23 or 5.6e22 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in t around 0 57.8%
if -9.50000000000000038e23 < y < -2.25000000000000005e-97Initial program 91.8%
*-commutative91.8%
associate-*l/88.0%
*-commutative88.0%
associate-*l/84.0%
Simplified84.0%
Taylor expanded in x around 0 58.5%
associate-/r*62.3%
associate-*r/58.5%
associate-+r+58.5%
associate-*l/58.5%
*-commutative58.5%
Simplified58.5%
associate-*r/58.5%
Applied egg-rr58.5%
Taylor expanded in y around 0 58.4%
*-commutative58.4%
associate-*r/58.5%
Simplified58.5%
if -2.25000000000000005e-97 < y < 5.6e22Initial program 98.3%
*-commutative98.3%
associate-*l/88.1%
*-commutative88.1%
associate-*l/84.7%
Simplified84.7%
Taylor expanded in t around inf 69.3%
Final simplification63.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.7e+21)
(/ z b)
(if (<= y -3.5e-98)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 5.8e+23) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.7e+21) {
tmp = z / b;
} else if (y <= -3.5e-98) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 5.8e+23) {
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 (y <= (-2.7d+21)) then
tmp = z / b
else if (y <= (-3.5d-98)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 5.8d+23) 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 (y <= -2.7e+21) {
tmp = z / b;
} else if (y <= -3.5e-98) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 5.8e+23) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.7e+21: tmp = z / b elif y <= -3.5e-98: tmp = (y / t) * (z / (a + 1.0)) elif y <= 5.8e+23: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.7e+21) tmp = Float64(z / b); elseif (y <= -3.5e-98) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 5.8e+23) 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 (y <= -2.7e+21) tmp = z / b; elseif (y <= -3.5e-98) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 5.8e+23) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.7e+21], N[(z / b), $MachinePrecision], If[LessEqual[y, -3.5e-98], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e+23], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{+21}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-98}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.7e21 or 5.80000000000000025e23 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in t around 0 57.8%
if -2.7e21 < y < -3.5000000000000002e-98Initial program 91.8%
*-commutative91.8%
associate-*l/88.0%
*-commutative88.0%
associate-*l/84.0%
Simplified84.0%
Taylor expanded in x around 0 58.5%
associate-/r*62.3%
associate-*r/58.5%
associate-+r+58.5%
associate-*l/58.5%
*-commutative58.5%
Simplified58.5%
Taylor expanded in y around 0 58.4%
times-frac66.2%
Simplified66.2%
if -3.5000000000000002e-98 < y < 5.80000000000000025e23Initial program 98.3%
*-commutative98.3%
associate-*l/88.1%
*-commutative88.1%
associate-*l/84.7%
Simplified84.7%
Taylor expanded in t around inf 69.3%
Final simplification63.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.9e+22) (not (<= y 3e+27))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.9e+22) || !(y <= 3e+27)) {
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 <= (-2.9d+22)) .or. (.not. (y <= 3d+27))) 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 <= -2.9e+22) || !(y <= 3e+27)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.9e+22) or not (y <= 3e+27): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.9e+22) || !(y <= 3e+27)) 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 <= -2.9e+22) || ~((y <= 3e+27))) 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, -2.9e+22], N[Not[LessEqual[y, 3e+27]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+22} \lor \neg \left(y \leq 3 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -2.9e22 or 2.99999999999999976e27 < y Initial program 49.0%
*-commutative49.0%
associate-*l/58.7%
*-commutative58.7%
associate-*l/63.5%
Simplified63.5%
Taylor expanded in t around 0 57.8%
if -2.9e22 < y < 2.99999999999999976e27Initial program 97.1%
*-commutative97.1%
associate-*l/88.1%
*-commutative88.1%
associate-*l/84.6%
Simplified84.6%
Taylor expanded in t around inf 62.1%
Final simplification60.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.45e-8) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.45e-8) || !(a <= 1.0)) {
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 <= (-2.45d-8)) .or. (.not. (a <= 1.0d0))) 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 <= -2.45e-8) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.45e-8) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.45e-8) || !(a <= 1.0)) 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 <= -2.45e-8) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.45e-8], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.45 \cdot 10^{-8} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.4500000000000001e-8 or 1 < a Initial program 71.7%
*-commutative71.7%
associate-*l/72.4%
*-commutative72.4%
associate-*l/75.1%
Simplified75.1%
Taylor expanded in x around inf 54.3%
Taylor expanded in a around inf 47.7%
if -2.4500000000000001e-8 < a < 1Initial program 78.9%
*-commutative78.9%
associate-*l/77.2%
*-commutative77.2%
associate-*l/74.7%
Simplified74.7%
Taylor expanded in x around inf 49.9%
Taylor expanded in a around 0 51.9%
Taylor expanded in b around 0 36.1%
Final simplification42.5%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 74.9%
*-commutative74.9%
associate-*l/74.5%
*-commutative74.5%
associate-*l/74.9%
Simplified74.9%
Taylor expanded in x around inf 52.3%
Taylor expanded in a around 0 30.9%
Taylor expanded in b around 0 18.5%
Final simplification18.5%
(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 2024029
(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))))