
(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 19 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)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(* (/ y t) (/ z (+ 1.0 (fma b (/ y t) a))))
(if (<= t_1 -1e-297)
t_1
(if (<= t_1 0.0)
(/ (+ z (/ (* x t) y)) b)
(if (<= t_1 5e+305) 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 / t) * (z / (1.0 + fma(b, (y / t), a)));
} else if (t_1 <= -1e-297) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_1 <= 5e+305) {
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 / t) * Float64(z / Float64(1.0 + fma(b, Float64(y / t), a)))); elseif (t_1 <= -1e-297) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t_1 <= 5e+305) 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 / t), $MachinePrecision] * N[(z / N[(1.0 + N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-297], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], 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}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-297}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;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 32.6%
*-commutative32.6%
associate-/l*50.7%
associate-*l/45.3%
Simplified45.3%
Taylor expanded in x around 0 58.5%
times-frac90.2%
associate-*l/85.0%
*-commutative85.0%
fma-def85.0%
Simplified85.0%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.00000000000000004e-297 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000009e305Initial program 99.2%
if -1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 52.1%
*-commutative52.1%
associate-/l*44.1%
associate-*l/51.3%
Simplified51.3%
Taylor expanded in b around inf 53.8%
Taylor expanded in t around 0 70.9%
+-commutative70.9%
times-frac67.2%
Simplified67.2%
Taylor expanded in b around 0 73.8%
if 5.00000000000000009e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.0%
*-commutative13.0%
associate-/l*22.0%
associate-*l/26.1%
Simplified26.1%
Taylor expanded in t around 0 82.6%
Final simplification93.0%
(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 -1e-105)
t_1
(if (<= t_1 -5e-323)
(/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_1 0.0)
(/ (+ z (/ (* x t) y)) b)
(if (<= t_1 5e+305) 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 <= -1e-105) {
tmp = t_1;
} else if (t_1 <= -5e-323) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else if (t_1 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_1 <= 5e+305) {
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 <= -1e-105) {
tmp = t_1;
} else if (t_1 <= -5e-323) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else if (t_1 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_1 <= 5e+305) {
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 <= -1e-105: tmp = t_1 elif t_1 <= -5e-323: tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))) elif t_1 <= 0.0: tmp = (z + ((x * t) / y)) / b elif t_1 <= 5e+305: 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 <= -1e-105) tmp = t_1; elseif (t_1 <= -5e-323) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_1 <= 0.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t_1 <= 5e+305) 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 <= -1e-105) tmp = t_1; elseif (t_1 <= -5e-323) tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))); elseif (t_1 <= 0.0) tmp = (z + ((x * t) / y)) / b; elseif (t_1 <= 5e+305) 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, -1e-105], t$95$1, If[LessEqual[t$95$1, -5e-323], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], 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 -1 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-323}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;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 32.6%
*-commutative32.6%
associate-/l*50.7%
associate-*l/45.3%
Simplified45.3%
Taylor expanded in x around 0 58.5%
Taylor expanded in t around 0 58.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.99999999999999965e-106 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000009e305Initial program 99.7%
if -9.99999999999999965e-106 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.94066e-323Initial program 95.0%
*-commutative95.0%
associate-/l*99.6%
associate-*l/99.6%
Simplified99.6%
if -4.94066e-323 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 51.9%
*-commutative51.9%
associate-/l*38.6%
associate-*l/46.5%
Simplified46.5%
Taylor expanded in b around inf 58.4%
Taylor expanded in t around 0 72.5%
+-commutative72.5%
times-frac68.5%
Simplified68.5%
Taylor expanded in b around 0 75.8%
if 5.00000000000000009e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.0%
*-commutative13.0%
associate-/l*22.0%
associate-*l/26.1%
Simplified26.1%
Taylor expanded in t around 0 82.6%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0))))
(t_3 (+ 1.0 (+ a t_1))))
(if (<= t_2 -1e-297)
(+ (/ (* y z) (* t t_3)) (/ x t_3))
(if (<= t_2 0.0)
(/ (+ z (/ (* x t) y)) b)
(if (<= t_2 5e+305) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -1e-297) {
tmp = ((y * z) / (t * t_3)) + (x / t_3);
} else if (t_2 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_2 <= 5e+305) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * b) / t
t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0d0))
t_3 = 1.0d0 + (a + t_1)
if (t_2 <= (-1d-297)) then
tmp = ((y * z) / (t * t_3)) + (x / t_3)
else if (t_2 <= 0.0d0) then
tmp = (z + ((x * t) / y)) / b
else if (t_2 <= 5d+305) then
tmp = t_2
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -1e-297) {
tmp = ((y * z) / (t * t_3)) + (x / t_3);
} else if (t_2 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_2 <= 5e+305) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) t_3 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -1e-297: tmp = ((y * z) / (t * t_3)) + (x / t_3) elif t_2 <= 0.0: tmp = (z + ((x * t) / y)) / b elif t_2 <= 5e+305: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) t_3 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= -1e-297) tmp = Float64(Float64(Float64(y * z) / Float64(t * t_3)) + Float64(x / t_3)); elseif (t_2 <= 0.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t_2 <= 5e+305) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); t_3 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -1e-297) tmp = ((y * z) / (t * t_3)) + (x / t_3); elseif (t_2 <= 0.0) tmp = (z + ((x * t) / y)) / b; elseif (t_2 <= 5e+305) tmp = t_2; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-297], N[(N[(N[(y * z), $MachinePrecision] / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(x / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$2, 5e+305], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1 + \left(a + 1\right)}\\
t_3 := 1 + \left(a + t_1\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-297}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot t_3} + \frac{x}{t_3}\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;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))) < -1.00000000000000004e-297Initial program 86.2%
*-commutative86.2%
associate-/l*89.1%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in x around 0 90.4%
if -1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 52.1%
*-commutative52.1%
associate-/l*44.1%
associate-*l/51.3%
Simplified51.3%
Taylor expanded in b around inf 53.8%
Taylor expanded in t around 0 70.9%
+-commutative70.9%
times-frac67.2%
Simplified67.2%
Taylor expanded in b around 0 73.8%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000009e305Initial program 99.7%
if 5.00000000000000009e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 13.0%
*-commutative13.0%
associate-/l*22.0%
associate-*l/26.1%
Simplified26.1%
Taylor expanded in t around 0 82.6%
Final simplification90.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ (* y b) t))
(t_3 (+ 1.0 t_2))
(t_4 (/ t_1 t_3))
(t_5 (+ (/ z b) (/ x (+ 1.0 (+ a t_2))))))
(if (<= a -5.2e+140)
(/ t_1 a)
(if (<= a -6.5e-114)
t_5
(if (<= a -3.4e-305)
t_4
(if (<= a 3.5e-228)
(+ (/ z b) (/ x t_3))
(if (<= a 1.12e-42)
t_4
(if (<= a 1.6e+150) t_5 (/ t_1 (+ a 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = (y * b) / t;
double t_3 = 1.0 + t_2;
double t_4 = t_1 / t_3;
double t_5 = (z / b) + (x / (1.0 + (a + t_2)));
double tmp;
if (a <= -5.2e+140) {
tmp = t_1 / a;
} else if (a <= -6.5e-114) {
tmp = t_5;
} else if (a <= -3.4e-305) {
tmp = t_4;
} else if (a <= 3.5e-228) {
tmp = (z / b) + (x / t_3);
} else if (a <= 1.12e-42) {
tmp = t_4;
} else if (a <= 1.6e+150) {
tmp = t_5;
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = (y * b) / t
t_3 = 1.0d0 + t_2
t_4 = t_1 / t_3
t_5 = (z / b) + (x / (1.0d0 + (a + t_2)))
if (a <= (-5.2d+140)) then
tmp = t_1 / a
else if (a <= (-6.5d-114)) then
tmp = t_5
else if (a <= (-3.4d-305)) then
tmp = t_4
else if (a <= 3.5d-228) then
tmp = (z / b) + (x / t_3)
else if (a <= 1.12d-42) then
tmp = t_4
else if (a <= 1.6d+150) then
tmp = t_5
else
tmp = t_1 / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = (y * b) / t;
double t_3 = 1.0 + t_2;
double t_4 = t_1 / t_3;
double t_5 = (z / b) + (x / (1.0 + (a + t_2)));
double tmp;
if (a <= -5.2e+140) {
tmp = t_1 / a;
} else if (a <= -6.5e-114) {
tmp = t_5;
} else if (a <= -3.4e-305) {
tmp = t_4;
} else if (a <= 3.5e-228) {
tmp = (z / b) + (x / t_3);
} else if (a <= 1.12e-42) {
tmp = t_4;
} else if (a <= 1.6e+150) {
tmp = t_5;
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = (y * b) / t t_3 = 1.0 + t_2 t_4 = t_1 / t_3 t_5 = (z / b) + (x / (1.0 + (a + t_2))) tmp = 0 if a <= -5.2e+140: tmp = t_1 / a elif a <= -6.5e-114: tmp = t_5 elif a <= -3.4e-305: tmp = t_4 elif a <= 3.5e-228: tmp = (z / b) + (x / t_3) elif a <= 1.12e-42: tmp = t_4 elif a <= 1.6e+150: tmp = t_5 else: tmp = t_1 / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(Float64(y * b) / t) t_3 = Float64(1.0 + t_2) t_4 = Float64(t_1 / t_3) t_5 = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(a + t_2)))) tmp = 0.0 if (a <= -5.2e+140) tmp = Float64(t_1 / a); elseif (a <= -6.5e-114) tmp = t_5; elseif (a <= -3.4e-305) tmp = t_4; elseif (a <= 3.5e-228) tmp = Float64(Float64(z / b) + Float64(x / t_3)); elseif (a <= 1.12e-42) tmp = t_4; elseif (a <= 1.6e+150) tmp = t_5; else tmp = Float64(t_1 / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = (y * b) / t; t_3 = 1.0 + t_2; t_4 = t_1 / t_3; t_5 = (z / b) + (x / (1.0 + (a + t_2))); tmp = 0.0; if (a <= -5.2e+140) tmp = t_1 / a; elseif (a <= -6.5e-114) tmp = t_5; elseif (a <= -3.4e-305) tmp = t_4; elseif (a <= 3.5e-228) tmp = (z / b) + (x / t_3); elseif (a <= 1.12e-42) tmp = t_4; elseif (a <= 1.6e+150) tmp = t_5; else tmp = t_1 / (a + 1.0); 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[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(a + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.2e+140], N[(t$95$1 / a), $MachinePrecision], If[LessEqual[a, -6.5e-114], t$95$5, If[LessEqual[a, -3.4e-305], t$95$4, If[LessEqual[a, 3.5e-228], N[(N[(z / b), $MachinePrecision] + N[(x / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e-42], t$95$4, If[LessEqual[a, 1.6e+150], t$95$5, N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{y \cdot b}{t}\\
t_3 := 1 + t_2\\
t_4 := \frac{t_1}{t_3}\\
t_5 := \frac{z}{b} + \frac{x}{1 + \left(a + t_2\right)}\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{+140}:\\
\;\;\;\;\frac{t_1}{a}\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-114}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-305}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-228}:\\
\;\;\;\;\frac{z}{b} + \frac{x}{t_3}\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{-42}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+150}:\\
\;\;\;\;t_5\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a + 1}\\
\end{array}
\end{array}
if a < -5.2000000000000002e140Initial program 82.2%
*-commutative82.2%
associate-/l*86.6%
associate-*l/86.6%
Simplified86.6%
Taylor expanded in a around inf 80.9%
if -5.2000000000000002e140 < a < -6.4999999999999998e-114 or 1.1199999999999999e-42 < a < 1.60000000000000008e150Initial program 67.5%
*-commutative67.5%
associate-/l*68.5%
associate-*l/68.2%
Simplified68.2%
Taylor expanded in x around 0 77.1%
Taylor expanded in y around inf 75.7%
if -6.4999999999999998e-114 < a < -3.4000000000000001e-305 or 3.49999999999999975e-228 < a < 1.1199999999999999e-42Initial program 87.1%
+-commutative87.1%
associate-*l/89.4%
fma-def89.4%
associate-+l+89.4%
+-commutative89.4%
associate-*l/89.4%
fma-def89.4%
Simplified89.4%
Taylor expanded in a around 0 87.1%
if -3.4000000000000001e-305 < a < 3.49999999999999975e-228Initial program 65.0%
*-commutative65.0%
associate-/l*64.6%
associate-*l/61.0%
Simplified61.0%
Taylor expanded in x around 0 65.8%
Taylor expanded in y around inf 89.6%
Taylor expanded in a around 0 89.6%
if 1.60000000000000008e150 < a Initial program 76.5%
*-commutative76.5%
associate-/l*77.3%
associate-*l/79.9%
Simplified79.9%
Taylor expanded in b around 0 71.1%
Final simplification79.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ (+ a 1.0) (* b (/ y t)))))
(t_2 (+ (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t)))))))
(if (<= t -9.2e-108)
t_1
(if (<= t -1.65e-290)
t_2
(if (<= t 1.25e-204)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 2.1e-51) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
double t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t))));
double tmp;
if (t <= -9.2e-108) {
tmp = t_1;
} else if (t <= -1.65e-290) {
tmp = t_2;
} else if (t <= 1.25e-204) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2.1e-51) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x + (z * (y / t))) / ((a + 1.0d0) + (b * (y / t)))
t_2 = (z / b) + (x / (1.0d0 + (a + ((y * b) / t))))
if (t <= (-9.2d-108)) then
tmp = t_1
else if (t <= (-1.65d-290)) then
tmp = t_2
else if (t <= 1.25d-204) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 2.1d-51) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
double t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t))));
double tmp;
if (t <= -9.2e-108) {
tmp = t_1;
} else if (t <= -1.65e-290) {
tmp = t_2;
} else if (t <= 1.25e-204) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2.1e-51) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t))) t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t)))) tmp = 0 if t <= -9.2e-108: tmp = t_1 elif t <= -1.65e-290: tmp = t_2 elif t <= 1.25e-204: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 2.1e-51: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))) t_2 = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))) tmp = 0.0 if (t <= -9.2e-108) tmp = t_1; elseif (t <= -1.65e-290) tmp = t_2; elseif (t <= 1.25e-204) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 2.1e-51) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t))); t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t)))); tmp = 0.0; if (t <= -9.2e-108) tmp = t_1; elseif (t <= -1.65e-290) tmp = t_2; elseif (t <= 1.25e-204) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 2.1e-51) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e-108], t$95$1, If[LessEqual[t, -1.65e-290], t$95$2, If[LessEqual[t, 1.25e-204], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-51], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
t_2 := \frac{z}{b} + \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-290}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-204}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-51}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -9.19999999999999983e-108 or 2.10000000000000002e-51 < t Initial program 84.3%
*-commutative84.3%
associate-/l*90.0%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in z around 0 84.8%
associate-*l/92.9%
*-commutative92.9%
Simplified92.9%
if -9.19999999999999983e-108 < t < -1.64999999999999993e-290 or 1.25e-204 < t < 2.10000000000000002e-51Initial program 61.1%
*-commutative61.1%
associate-/l*56.9%
associate-*l/51.8%
Simplified51.8%
Taylor expanded in x around 0 71.9%
Taylor expanded in y around inf 79.9%
if -1.64999999999999993e-290 < t < 1.25e-204Initial program 58.1%
*-commutative58.1%
associate-/l*49.7%
associate-*l/45.9%
Simplified45.9%
Taylor expanded in x around 0 66.6%
Taylor expanded in t around 0 87.7%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (* b (/ y t)))))
(t_2 (+ (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t)))))))
(if (<= t -8.2e-108)
t_1
(if (<= t -4e-291)
t_2
(if (<= t 3.2e-204)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 1.08e-51) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
double t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t))));
double tmp;
if (t <= -8.2e-108) {
tmp = t_1;
} else if (t <= -4e-291) {
tmp = t_2;
} else if (t <= 3.2e-204) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 1.08e-51) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x + (z / (t / y))) / ((a + 1.0d0) + (b * (y / t)))
t_2 = (z / b) + (x / (1.0d0 + (a + ((y * b) / t))))
if (t <= (-8.2d-108)) then
tmp = t_1
else if (t <= (-4d-291)) then
tmp = t_2
else if (t <= 3.2d-204) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 1.08d-51) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
double t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t))));
double tmp;
if (t <= -8.2e-108) {
tmp = t_1;
} else if (t <= -4e-291) {
tmp = t_2;
} else if (t <= 3.2e-204) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 1.08e-51) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))) t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t)))) tmp = 0 if t <= -8.2e-108: tmp = t_1 elif t <= -4e-291: tmp = t_2 elif t <= 3.2e-204: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 1.08e-51: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))) t_2 = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))) tmp = 0.0 if (t <= -8.2e-108) tmp = t_1; elseif (t <= -4e-291) tmp = t_2; elseif (t <= 3.2e-204) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 1.08e-51) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))); t_2 = (z / b) + (x / (1.0 + (a + ((y * b) / t)))); tmp = 0.0; if (t <= -8.2e-108) tmp = t_1; elseif (t <= -4e-291) tmp = t_2; elseif (t <= 3.2e-204) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 1.08e-51) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-108], t$95$1, If[LessEqual[t, -4e-291], t$95$2, If[LessEqual[t, 3.2e-204], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.08e-51], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
t_2 := \frac{z}{b} + \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4 \cdot 10^{-291}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{-51}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -8.20000000000000074e-108 or 1.08000000000000004e-51 < t Initial program 84.3%
*-commutative84.3%
associate-/l*90.0%
associate-*l/92.9%
Simplified92.9%
if -8.20000000000000074e-108 < t < -3.99999999999999985e-291 or 3.2e-204 < t < 1.08000000000000004e-51Initial program 61.1%
*-commutative61.1%
associate-/l*56.9%
associate-*l/51.8%
Simplified51.8%
Taylor expanded in x around 0 71.9%
Taylor expanded in y around inf 79.9%
if -3.99999999999999985e-291 < t < 3.2e-204Initial program 58.1%
*-commutative58.1%
associate-/l*49.7%
associate-*l/45.9%
Simplified45.9%
Taylor expanded in x around 0 66.6%
Taylor expanded in t around 0 87.7%
Final simplification88.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -3.2e-30)
(and (not (<= y 7.5e-129))
(or (<= y 1.85e-20) (not (<= y 1.65e+44)))))
(+ (/ z b) (/ x (+ 1.0 (+ a (/ (* y b) t)))))
(/ (+ 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 <= -3.2e-30) || (!(y <= 7.5e-129) && ((y <= 1.85e-20) || !(y <= 1.65e+44)))) {
tmp = (z / b) + (x / (1.0 + (a + ((y * b) / t))));
} 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 <= (-3.2d-30)) .or. (.not. (y <= 7.5d-129)) .and. (y <= 1.85d-20) .or. (.not. (y <= 1.65d+44))) then
tmp = (z / b) + (x / (1.0d0 + (a + ((y * b) / t))))
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 <= -3.2e-30) || (!(y <= 7.5e-129) && ((y <= 1.85e-20) || !(y <= 1.65e+44)))) {
tmp = (z / b) + (x / (1.0 + (a + ((y * b) / t))));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.2e-30) or (not (y <= 7.5e-129) and ((y <= 1.85e-20) or not (y <= 1.65e+44))): tmp = (z / b) + (x / (1.0 + (a + ((y * b) / t)))) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.2e-30) || (!(y <= 7.5e-129) && ((y <= 1.85e-20) || !(y <= 1.65e+44)))) tmp = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); 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 <= -3.2e-30) || (~((y <= 7.5e-129)) && ((y <= 1.85e-20) || ~((y <= 1.65e+44))))) tmp = (z / b) + (x / (1.0 + (a + ((y * b) / t)))); 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, -3.2e-30], And[N[Not[LessEqual[y, 7.5e-129]], $MachinePrecision], Or[LessEqual[y, 1.85e-20], N[Not[LessEqual[y, 1.65e+44]], $MachinePrecision]]]], N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -3.2 \cdot 10^{-30} \lor \neg \left(y \leq 7.5 \cdot 10^{-129}\right) \land \left(y \leq 1.85 \cdot 10^{-20} \lor \neg \left(y \leq 1.65 \cdot 10^{+44}\right)\right):\\
\;\;\;\;\frac{z}{b} + \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -3.2e-30 or 7.49999999999999944e-129 < y < 1.85e-20 or 1.65000000000000007e44 < y Initial program 61.5%
*-commutative61.5%
associate-/l*63.7%
associate-*l/63.9%
Simplified63.9%
Taylor expanded in x around 0 66.4%
Taylor expanded in y around inf 70.9%
if -3.2e-30 < y < 7.49999999999999944e-129 or 1.85e-20 < y < 1.65000000000000007e44Initial program 93.7%
*-commutative93.7%
associate-/l*94.1%
associate-*l/93.4%
Simplified93.4%
Taylor expanded in b around 0 84.6%
Final simplification76.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -3.4e+15)
(not (or (<= y 1.2e-126) (and (not (<= y 8.2e-38)) (<= y 6.8e+43)))))
(/ (+ z (/ (* x t) y)) 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 <= -3.4e+15) || !((y <= 1.2e-126) || (!(y <= 8.2e-38) && (y <= 6.8e+43)))) {
tmp = (z + ((x * t) / y)) / 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 <= (-3.4d+15)) .or. (.not. (y <= 1.2d-126) .or. (.not. (y <= 8.2d-38)) .and. (y <= 6.8d+43))) then
tmp = (z + ((x * t) / y)) / 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 <= -3.4e+15) || !((y <= 1.2e-126) || (!(y <= 8.2e-38) && (y <= 6.8e+43)))) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.4e+15) or not ((y <= 1.2e-126) or (not (y <= 8.2e-38) and (y <= 6.8e+43))): tmp = (z + ((x * t) / y)) / 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 <= -3.4e+15) || !((y <= 1.2e-126) || (!(y <= 8.2e-38) && (y <= 6.8e+43)))) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / 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 <= -3.4e+15) || ~(((y <= 1.2e-126) || (~((y <= 8.2e-38)) && (y <= 6.8e+43))))) tmp = (z + ((x * t) / y)) / 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, -3.4e+15], N[Not[Or[LessEqual[y, 1.2e-126], And[N[Not[LessEqual[y, 8.2e-38]], $MachinePrecision], LessEqual[y, 6.8e+43]]]], $MachinePrecision]], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $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 -3.4 \cdot 10^{+15} \lor \neg \left(y \leq 1.2 \cdot 10^{-126} \lor \neg \left(y \leq 8.2 \cdot 10^{-38}\right) \land y \leq 6.8 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -3.4e15 or 1.20000000000000003e-126 < y < 8.1999999999999996e-38 or 6.80000000000000024e43 < y Initial program 60.4%
*-commutative60.4%
associate-/l*61.4%
associate-*l/61.6%
Simplified61.6%
Taylor expanded in b around inf 42.9%
Taylor expanded in t around 0 67.4%
+-commutative67.4%
times-frac63.1%
Simplified63.1%
Taylor expanded in b around 0 67.9%
if -3.4e15 < y < 1.20000000000000003e-126 or 8.1999999999999996e-38 < y < 6.80000000000000024e43Initial program 90.1%
*-commutative90.1%
associate-/l*91.9%
associate-*l/91.3%
Simplified91.3%
Taylor expanded in b around 0 80.0%
Final simplification73.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0)))
(t_2 (+ (/ z b) (/ x (+ 1.0 (/ (* y b) t))))))
(if (<= y -2.5e-30)
t_2
(if (<= y 1.2e-126)
t_1
(if (<= y 8.6e-22)
t_2
(if (<= y 3.1e+43) t_1 (/ (+ z (/ (* x t) y)) 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);
double t_2 = (z / b) + (x / (1.0 + ((y * b) / t)));
double tmp;
if (y <= -2.5e-30) {
tmp = t_2;
} else if (y <= 1.2e-126) {
tmp = t_1;
} else if (y <= 8.6e-22) {
tmp = t_2;
} else if (y <= 3.1e+43) {
tmp = t_1;
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
t_2 = (z / b) + (x / (1.0d0 + ((y * b) / t)))
if (y <= (-2.5d-30)) then
tmp = t_2
else if (y <= 1.2d-126) then
tmp = t_1
else if (y <= 8.6d-22) then
tmp = t_2
else if (y <= 3.1d+43) then
tmp = t_1
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double t_2 = (z / b) + (x / (1.0 + ((y * b) / t)));
double tmp;
if (y <= -2.5e-30) {
tmp = t_2;
} else if (y <= 1.2e-126) {
tmp = t_1;
} else if (y <= 8.6e-22) {
tmp = t_2;
} else if (y <= 3.1e+43) {
tmp = t_1;
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (a + 1.0) t_2 = (z / b) + (x / (1.0 + ((y * b) / t))) tmp = 0 if y <= -2.5e-30: tmp = t_2 elif y <= 1.2e-126: tmp = t_1 elif y <= 8.6e-22: tmp = t_2 elif y <= 3.1e+43: tmp = t_1 else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)) t_2 = Float64(Float64(z / b) + Float64(x / Float64(1.0 + Float64(Float64(y * b) / t)))) tmp = 0.0 if (y <= -2.5e-30) tmp = t_2; elseif (y <= 1.2e-126) tmp = t_1; elseif (y <= 8.6e-22) tmp = t_2; elseif (y <= 3.1e+43) tmp = t_1; else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (a + 1.0); t_2 = (z / b) + (x / (1.0 + ((y * b) / t))); tmp = 0.0; if (y <= -2.5e-30) tmp = t_2; elseif (y <= 1.2e-126) tmp = t_1; elseif (y <= 8.6e-22) tmp = t_2; elseif (y <= 3.1e+43) tmp = t_1; else tmp = (z + ((x * t) / y)) / 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[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.5e-30], t$95$2, If[LessEqual[y, 1.2e-126], t$95$1, If[LessEqual[y, 8.6e-22], t$95$2, If[LessEqual[y, 3.1e+43], t$95$1, N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
t_2 := \frac{z}{b} + \frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-30}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.6 \cdot 10^{-22}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if y < -2.49999999999999986e-30 or 1.20000000000000003e-126 < y < 8.60000000000000075e-22Initial program 68.5%
*-commutative68.5%
associate-/l*71.3%
associate-*l/71.3%
Simplified71.3%
Taylor expanded in x around 0 69.9%
Taylor expanded in y around inf 73.5%
Taylor expanded in a around 0 68.9%
if -2.49999999999999986e-30 < y < 1.20000000000000003e-126 or 8.60000000000000075e-22 < y < 3.1000000000000002e43Initial program 93.7%
*-commutative93.7%
associate-/l*94.1%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in b around 0 84.8%
if 3.1000000000000002e43 < y Initial program 51.5%
*-commutative51.5%
associate-/l*52.8%
associate-*l/53.2%
Simplified53.2%
Taylor expanded in b around inf 34.1%
Taylor expanded in t around 0 64.4%
+-commutative64.4%
times-frac65.2%
Simplified65.2%
Taylor expanded in b around 0 66.0%
Final simplification74.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (/ (* x t) y)) b)))
(if (<= y -4e-56)
t_1
(if (<= y 1.2e-126)
(/ x (+ a 1.0))
(if (or (<= y 3.15e-18) (not (<= y 6.6e+44)))
t_1
(/ (+ x (/ (* y z) t)) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + ((x * t) / y)) / b;
double tmp;
if (y <= -4e-56) {
tmp = t_1;
} else if (y <= 1.2e-126) {
tmp = x / (a + 1.0);
} else if ((y <= 3.15e-18) || !(y <= 6.6e+44)) {
tmp = t_1;
} else {
tmp = (x + ((y * z) / t)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + ((x * t) / y)) / b
if (y <= (-4d-56)) then
tmp = t_1
else if (y <= 1.2d-126) then
tmp = x / (a + 1.0d0)
else if ((y <= 3.15d-18) .or. (.not. (y <= 6.6d+44))) then
tmp = t_1
else
tmp = (x + ((y * z) / t)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + ((x * t) / y)) / b;
double tmp;
if (y <= -4e-56) {
tmp = t_1;
} else if (y <= 1.2e-126) {
tmp = x / (a + 1.0);
} else if ((y <= 3.15e-18) || !(y <= 6.6e+44)) {
tmp = t_1;
} else {
tmp = (x + ((y * z) / t)) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + ((x * t) / y)) / b tmp = 0 if y <= -4e-56: tmp = t_1 elif y <= 1.2e-126: tmp = x / (a + 1.0) elif (y <= 3.15e-18) or not (y <= 6.6e+44): tmp = t_1 else: tmp = (x + ((y * z) / t)) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b) tmp = 0.0 if (y <= -4e-56) tmp = t_1; elseif (y <= 1.2e-126) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 3.15e-18) || !(y <= 6.6e+44)) tmp = t_1; else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + ((x * t) / y)) / b; tmp = 0.0; if (y <= -4e-56) tmp = t_1; elseif (y <= 1.2e-126) tmp = x / (a + 1.0); elseif ((y <= 3.15e-18) || ~((y <= 6.6e+44))) tmp = t_1; else tmp = (x + ((y * z) / t)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -4e-56], t$95$1, If[LessEqual[y, 1.2e-126], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 3.15e-18], N[Not[LessEqual[y, 6.6e+44]], $MachinePrecision]], t$95$1, N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{if}\;y \leq -4 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-126}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 3.15 \cdot 10^{-18} \lor \neg \left(y \leq 6.6 \cdot 10^{+44}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\end{array}
\end{array}
if y < -4.0000000000000002e-56 or 1.20000000000000003e-126 < y < 3.1500000000000002e-18 or 6.60000000000000027e44 < y Initial program 62.0%
*-commutative62.0%
associate-/l*64.2%
associate-*l/64.3%
Simplified64.3%
Taylor expanded in b around inf 40.6%
Taylor expanded in t around 0 64.2%
+-commutative64.2%
times-frac60.5%
Simplified60.5%
Taylor expanded in b around 0 64.0%
if -4.0000000000000002e-56 < y < 1.20000000000000003e-126Initial program 93.8%
*-commutative93.8%
associate-/l*94.6%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around inf 65.7%
if 3.1500000000000002e-18 < y < 6.60000000000000027e44Initial program 92.5%
*-commutative92.5%
associate-/l*90.2%
associate-*l/85.6%
Simplified85.6%
Taylor expanded in a around inf 77.3%
Final simplification65.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.9e-57) (not (<= t 3.7e-14))) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.9e-57) || !(t <= 3.7e-14)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-5.9d-57)) .or. (.not. (t <= 3.7d-14))) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.9e-57) || !(t <= 3.7e-14)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.9e-57) or not (t <= 3.7e-14): tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.9e-57) || !(t <= 3.7e-14)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.9e-57) || ~((t <= 3.7e-14))) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.9e-57], N[Not[LessEqual[t, 3.7e-14]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.9 \cdot 10^{-57} \lor \neg \left(t \leq 3.7 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -5.9000000000000003e-57 or 3.70000000000000001e-14 < t Initial program 84.4%
*-commutative84.4%
associate-/l*90.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in x around inf 64.5%
if -5.9000000000000003e-57 < t < 3.70000000000000001e-14Initial program 65.0%
*-commutative65.0%
associate-/l*61.8%
associate-*l/57.0%
Simplified57.0%
Taylor expanded in b around inf 40.0%
Taylor expanded in t around 0 66.0%
+-commutative66.0%
times-frac61.7%
Simplified61.7%
Taylor expanded in b around 0 65.3%
Final simplification64.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.4e-51) (not (<= t 6.4e-13))) (/ x (+ (+ a 1.0) (* b (/ y t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e-51) || !(t <= 6.4e-13)) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.4d-51)) .or. (.not. (t <= 6.4d-13))) then
tmp = x / ((a + 1.0d0) + (b * (y / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.4e-51) || !(t <= 6.4e-13)) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.4e-51) or not (t <= 6.4e-13): tmp = x / ((a + 1.0) + (b * (y / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.4e-51) || !(t <= 6.4e-13)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.4e-51) || ~((t <= 6.4e-13))) tmp = x / ((a + 1.0) + (b * (y / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.4e-51], N[Not[LessEqual[t, 6.4e-13]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{-51} \lor \neg \left(t \leq 6.4 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -1.4e-51 or 6.39999999999999999e-13 < t Initial program 84.4%
*-commutative84.4%
associate-/l*90.4%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in x around inf 67.2%
if -1.4e-51 < t < 6.39999999999999999e-13Initial program 65.0%
*-commutative65.0%
associate-/l*61.8%
associate-*l/57.0%
Simplified57.0%
Taylor expanded in b around inf 40.0%
Taylor expanded in t around 0 66.0%
+-commutative66.0%
times-frac61.7%
Simplified61.7%
Taylor expanded in b around 0 65.3%
Final simplification66.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.1e+110) (not (<= t 28.0))) (/ x (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.1e+110) || !(t <= 28.0)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.1d+110)) .or. (.not. (t <= 28.0d0))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.1e+110) || !(t <= 28.0)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.1e+110) or not (t <= 28.0): tmp = x / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.1e+110) || !(t <= 28.0)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.1e+110) || ~((t <= 28.0))) tmp = x / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.1e+110], N[Not[LessEqual[t, 28.0]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.1 \cdot 10^{+110} \lor \neg \left(t \leq 28\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.0999999999999999e110 or 28 < t Initial program 83.4%
*-commutative83.4%
associate-/l*90.8%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in t around inf 66.9%
if -4.0999999999999999e110 < t < 28Initial program 70.1%
*-commutative70.1%
associate-/l*68.2%
associate-*l/65.1%
Simplified65.1%
Taylor expanded in b around inf 39.0%
Taylor expanded in t around 0 61.4%
+-commutative61.4%
times-frac57.5%
Simplified57.5%
Taylor expanded in b around 0 60.3%
Final simplification62.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.2e-71)
t_1
(if (<= t -1.05e-107)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t 27000.0) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3.2e-71) {
tmp = t_1;
} else if (t <= -1.05e-107) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 27000.0) {
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 = x / (a + 1.0d0)
if (t <= (-3.2d-71)) then
tmp = t_1
else if (t <= (-1.05d-107)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= 27000.0d0) 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 = x / (a + 1.0);
double tmp;
if (t <= -3.2e-71) {
tmp = t_1;
} else if (t <= -1.05e-107) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 27000.0) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -3.2e-71: tmp = t_1 elif t <= -1.05e-107: tmp = (y / t) * (z / (a + 1.0)) elif t <= 27000.0: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -3.2e-71) tmp = t_1; elseif (t <= -1.05e-107) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= 27000.0) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -3.2e-71) tmp = t_1; elseif (t <= -1.05e-107) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= 27000.0) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-71], t$95$1, If[LessEqual[t, -1.05e-107], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 27000.0], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-107}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 27000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.1999999999999999e-71 or 27000 < t Initial program 83.2%
*-commutative83.2%
associate-/l*89.4%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in t around inf 57.9%
if -3.1999999999999999e-71 < t < -1.05e-107Initial program 82.6%
*-commutative82.6%
associate-/l*90.9%
associate-*l/82.3%
Simplified82.3%
Taylor expanded in x around 0 49.1%
Taylor expanded in y around 0 47.6%
times-frac56.0%
Simplified56.0%
if -1.05e-107 < t < 27000Initial program 65.3%
*-commutative65.3%
associate-/l*61.1%
associate-*l/56.9%
Simplified56.9%
Taylor expanded in t around 0 62.5%
Final simplification59.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.46e-105) (/ x (+ 1.0 (* y (/ b t)))) (if (<= t 75.0) (/ z b) (/ x (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.46e-105) {
tmp = x / (1.0 + (y * (b / t)));
} else if (t <= 75.0) {
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 (t <= (-1.46d-105)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (t <= 75.0d0) 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 (t <= -1.46e-105) {
tmp = x / (1.0 + (y * (b / t)));
} else if (t <= 75.0) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.46e-105: tmp = x / (1.0 + (y * (b / t))) elif t <= 75.0: tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.46e-105) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (t <= 75.0) 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 (t <= -1.46e-105) tmp = x / (1.0 + (y * (b / t))); elseif (t <= 75.0) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.46e-105], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 75.0], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.46 \cdot 10^{-105}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 75:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if t < -1.45999999999999998e-105Initial program 83.9%
*-commutative83.9%
associate-/l*89.6%
associate-*l/91.1%
Simplified91.1%
Taylor expanded in x around inf 58.2%
Taylor expanded in a around 0 43.9%
associate-*r/45.4%
Simplified45.4%
if -1.45999999999999998e-105 < t < 75Initial program 65.1%
*-commutative65.1%
associate-/l*61.7%
associate-*l/57.6%
Simplified57.6%
Taylor expanded in t around 0 62.4%
if 75 < t Initial program 83.3%
*-commutative83.3%
associate-/l*89.1%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in t around inf 67.8%
Final simplification59.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.15e-34) (not (<= t 66.0))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.15e-34) || !(t <= 66.0)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.15d-34)) .or. (.not. (t <= 66.0d0))) then
tmp = x / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.15e-34) || !(t <= 66.0)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.15e-34) or not (t <= 66.0): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.15e-34) || !(t <= 66.0)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.15e-34) || ~((t <= 66.0))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.15e-34], N[Not[LessEqual[t, 66.0]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-34} \lor \neg \left(t \leq 66\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.15000000000000006e-34 or 66 < t Initial program 83.8%
*-commutative83.8%
associate-/l*90.3%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in t around inf 59.8%
if -1.15000000000000006e-34 < t < 66Initial program 67.1%
*-commutative67.1%
associate-/l*64.1%
associate-*l/59.7%
Simplified59.7%
Taylor expanded in t around 0 57.0%
Final simplification58.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -5.8e+23) (/ x a) (if (<= a 1.8e-6) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.8e+23) {
tmp = x / a;
} else if (a <= 1.8e-6) {
tmp = x;
} 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 (a <= (-5.8d+23)) then
tmp = x / a
else if (a <= 1.8d-6) then
tmp = x
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 (a <= -5.8e+23) {
tmp = x / a;
} else if (a <= 1.8e-6) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5.8e+23: tmp = x / a elif a <= 1.8e-6: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5.8e+23) tmp = Float64(x / a); elseif (a <= 1.8e-6) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5.8e+23) tmp = x / a; elseif (a <= 1.8e-6) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.8e+23], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.8e-6], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+23}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-6}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -5.80000000000000025e23 or 1.79999999999999992e-6 < a Initial program 74.2%
*-commutative74.2%
associate-/l*76.0%
associate-*l/75.8%
Simplified75.8%
Taylor expanded in x around inf 47.3%
Taylor expanded in a around inf 45.0%
if -5.80000000000000025e23 < a < 1.79999999999999992e-6Initial program 75.5%
*-commutative75.5%
associate-/l*76.6%
associate-*l/76.5%
Simplified76.5%
Taylor expanded in x around inf 42.3%
Taylor expanded in a around 0 42.0%
associate-*r/42.7%
Simplified42.7%
Taylor expanded in y around 0 30.7%
Final simplification37.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.3e+130) x (if (<= t 6.6e+35) (/ z b) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.3e+130) {
tmp = x;
} else if (t <= 6.6e+35) {
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 <= (-2.3d+130)) then
tmp = x
else if (t <= 6.6d+35) 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 <= -2.3e+130) {
tmp = x;
} else if (t <= 6.6e+35) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.3e+130: tmp = x elif t <= 6.6e+35: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.3e+130) tmp = x; elseif (t <= 6.6e+35) 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 <= -2.3e+130) tmp = x; elseif (t <= 6.6e+35) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.3e+130], x, If[LessEqual[t, 6.6e+35], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+130}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -2.30000000000000021e130Initial program 80.5%
*-commutative80.5%
associate-/l*94.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in x around inf 66.6%
Taylor expanded in a around 0 43.0%
associate-*r/47.9%
Simplified47.9%
Taylor expanded in y around 0 42.3%
if -2.30000000000000021e130 < t < 6.6000000000000003e35Initial program 71.9%
*-commutative71.9%
associate-/l*70.1%
associate-*l/67.3%
Simplified67.3%
Taylor expanded in t around 0 51.6%
if 6.6000000000000003e35 < t Initial program 81.4%
*-commutative81.4%
associate-/l*87.8%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in x around inf 70.5%
Taylor expanded in a around inf 47.8%
Final simplification49.9%
(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*76.3%
associate-*l/76.1%
Simplified76.1%
Taylor expanded in x around inf 44.8%
Taylor expanded in a around 0 25.8%
associate-*r/25.7%
Simplified25.7%
Taylor expanded in y around 0 17.5%
Final simplification17.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 2023174
(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))))