
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))
(if (<= t_1 -1e-81)
t_1
(if (<= t_1 0.0)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_1 5e+298)
t_1
(if (<= t_1 INFINITY)
(* y (/ z (* t (+ (fma y (/ b t) a) 1.0))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
} else if (t_1 <= -1e-81) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = y * (z / (t * (fma(y, (b / t), a) + 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))))); elseif (t_1 <= -1e-81) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(y * Float64(z / Float64(t * Float64(fma(y, Float64(b / t), a) + 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-81], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], t$95$1, If[LessEqual[t$95$1, Infinity], N[(y * N[(z / N[(t * N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 25.7%
associate-/l*46.2%
associate-/l*45.5%
Simplified45.5%
Taylor expanded in x around 0 58.8%
times-frac93.1%
associate-+r+93.1%
associate-*r/85.6%
Simplified85.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999996e-82 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 99.8%
if -9.9999999999999996e-82 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 73.4%
associate-/l*73.4%
associate-/l*83.5%
Simplified83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr83.5%
if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 22.4%
associate-/l*56.9%
associate-/l*56.9%
Simplified56.9%
Taylor expanded in x around 0 56.6%
associate-/r*22.4%
+-commutative22.4%
associate-*r/22.0%
+-commutative22.0%
associate-+r+22.0%
associate-*r/22.4%
associate-*l/22.4%
*-commutative22.4%
fma-undefine22.4%
associate-*r/48.3%
associate-/l*56.8%
associate-/r*90.9%
fma-undefine90.9%
*-commutative90.9%
associate-*l/90.7%
associate-*r/81.8%
associate-+r+81.8%
+-commutative81.8%
associate-*r/90.7%
+-commutative90.7%
Simplified90.9%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.9%
associate-/l*12.9%
Simplified12.9%
Taylor expanded in y around inf 93.8%
Final simplification93.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (* (/ y t) (/ z (+ (+ a 1.0) (* b (/ y t)))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -1e-81)
t_1
(if (<= t_1 0.0)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_1 5e+298) t_1 (if (<= t_1 INFINITY) t_2 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -1e-81) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double t_2 = (y / t) * (z / ((a + 1.0) + (b * (y / t))));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= -1e-81) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_1 <= 5e+298) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) t_2 = (y / t) * (z / ((a + 1.0) + (b * (y / t)))) tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= -1e-81: tmp = t_1 elif t_1 <= 0.0: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) elif t_1 <= 5e+298: tmp = t_1 elif t_1 <= math.inf: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) t_2 = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -1e-81) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); t_2 = (y / t) * (z / ((a + 1.0) + (b * (y / t)))); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= -1e-81) tmp = t_1; elseif (t_1 <= 0.0) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); elseif (t_1 <= 5e+298) tmp = t_1; elseif (t_1 <= Inf) 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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -1e-81], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+298], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
t_2 := \frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 24.3%
associate-/l*50.9%
associate-/l*50.5%
Simplified50.5%
Taylor expanded in x around 0 57.8%
times-frac88.5%
associate-+r+88.5%
associate-*r/84.1%
Simplified84.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999996e-82 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298Initial program 99.8%
if -9.9999999999999996e-82 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 73.4%
associate-/l*73.4%
associate-/l*83.5%
Simplified83.5%
clear-num83.5%
un-div-inv83.5%
Applied egg-rr83.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.9%
associate-/l*12.9%
Simplified12.9%
Taylor expanded in y around inf 93.8%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -0.00072)
(/ x a)
(if (<= a -1.8e-73)
x
(if (<= a -1.45e-195)
(/ z b)
(if (<= a 3.6e-255)
x
(if (<= a 2.9e-207) (/ z b) (if (<= a 1.0) x (/ x a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -0.00072) {
tmp = x / a;
} else if (a <= -1.8e-73) {
tmp = x;
} else if (a <= -1.45e-195) {
tmp = z / b;
} else if (a <= 3.6e-255) {
tmp = x;
} else if (a <= 2.9e-207) {
tmp = z / b;
} else if (a <= 1.0) {
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 <= (-0.00072d0)) then
tmp = x / a
else if (a <= (-1.8d-73)) then
tmp = x
else if (a <= (-1.45d-195)) then
tmp = z / b
else if (a <= 3.6d-255) then
tmp = x
else if (a <= 2.9d-207) then
tmp = z / b
else if (a <= 1.0d0) 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 <= -0.00072) {
tmp = x / a;
} else if (a <= -1.8e-73) {
tmp = x;
} else if (a <= -1.45e-195) {
tmp = z / b;
} else if (a <= 3.6e-255) {
tmp = x;
} else if (a <= 2.9e-207) {
tmp = z / b;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -0.00072: tmp = x / a elif a <= -1.8e-73: tmp = x elif a <= -1.45e-195: tmp = z / b elif a <= 3.6e-255: tmp = x elif a <= 2.9e-207: tmp = z / b elif a <= 1.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -0.00072) tmp = Float64(x / a); elseif (a <= -1.8e-73) tmp = x; elseif (a <= -1.45e-195) tmp = Float64(z / b); elseif (a <= 3.6e-255) tmp = x; elseif (a <= 2.9e-207) tmp = Float64(z / b); elseif (a <= 1.0) 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 <= -0.00072) tmp = x / a; elseif (a <= -1.8e-73) tmp = x; elseif (a <= -1.45e-195) tmp = z / b; elseif (a <= 3.6e-255) tmp = x; elseif (a <= 2.9e-207) tmp = z / b; elseif (a <= 1.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -0.00072], N[(x / a), $MachinePrecision], If[LessEqual[a, -1.8e-73], x, If[LessEqual[a, -1.45e-195], N[(z / b), $MachinePrecision], If[LessEqual[a, 3.6e-255], x, If[LessEqual[a, 2.9e-207], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.0], x, N[(x / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00072:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-195}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-255}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-207}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -7.20000000000000045e-4 or 1 < a Initial program 74.8%
associate-/l*76.4%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 57.0%
Taylor expanded in a around inf 48.6%
if -7.20000000000000045e-4 < a < -1.8e-73 or -1.4500000000000001e-195 < a < 3.6000000000000002e-255 or 2.90000000000000011e-207 < a < 1Initial program 86.4%
associate-/l*87.4%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in x around inf 67.4%
Taylor expanded in a around 0 66.6%
Taylor expanded in b around 0 51.7%
if -1.8e-73 < a < -1.4500000000000001e-195 or 3.6000000000000002e-255 < a < 2.90000000000000011e-207Initial program 72.3%
associate-/l*70.0%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in y around inf 54.7%
Final simplification50.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -1e-84)
t_1
(if (<= t 2.4e-147)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 5.4e-77) (/ (+ (* y z) (* x t)) (* y b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1e-84) {
tmp = t_1;
} else if (t <= 2.4e-147) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 5.4e-77) {
tmp = ((y * z) + (x * t)) / (y * 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 + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-1d-84)) then
tmp = t_1
else if (t <= 2.4d-147) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 5.4d-77) then
tmp = ((y * z) + (x * t)) / (y * 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 + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1e-84) {
tmp = t_1;
} else if (t <= 2.4e-147) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 5.4e-77) {
tmp = ((y * z) + (x * t)) / (y * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -1e-84: tmp = t_1 elif t <= 2.4e-147: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 5.4e-77: tmp = ((y * z) + (x * t)) / (y * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1e-84) tmp = t_1; elseif (t <= 2.4e-147) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 5.4e-77) tmp = Float64(Float64(Float64(y * z) + Float64(x * t)) / Float64(y * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -1e-84) tmp = t_1; elseif (t <= 2.4e-147) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 5.4e-77) tmp = ((y * z) + (x * t)) / (y * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-84], t$95$1, If[LessEqual[t, 2.4e-147], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-77], N[(N[(N[(y * z), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -1 \cdot 10^{-84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-147}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-77}:\\
\;\;\;\;\frac{y \cdot z + x \cdot t}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1e-84 or 5.4000000000000001e-77 < t Initial program 84.0%
associate-/l*87.6%
associate-/l*92.8%
Simplified92.8%
if -1e-84 < t < 2.39999999999999998e-147Initial program 62.9%
associate-/l*56.6%
associate-/l*53.4%
Simplified53.4%
Taylor expanded in x around 0 59.8%
Taylor expanded in t around 0 76.0%
if 2.39999999999999998e-147 < t < 5.4000000000000001e-77Initial program 71.6%
associate-/l*63.6%
associate-/l*39.2%
Simplified39.2%
Taylor expanded in b around inf 75.8%
Taylor expanded in t around 0 83.7%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= (+ a 1.0) -2e+18)
(/ t_1 a)
(if (<= (+ a 1.0) 2.0) (/ t_1 (+ (/ (* y b) t) 1.0)) (/ 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 tmp;
if ((a + 1.0) <= -2e+18) {
tmp = t_1 / a;
} else if ((a + 1.0) <= 2.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} 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) :: tmp
t_1 = x + ((y * z) / t)
if ((a + 1.0d0) <= (-2d+18)) then
tmp = t_1 / a
else if ((a + 1.0d0) <= 2.0d0) then
tmp = t_1 / (((y * b) / t) + 1.0d0)
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 tmp;
if ((a + 1.0) <= -2e+18) {
tmp = t_1 / a;
} else if ((a + 1.0) <= 2.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if (a + 1.0) <= -2e+18: tmp = t_1 / a elif (a + 1.0) <= 2.0: tmp = t_1 / (((y * b) / t) + 1.0) 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)) tmp = 0.0 if (Float64(a + 1.0) <= -2e+18) tmp = Float64(t_1 / a); elseif (Float64(a + 1.0) <= 2.0) tmp = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + 1.0)); 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); tmp = 0.0; if ((a + 1.0) <= -2e+18) tmp = t_1 / a; elseif ((a + 1.0) <= 2.0) tmp = t_1 / (((y * b) / t) + 1.0); 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]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+18], N[(t$95$1 / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0], N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+18}:\\
\;\;\;\;\frac{t\_1}{a}\\
\mathbf{elif}\;a + 1 \leq 2:\\
\;\;\;\;\frac{t\_1}{\frac{y \cdot b}{t} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a + 1}\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e18Initial program 73.7%
associate-/l*75.5%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in a around inf 68.3%
if -2e18 < (+.f64 a 1) < 2Initial program 82.4%
associate-/l*82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in a around 0 81.3%
if 2 < (+.f64 a 1) Initial program 74.6%
associate-/l*76.1%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in b around 0 66.7%
Final simplification74.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= (+ a 1.0) -2e+18)
(+ (* (/ z t) (/ y a)) (/ x (+ a 1.0)))
(if (<= (+ a 1.0) 2.0) (/ t_1 (+ (/ (* y b) t) 1.0)) (/ 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 tmp;
if ((a + 1.0) <= -2e+18) {
tmp = ((z / t) * (y / a)) + (x / (a + 1.0));
} else if ((a + 1.0) <= 2.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} 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) :: tmp
t_1 = x + ((y * z) / t)
if ((a + 1.0d0) <= (-2d+18)) then
tmp = ((z / t) * (y / a)) + (x / (a + 1.0d0))
else if ((a + 1.0d0) <= 2.0d0) then
tmp = t_1 / (((y * b) / t) + 1.0d0)
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 tmp;
if ((a + 1.0) <= -2e+18) {
tmp = ((z / t) * (y / a)) + (x / (a + 1.0));
} else if ((a + 1.0) <= 2.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if (a + 1.0) <= -2e+18: tmp = ((z / t) * (y / a)) + (x / (a + 1.0)) elif (a + 1.0) <= 2.0: tmp = t_1 / (((y * b) / t) + 1.0) 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)) tmp = 0.0 if (Float64(a + 1.0) <= -2e+18) tmp = Float64(Float64(Float64(z / t) * Float64(y / a)) + Float64(x / Float64(a + 1.0))); elseif (Float64(a + 1.0) <= 2.0) tmp = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + 1.0)); 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); tmp = 0.0; if ((a + 1.0) <= -2e+18) tmp = ((z / t) * (y / a)) + (x / (a + 1.0)); elseif ((a + 1.0) <= 2.0) tmp = t_1 / (((y * b) / t) + 1.0); 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]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+18], N[(N[(N[(z / t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0], N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+18}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a} + \frac{x}{a + 1}\\
\mathbf{elif}\;a + 1 \leq 2:\\
\;\;\;\;\frac{t\_1}{\frac{y \cdot b}{t} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{a + 1}\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e18Initial program 73.7%
associate-/l*75.5%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in t around -inf 53.4%
Taylor expanded in a around inf 66.5%
mul-1-neg66.5%
times-frac71.7%
distribute-rgt-neg-in71.7%
distribute-neg-frac71.7%
Simplified71.7%
if -2e18 < (+.f64 a 1) < 2Initial program 82.4%
associate-/l*82.4%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in a around 0 81.3%
if 2 < (+.f64 a 1) Initial program 74.6%
associate-/l*76.1%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in b around 0 66.7%
Final simplification75.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -2.65e-73)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 1.22e-132)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -2.65e-73) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t <= 1.22e-132) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-2.65d-73)) then
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 1.22d-132) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -2.65e-73) {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
} else if (t <= 1.22e-132) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -2.65e-73: tmp = t_1 / ((a + 1.0) + (y * (b / t))) elif t <= 1.22e-132: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -2.65e-73) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 1.22e-132) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -2.65e-73) tmp = t_1 / ((a + 1.0) + (y * (b / t))); elseif (t <= 1.22e-132) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1 / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.65e-73], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.22e-132], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -2.65 \cdot 10^{-73}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-132}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -2.64999999999999986e-73Initial program 82.0%
associate-/l*87.7%
associate-/l*91.3%
Simplified91.3%
if -2.64999999999999986e-73 < t < 1.2200000000000001e-132Initial program 63.1%
associate-/l*55.5%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in x around 0 58.7%
Taylor expanded in t around 0 75.6%
if 1.2200000000000001e-132 < t Initial program 85.1%
associate-/l*86.2%
associate-/l*89.3%
Simplified89.3%
clear-num89.3%
un-div-inv89.7%
Applied egg-rr89.7%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -6.6e-83)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 2.7e-128)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.6e-83) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= 2.7e-128) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-6.6d-83)) then
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 2.7d-128) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.6e-83) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= 2.7e-128) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.6e-83: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif t <= 2.7e-128: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.6e-83) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 2.7e-128) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.6e-83) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (t <= 2.7e-128) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.6e-83], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-128], 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[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-83}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-128}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -6.5999999999999999e-83Initial program 82.0%
associate-/l*87.7%
associate-/l*91.3%
Simplified91.3%
clear-num91.3%
un-div-inv91.4%
Applied egg-rr91.4%
if -6.5999999999999999e-83 < t < 2.70000000000000006e-128Initial program 63.1%
associate-/l*55.5%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in x around 0 58.7%
Taylor expanded in t around 0 75.6%
if 2.70000000000000006e-128 < t Initial program 85.1%
associate-/l*86.2%
associate-/l*89.3%
Simplified89.3%
clear-num89.3%
un-div-inv89.7%
Applied egg-rr89.7%
Final simplification86.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ a 1.0) -2e+18) (not (<= (+ a 1.0) 20000000.0))) (/ (+ x (/ (* y z) t)) a) (/ x (+ (* y (/ b t)) 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a + 1.0) <= -2e+18) || !((a + 1.0) <= 20000000.0)) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = x / ((y * (b / t)) + 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 (((a + 1.0d0) <= (-2d+18)) .or. (.not. ((a + 1.0d0) <= 20000000.0d0))) then
tmp = (x + ((y * z) / t)) / a
else
tmp = x / ((y * (b / t)) + 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 (((a + 1.0) <= -2e+18) || !((a + 1.0) <= 20000000.0)) {
tmp = (x + ((y * z) / t)) / a;
} else {
tmp = x / ((y * (b / t)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a + 1.0) <= -2e+18) or not ((a + 1.0) <= 20000000.0): tmp = (x + ((y * z) / t)) / a else: tmp = x / ((y * (b / t)) + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a + 1.0) <= -2e+18) || !(Float64(a + 1.0) <= 20000000.0)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); else tmp = Float64(x / Float64(Float64(y * Float64(b / t)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a + 1.0) <= -2e+18) || ~(((a + 1.0) <= 20000000.0))) tmp = (x + ((y * z) / t)) / a; else tmp = x / ((y * (b / t)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+18], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 20000000.0]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+18} \lor \neg \left(a + 1 \leq 20000000\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + 1}\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e18 or 2e7 < (+.f64 a 1) Initial program 74.4%
associate-/l*76.1%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in a around inf 67.4%
if -2e18 < (+.f64 a 1) < 2e7Initial program 82.1%
associate-/l*82.1%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in x around inf 61.5%
Taylor expanded in a around 0 59.0%
*-commutative59.0%
associate-*r/59.7%
Simplified59.7%
Final simplification63.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -4.9e-116) (not (<= x 3.1e-85))) (/ x (+ (+ a 1.0) (* b (/ y 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 ((x <= -4.9e-116) || !(x <= 3.1e-85)) {
tmp = x / ((a + 1.0) + (b * (y / 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 ((x <= (-4.9d-116)) .or. (.not. (x <= 3.1d-85))) then
tmp = x / ((a + 1.0d0) + (b * (y / 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 ((x <= -4.9e-116) || !(x <= 3.1e-85)) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -4.9e-116) or not (x <= 3.1e-85): tmp = x / ((a + 1.0) + (b * (y / 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 ((x <= -4.9e-116) || !(x <= 3.1e-85)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / 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 ((x <= -4.9e-116) || ~((x <= 3.1e-85))) tmp = x / ((a + 1.0) + (b * (y / 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[x, -4.9e-116], N[Not[LessEqual[x, 3.1e-85]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $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}\;x \leq -4.9 \cdot 10^{-116} \lor \neg \left(x \leq 3.1 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if x < -4.89999999999999977e-116 or 3.1000000000000002e-85 < x Initial program 75.8%
associate-/l*77.6%
associate-/l*79.2%
Simplified79.2%
Taylor expanded in x around inf 66.4%
associate-+r+66.4%
associate-*r/69.2%
Simplified69.2%
if -4.89999999999999977e-116 < x < 3.1000000000000002e-85Initial program 83.4%
associate-/l*82.3%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in x around 0 68.0%
Taylor expanded in t around 0 74.5%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6e+52) (not (<= y 5.5e+168))) (+ (/ z b) (* x (/ (/ t y) b))) (/ x (+ (+ a 1.0) (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6e+52) || !(y <= 5.5e+168)) {
tmp = (z / b) + (x * ((t / y) / b));
} else {
tmp = x / ((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 ((y <= (-6d+52)) .or. (.not. (y <= 5.5d+168))) then
tmp = (z / b) + (x * ((t / y) / b))
else
tmp = x / ((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 ((y <= -6e+52) || !(y <= 5.5e+168)) {
tmp = (z / b) + (x * ((t / y) / b));
} else {
tmp = x / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6e+52) or not (y <= 5.5e+168): tmp = (z / b) + (x * ((t / y) / b)) else: tmp = x / ((a + 1.0) + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6e+52) || !(y <= 5.5e+168)) tmp = Float64(Float64(z / b) + Float64(x * Float64(Float64(t / y) / b))); else tmp = Float64(x / Float64(Float64(a + 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 ((y <= -6e+52) || ~((y <= 5.5e+168))) tmp = (z / b) + (x * ((t / y) / b)); else tmp = x / ((a + 1.0) + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6e+52], N[Not[LessEqual[y, 5.5e+168]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(x * N[(N[(t / y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+52} \lor \neg \left(y \leq 5.5 \cdot 10^{+168}\right):\\
\;\;\;\;\frac{z}{b} + x \cdot \frac{\frac{t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -6e52 or 5.5000000000000001e168 < y Initial program 54.6%
associate-/l*62.1%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in b around inf 34.1%
Taylor expanded in t around 0 41.5%
Taylor expanded in t around 0 56.6%
*-commutative56.6%
times-frac65.3%
associate-*l/69.1%
associate-/l*64.3%
Simplified64.3%
if -6e52 < y < 5.5000000000000001e168Initial program 88.9%
associate-/l*86.7%
associate-/l*85.1%
Simplified85.1%
Taylor expanded in x around inf 68.0%
associate-+r+68.0%
associate-*r/69.1%
Simplified69.1%
Final simplification67.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.6e-43) (not (<= z 1.5e-82))) (/ (+ x (/ (* y z) t)) (+ a 1.0)) (/ x (+ (+ a 1.0) (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.6e-43) || !(z <= 1.5e-82)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = x / ((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 ((z <= (-3.6d-43)) .or. (.not. (z <= 1.5d-82))) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = x / ((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 ((z <= -3.6e-43) || !(z <= 1.5e-82)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = x / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.6e-43) or not (z <= 1.5e-82): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = x / ((a + 1.0) + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.6e-43) || !(z <= 1.5e-82)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(x / Float64(Float64(a + 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 ((z <= -3.6e-43) || ~((z <= 1.5e-82))) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = x / ((a + 1.0) + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.6e-43], N[Not[LessEqual[z, 1.5e-82]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-43} \lor \neg \left(z \leq 1.5 \cdot 10^{-82}\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if z < -3.5999999999999999e-43 or 1.4999999999999999e-82 < z Initial program 72.4%
associate-/l*73.8%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in b around 0 64.1%
if -3.5999999999999999e-43 < z < 1.4999999999999999e-82Initial program 86.7%
associate-/l*86.7%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in x around inf 78.9%
associate-+r+78.9%
associate-*r/81.5%
Simplified81.5%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.6e-10) (not (<= t 2.95e+63))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.6e-10) || !(t <= 2.95e+63)) {
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 <= (-9.6d-10)) .or. (.not. (t <= 2.95d+63))) 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 <= -9.6e-10) || !(t <= 2.95e+63)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.6e-10) or not (t <= 2.95e+63): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.6e-10) || !(t <= 2.95e+63)) 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 <= -9.6e-10) || ~((t <= 2.95e+63))) 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, -9.6e-10], N[Not[LessEqual[t, 2.95e+63]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{-10} \lor \neg \left(t \leq 2.95 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -9.5999999999999999e-10 or 2.95000000000000014e63 < t Initial program 86.3%
associate-/l*90.1%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in y around 0 62.9%
if -9.5999999999999999e-10 < t < 2.95000000000000014e63Initial program 66.9%
associate-/l*63.3%
associate-/l*59.6%
Simplified59.6%
Taylor expanded in y around inf 49.9%
Final simplification57.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.00072) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.00072) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-0.00072d0)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.00072) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.00072) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.00072) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -0.00072) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.00072], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.00072 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.20000000000000045e-4 or 1 < a Initial program 74.8%
associate-/l*76.4%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 57.0%
Taylor expanded in a around inf 48.6%
if -7.20000000000000045e-4 < a < 1Initial program 82.0%
associate-/l*82.0%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in x around inf 60.5%
Taylor expanded in a around 0 59.2%
Taylor expanded in b around 0 43.6%
Final simplification46.1%
(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 78.4%
associate-/l*79.2%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in x around inf 58.7%
Taylor expanded in a around 0 36.4%
Taylor expanded in b around 0 24.0%
Final simplification24.0%
(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 2024041
(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))))