
(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 14 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 (+ 1.0 (fma b (/ y t) a)))
(t_2 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_2 -1e-66)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_2 1e-297)
(/ (fma y (/ z t) x) t_1)
(if (<= t_2 5e+298) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 + fma(b, (y / t), a);
double t_2 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_2 <= -1e-66) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_2 <= 1e-297) {
tmp = fma(y, (z / t), x) / t_1;
} else if (t_2 <= 5e+298) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(1.0 + fma(b, Float64(y / t), a)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_2 <= -1e-66) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_2 <= 1e-297) tmp = Float64(fma(y, Float64(z / t), x) / t_1); elseif (t_2 <= 5e+298) tmp = t_2; else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-66], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 1e-297], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 5e+298], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-66}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\mathbf{elif}\;t_2 \leq 10^{-297}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{t_1}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 49.7%
*-commutative49.7%
associate-*l/62.4%
associate-+l+62.4%
associate-*r/62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in x around 0 80.9%
Taylor expanded in t around 0 80.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999998e-67Initial program 99.6%
+-commutative99.6%
associate-*r/93.0%
fma-def93.0%
associate-+l+93.0%
+-commutative93.0%
associate-+l+93.0%
*-commutative93.0%
associate-*r/93.0%
fma-def93.1%
Simplified93.1%
fma-udef93.1%
clear-num93.1%
div-inv93.1%
associate-/r/99.7%
Applied egg-rr99.7%
if -9.9999999999999998e-67 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000004e-297Initial program 72.1%
+-commutative72.1%
associate-*r/73.3%
fma-def73.3%
associate-+l+73.3%
+-commutative73.3%
associate-+l+73.3%
*-commutative73.3%
associate-*r/82.8%
fma-def82.8%
Simplified82.8%
if 1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 99.8%
if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 10.7%
*-commutative10.7%
associate-*l/11.0%
associate-+l+11.0%
associate-*r/15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in t around 0 86.5%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 -2e-183)
(/ (+ x (* z (/ y t))) (+ 1.0 (fma b (/ y t) a)))
(if (<= t_1 1e-297)
(/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (* b (/ y t)))))
(if (<= t_1 5e+298) 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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= -2e-183) {
tmp = (x + (z * (y / t))) / (1.0 + fma(b, (y / t), a));
} else if (t_1 <= 1e-297) {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
} else if (t_1 <= 5e+298) {
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(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= -2e-183) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(1.0 + fma(b, Float64(y / t), a))); elseif (t_1 <= 1e-297) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); elseif (t_1 <= 5e+298) tmp = t_1; 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-183], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-297], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-183}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)}\\
\mathbf{elif}\;t_1 \leq 10^{-297}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;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 49.7%
*-commutative49.7%
associate-*l/62.4%
associate-+l+62.4%
associate-*r/62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in x around 0 80.9%
Taylor expanded in t around 0 80.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.00000000000000001e-183Initial program 99.6%
+-commutative99.6%
associate-*r/95.0%
fma-def95.0%
associate-+l+95.0%
+-commutative95.0%
associate-+l+95.0%
*-commutative95.0%
associate-*r/95.0%
fma-def95.0%
Simplified95.0%
fma-udef95.0%
clear-num95.0%
div-inv95.0%
associate-/r/99.7%
Applied egg-rr99.7%
if -2.00000000000000001e-183 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000004e-297Initial program 64.1%
associate-/l*65.6%
associate-*l/77.9%
*-commutative77.9%
cancel-sign-sub77.9%
*-commutative77.9%
associate-*l/65.6%
associate-+r-65.6%
associate-*l/77.9%
*-commutative77.9%
cancel-sign-sub77.9%
*-commutative77.9%
associate-*l/65.6%
*-commutative65.6%
associate-/l*77.9%
Simplified77.9%
div-inv77.9%
clear-num77.9%
Applied egg-rr77.9%
if 1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 99.8%
if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 10.7%
*-commutative10.7%
associate-*l/11.0%
associate-+l+11.0%
associate-*r/15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in t around 0 86.5%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 -5e-104)
t_1
(if (<= t_1 1e-297)
(/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t)))))
(if (<= t_1 5e+298) 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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= -5e-104) {
tmp = t_1;
} else if (t_1 <= 1e-297) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t_1 <= 5e+298) {
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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= -5e-104) {
tmp = t_1;
} else if (t_1 <= 1e-297) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t_1 <= -5e-104: tmp = t_1 elif t_1 <= 1e-297: tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) elif t_1 <= 5e+298: 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(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= -5e-104) tmp = t_1; elseif (t_1 <= 1e-297) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))); elseif (t_1 <= 5e+298) 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)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t_1 <= -5e-104) tmp = t_1; elseif (t_1 <= 1e-297) tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); elseif (t_1 <= 5e+298) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-104], t$95$1, If[LessEqual[t$95$1, 1e-297], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 10^{-297}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;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 49.7%
*-commutative49.7%
associate-*l/62.4%
associate-+l+62.4%
associate-*r/62.4%
*-commutative62.4%
Simplified62.4%
Taylor expanded in x around 0 80.9%
Taylor expanded in t around 0 80.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999979e-104 or 1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 99.7%
if -4.99999999999999979e-104 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000004e-297Initial program 68.6%
*-commutative68.6%
associate-*l/69.9%
associate-+l+69.9%
associate-*r/80.7%
*-commutative80.7%
Simplified80.7%
if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 10.7%
*-commutative10.7%
associate-*l/11.0%
associate-+l+11.0%
associate-*r/15.4%
*-commutative15.4%
Simplified15.4%
Taylor expanded in t around 0 86.5%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.9e+92)
(/ z b)
(if (<= y -0.0021)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= y 3.8e-14)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 2.5e+66) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.9e+92) {
tmp = z / b;
} else if (y <= -0.0021) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 3.8e-14) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2.5e+66) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.9d+92)) then
tmp = z / b
else if (y <= (-0.0021d0)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (y <= 3.8d-14) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 2.5d+66) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.9e+92) {
tmp = z / b;
} else if (y <= -0.0021) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 3.8e-14) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 2.5e+66) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.9e+92: tmp = z / b elif y <= -0.0021: tmp = (x + (y * (z / t))) / (a + 1.0) elif y <= 3.8e-14: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 2.5e+66: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.9e+92) tmp = Float64(z / b); elseif (y <= -0.0021) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (y <= 3.8e-14) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 2.5e+66) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.9e+92) tmp = z / b; elseif (y <= -0.0021) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (y <= 3.8e-14) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 2.5e+66) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.9e+92], N[(z / b), $MachinePrecision], If[LessEqual[y, -0.0021], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-14], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+66], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+92}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -0.0021:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+66}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -3.90000000000000011e92 or 2.49999999999999996e66 < y Initial program 45.1%
*-commutative45.1%
associate-*l/46.3%
associate-+l+46.3%
associate-*r/55.5%
*-commutative55.5%
Simplified55.5%
Taylor expanded in t around 0 69.3%
if -3.90000000000000011e92 < y < -0.00209999999999999987Initial program 76.9%
*-commutative76.9%
associate-*l/82.6%
associate-+l+82.6%
associate-*r/82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in b around 0 71.4%
if -0.00209999999999999987 < y < 3.8000000000000002e-14Initial program 93.7%
*-commutative93.7%
associate-*l/90.7%
associate-+l+90.7%
associate-*r/88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in x around inf 80.9%
if 3.8000000000000002e-14 < y < 2.49999999999999996e66Initial program 72.4%
*-commutative72.4%
associate-*l/72.4%
associate-+l+72.4%
associate-*r/77.0%
*-commutative77.0%
Simplified77.0%
Taylor expanded in x around 0 59.2%
Taylor expanded in t around 0 72.9%
Final simplification75.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.5e-172) (not (<= t 5.1e-135))) (/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t))))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-172) || !(t <= 5.1e-135)) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-9.5d-172)) .or. (.not. (t <= 5.1d-135))) then
tmp = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
else
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-172) || !(t <= 5.1e-135)) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.5e-172) or not (t <= 5.1e-135): tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.5e-172) || !(t <= 5.1e-135)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.5e-172) || ~((t <= 5.1e-135))) tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.5e-172], N[Not[LessEqual[t, 5.1e-135]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-172} \lor \neg \left(t \leq 5.1 \cdot 10^{-135}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -9.50000000000000053e-172 or 5.1000000000000001e-135 < t Initial program 80.6%
*-commutative80.6%
associate-*l/81.2%
associate-+l+81.2%
associate-*r/85.6%
*-commutative85.6%
Simplified85.6%
if -9.50000000000000053e-172 < t < 5.1000000000000001e-135Initial program 51.5%
*-commutative51.5%
associate-*l/47.1%
associate-+l+47.1%
associate-*r/44.2%
*-commutative44.2%
Simplified44.2%
Taylor expanded in x around 0 53.1%
Taylor expanded in t around 0 71.3%
Final simplification82.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.4e-172)
(/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t)))))
(if (<= t 1.3e-190)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (* b (/ y t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.4e-172) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t <= 1.3e-190) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.4d-172)) then
tmp = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
else if (t <= 1.3d-190) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (b * (y / t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.4e-172) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t <= 1.3e-190) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.4e-172: tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) elif t <= 1.3e-190: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.4e-172) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))); elseif (t <= 1.3e-190) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.4e-172) tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); elseif (t <= 1.3e-190) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y / (t / z))) / (a + (1.0 + (b * (y / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.4e-172], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-190], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-190}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\end{array}
\end{array}
if t < -2.4000000000000001e-172Initial program 83.8%
*-commutative83.8%
associate-*l/82.9%
associate-+l+82.9%
associate-*r/89.1%
*-commutative89.1%
Simplified89.1%
if -2.4000000000000001e-172 < t < 1.2999999999999999e-190Initial program 51.5%
*-commutative51.5%
associate-*l/45.7%
associate-+l+45.7%
associate-*r/45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in x around 0 59.3%
Taylor expanded in t around 0 79.2%
if 1.2999999999999999e-190 < t Initial program 74.0%
associate-/l*75.7%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/75.7%
associate-+r-75.7%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/75.7%
*-commutative75.7%
associate-/l*78.9%
Simplified78.9%
div-inv78.9%
clear-num78.9%
Applied egg-rr78.9%
Final simplification82.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.45e-168)
(/ (+ x (* y (/ z t))) (+ a (+ 1.0 (* y (/ b t)))))
(if (<= t 9.6e-191)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (/ b (/ t y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.45e-168) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t <= 9.6e-191) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b / (t / 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 <= (-1.45d-168)) then
tmp = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
else if (t <= 9.6d-191) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (b / (t / 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 <= -1.45e-168) {
tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
} else if (t <= 9.6e-191) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / (a + (1.0 + (b / (t / y))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.45e-168: tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))) elif t <= 9.6e-191: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y / (t / z))) / (a + (1.0 + (b / (t / y)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.45e-168) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t))))); elseif (t <= 9.6e-191) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(b / Float64(t / y))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.45e-168) tmp = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t)))); elseif (t <= 9.6e-191) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y / (t / z))) / (a + (1.0 + (b / (t / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.45e-168], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e-191], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-168}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-191}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\
\end{array}
\end{array}
if t < -1.4499999999999999e-168Initial program 83.8%
*-commutative83.8%
associate-*l/82.9%
associate-+l+82.9%
associate-*r/89.1%
*-commutative89.1%
Simplified89.1%
if -1.4499999999999999e-168 < t < 9.5999999999999997e-191Initial program 51.5%
*-commutative51.5%
associate-*l/45.7%
associate-+l+45.7%
associate-*r/45.7%
*-commutative45.7%
Simplified45.7%
Taylor expanded in x around 0 59.3%
Taylor expanded in t around 0 79.2%
if 9.5999999999999997e-191 < t Initial program 74.0%
associate-/l*75.7%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/75.7%
associate-+r-75.7%
associate-*l/78.9%
*-commutative78.9%
cancel-sign-sub78.9%
*-commutative78.9%
associate-*l/75.7%
*-commutative75.7%
associate-/l*78.9%
Simplified78.9%
Final simplification82.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.7e+94)
(/ z b)
(if (<= y -0.0021)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= y 3.1e-5) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e+94) {
tmp = z / b;
} else if (y <= -0.0021) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 3.1e-5) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.7d+94)) then
tmp = z / b
else if (y <= (-0.0021d0)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (y <= 3.1d-5) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.7e+94) {
tmp = z / b;
} else if (y <= -0.0021) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (y <= 3.1e-5) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.7e+94: tmp = z / b elif y <= -0.0021: tmp = (x + (y * (z / t))) / (a + 1.0) elif y <= 3.1e-5: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.7e+94) tmp = Float64(z / b); elseif (y <= -0.0021) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (y <= 3.1e-5) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.7e+94) tmp = z / b; elseif (y <= -0.0021) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (y <= 3.1e-5) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e+94], N[(z / b), $MachinePrecision], If[LessEqual[y, -0.0021], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e-5], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+94}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -0.0021:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.7000000000000001e94 or 3.10000000000000014e-5 < y Initial program 49.7%
*-commutative49.7%
associate-*l/50.6%
associate-+l+50.6%
associate-*r/59.1%
*-commutative59.1%
Simplified59.1%
Taylor expanded in t around 0 64.6%
if -1.7000000000000001e94 < y < -0.00209999999999999987Initial program 76.9%
*-commutative76.9%
associate-*l/82.6%
associate-+l+82.6%
associate-*r/82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in b around 0 71.4%
if -0.00209999999999999987 < y < 3.10000000000000014e-5Initial program 93.8%
*-commutative93.8%
associate-*l/90.8%
associate-+l+90.8%
associate-*r/88.5%
*-commutative88.5%
Simplified88.5%
Taylor expanded in x around inf 80.3%
Final simplification72.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -6e+92)
(/ z b)
(if (<= y -0.002)
(/ (+ x (* y (/ z t))) a)
(if (<= y -2.3e-26)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= y 3.4e-20) (/ x (+ a 1.0)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -6e+92) {
tmp = z / b;
} else if (y <= -0.002) {
tmp = (x + (y * (z / t))) / a;
} else if (y <= -2.3e-26) {
tmp = x / (1.0 + (b * (y / t)));
} else if (y <= 3.4e-20) {
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 <= (-6d+92)) then
tmp = z / b
else if (y <= (-0.002d0)) then
tmp = (x + (y * (z / t))) / a
else if (y <= (-2.3d-26)) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (y <= 3.4d-20) 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 <= -6e+92) {
tmp = z / b;
} else if (y <= -0.002) {
tmp = (x + (y * (z / t))) / a;
} else if (y <= -2.3e-26) {
tmp = x / (1.0 + (b * (y / t)));
} else if (y <= 3.4e-20) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6e+92: tmp = z / b elif y <= -0.002: tmp = (x + (y * (z / t))) / a elif y <= -2.3e-26: tmp = x / (1.0 + (b * (y / t))) elif y <= 3.4e-20: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -6e+92) tmp = Float64(z / b); elseif (y <= -0.002) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (y <= -2.3e-26) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (y <= 3.4e-20) 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 <= -6e+92) tmp = z / b; elseif (y <= -0.002) tmp = (x + (y * (z / t))) / a; elseif (y <= -2.3e-26) tmp = x / (1.0 + (b * (y / t))); elseif (y <= 3.4e-20) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6e+92], N[(z / b), $MachinePrecision], If[LessEqual[y, -0.002], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.3e-26], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-20], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+92}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -0.002:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -6.00000000000000026e92 or 3.3999999999999997e-20 < y Initial program 50.2%
*-commutative50.2%
associate-*l/51.1%
associate-+l+51.1%
associate-*r/59.3%
*-commutative59.3%
Simplified59.3%
Taylor expanded in t around 0 63.0%
if -6.00000000000000026e92 < y < -2e-3Initial program 76.9%
*-commutative76.9%
associate-*l/82.6%
associate-+l+82.6%
associate-*r/82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in a around inf 47.3%
if -2e-3 < y < -2.30000000000000009e-26Initial program 99.8%
*-commutative99.8%
associate-*l/100.0%
associate-+l+100.0%
associate-*r/99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 72.0%
Taylor expanded in a around 0 72.0%
*-commutative72.0%
associate-*r/71.8%
Simplified71.8%
Taylor expanded in y around 0 72.0%
associate-*r/71.8%
Simplified71.8%
if -2.30000000000000009e-26 < y < 3.3999999999999997e-20Initial program 94.1%
*-commutative94.1%
associate-*l/90.8%
associate-+l+90.8%
associate-*r/88.3%
*-commutative88.3%
Simplified88.3%
Taylor expanded in t around inf 70.6%
Final simplification65.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.4e+91) (not (<= y 5.2e-6))) (/ 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 <= -1.4e+91) || !(y <= 5.2e-6)) {
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 <= (-1.4d+91)) .or. (.not. (y <= 5.2d-6))) 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 <= -1.4e+91) || !(y <= 5.2e-6)) {
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 <= -1.4e+91) or not (y <= 5.2e-6): 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 <= -1.4e+91) || !(y <= 5.2e-6)) 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 <= -1.4e+91) || ~((y <= 5.2e-6))) 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, -1.4e+91], N[Not[LessEqual[y, 5.2e-6]], $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 -1.4 \cdot 10^{+91} \lor \neg \left(y \leq 5.2 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -1.3999999999999999e91 or 5.20000000000000019e-6 < y Initial program 49.3%
*-commutative49.3%
associate-*l/51.1%
associate-+l+51.1%
associate-*r/59.5%
*-commutative59.5%
Simplified59.5%
Taylor expanded in t around 0 64.0%
if -1.3999999999999999e91 < y < 5.20000000000000019e-6Initial program 92.4%
*-commutative92.4%
associate-*l/89.7%
associate-+l+89.7%
associate-*r/87.7%
*-commutative87.7%
Simplified87.7%
Taylor expanded in x around inf 76.4%
Final simplification70.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.5e+158) (/ x a) (if (<= t -2.02e-7) x (if (<= t 62.0) (/ z b) (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.5e+158) {
tmp = x / a;
} else if (t <= -2.02e-7) {
tmp = x;
} else if (t <= 62.0) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.5d+158)) then
tmp = x / a
else if (t <= (-2.02d-7)) then
tmp = x
else if (t <= 62.0d0) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.5e+158) {
tmp = x / a;
} else if (t <= -2.02e-7) {
tmp = x;
} else if (t <= 62.0) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.5e+158: tmp = x / a elif t <= -2.02e-7: tmp = x elif t <= 62.0: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.5e+158) tmp = Float64(x / a); elseif (t <= -2.02e-7) tmp = x; elseif (t <= 62.0) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.5e+158) tmp = x / a; elseif (t <= -2.02e-7) tmp = x; elseif (t <= 62.0) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.5e+158], N[(x / a), $MachinePrecision], If[LessEqual[t, -2.02e-7], x, If[LessEqual[t, 62.0], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+158}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq -2.02 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 62:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -1.5e158 or 62 < t Initial program 83.2%
*-commutative83.2%
associate-*l/85.5%
associate-+l+85.5%
associate-*r/95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in x around inf 75.7%
Taylor expanded in a around inf 43.4%
if -1.5e158 < t < -2.02000000000000009e-7Initial program 89.6%
*-commutative89.6%
associate-*l/89.5%
associate-+l+89.5%
associate-*r/92.1%
*-commutative92.1%
Simplified92.1%
Taylor expanded in t around inf 61.1%
Taylor expanded in a around 0 45.8%
if -2.02000000000000009e-7 < t < 62Initial program 62.2%
*-commutative62.2%
associate-*l/59.4%
associate-+l+59.4%
associate-*r/57.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in t around 0 57.6%
Final simplification51.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.35e+89) (not (<= y 1e-20))) (/ 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.35e+89) || !(y <= 1e-20)) {
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.35d+89)) .or. (.not. (y <= 1d-20))) 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.35e+89) || !(y <= 1e-20)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.35e+89) or not (y <= 1e-20): 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.35e+89) || !(y <= 1e-20)) 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.35e+89) || ~((y <= 1e-20))) 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.35e+89], N[Not[LessEqual[y, 1e-20]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+89} \lor \neg \left(y \leq 10^{-20}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -2.35000000000000011e89 or 9.99999999999999945e-21 < y Initial program 49.8%
*-commutative49.8%
associate-*l/51.5%
associate-+l+51.5%
associate-*r/59.7%
*-commutative59.7%
Simplified59.7%
Taylor expanded in t around 0 62.5%
if -2.35000000000000011e89 < y < 9.99999999999999945e-21Initial program 92.9%
*-commutative92.9%
associate-*l/90.2%
associate-+l+90.2%
associate-*r/88.1%
*-commutative88.1%
Simplified88.1%
Taylor expanded in t around inf 65.1%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2e-27) (not (<= a 9.5e-24))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2e-27) || !(a <= 9.5e-24)) {
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 <= (-2d-27)) .or. (.not. (a <= 9.5d-24))) 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 <= -2e-27) || !(a <= 9.5e-24)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2e-27) or not (a <= 9.5e-24): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2e-27) || !(a <= 9.5e-24)) 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 <= -2e-27) || ~((a <= 9.5e-24))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2e-27], N[Not[LessEqual[a, 9.5e-24]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-27} \lor \neg \left(a \leq 9.5 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.0000000000000001e-27 or 9.50000000000000029e-24 < a Initial program 72.3%
*-commutative72.3%
associate-*l/73.1%
associate-+l+73.1%
associate-*r/73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in x around inf 54.8%
Taylor expanded in a around inf 47.1%
if -2.0000000000000001e-27 < a < 9.50000000000000029e-24Initial program 74.1%
*-commutative74.1%
associate-*l/71.9%
associate-+l+71.9%
associate-*r/76.4%
*-commutative76.4%
Simplified76.4%
Taylor expanded in t around inf 37.1%
Taylor expanded in a around 0 37.1%
Final simplification42.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 73.2%
*-commutative73.2%
associate-*l/72.5%
associate-+l+72.5%
associate-*r/75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in t around inf 42.2%
Taylor expanded in a around 0 20.3%
Final simplification20.3%
(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 2023318
(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))))