
(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 16 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))))
(t_2 (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
(if (<= t_1 (- INFINITY))
t_2
(if (<= t_1 -5e-303)
t_1
(if (<= t_1 0.0)
(/ (+ z (/ (* x t) y)) b)
(if (<= t_1 1e+238) 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = (y * z) / ((y * b) + (t * (a + 1.0)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 <= -5e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_1 <= 1e+238) {
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)) / (((y * b) / t) + (a + 1.0));
double t_2 = (y * z) / ((y * b) + (t * (a + 1.0)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 <= -5e-303) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z + ((x * t) / y)) / b;
} else if (t_1 <= 1e+238) {
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)) / (((y * b) / t) + (a + 1.0)) t_2 = (y * z) / ((y * b) + (t * (a + 1.0))) tmp = 0 if t_1 <= -math.inf: tmp = t_2 elif t_1 <= -5e-303: tmp = t_1 elif t_1 <= 0.0: tmp = (z + ((x * t) / y)) / b elif t_1 <= 1e+238: 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(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_2; elseif (t_1 <= -5e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t_1 <= 1e+238) 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)) / (((y * b) / t) + (a + 1.0)); t_2 = (y * z) / ((y * b) + (t * (a + 1.0))); tmp = 0.0; if (t_1 <= -Inf) tmp = t_2; elseif (t_1 <= -5e-303) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z + ((x * t) / y)) / b; elseif (t_1 <= 1e+238) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-303], 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, 1e+238], 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}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-303}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t_1 \leq 10^{+238}:\\
\;\;\;\;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 1e238 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 49.1%
*-commutative49.1%
associate-/l*49.1%
associate-*l/34.2%
Simplified34.2%
Taylor expanded in x around 0 97.2%
Taylor expanded in t around 0 97.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e238Initial program 98.5%
if -4.9999999999999998e-303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 45.8%
*-commutative45.8%
associate-/l*30.9%
associate-*l/30.9%
Simplified30.9%
Taylor expanded in t around 0 94.6%
*-commutative94.6%
times-frac94.6%
unpow294.6%
Simplified94.6%
Taylor expanded in b around inf 97.3%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
*-commutative0.0%
associate-/l*0.0%
associate-*l/0.0%
Simplified0.0%
Taylor expanded in t around 0 100.0%
Final simplification98.4%
(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 (* t (/ x y))) b)))
(if (<= y -2.15e+24)
t_2
(if (<= y -2.55e-61)
t_1
(if (<= y -3.8e-117)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= y 8.6) t_1 t_2))))))
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 + (t * (x / y))) / b;
double tmp;
if (y <= -2.15e+24) {
tmp = t_2;
} else if (y <= -2.55e-61) {
tmp = t_1;
} else if (y <= -3.8e-117) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (y <= 8.6) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + (z * (y / t))) / ((a + 1.0d0) + (b * (y / t)))
t_2 = (z + (t * (x / y))) / b
if (y <= (-2.15d+24)) then
tmp = t_2
else if (y <= (-2.55d-61)) then
tmp = t_1
else if (y <= (-3.8d-117)) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (y <= 8.6d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / ((a + 1.0) + (b * (y / t)));
double t_2 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -2.15e+24) {
tmp = t_2;
} else if (y <= -2.55e-61) {
tmp = t_1;
} else if (y <= -3.8e-117) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (y <= 8.6) {
tmp = t_1;
} else {
tmp = t_2;
}
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 + (t * (x / y))) / b tmp = 0 if y <= -2.15e+24: tmp = t_2 elif y <= -2.55e-61: tmp = t_1 elif y <= -3.8e-117: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif y <= 8.6: tmp = t_1 else: tmp = t_2 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 + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -2.15e+24) tmp = t_2; elseif (y <= -2.55e-61) tmp = t_1; elseif (y <= -3.8e-117) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (y <= 8.6) tmp = t_1; else tmp = t_2; 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 + (t * (x / y))) / b; tmp = 0.0; if (y <= -2.15e+24) tmp = t_2; elseif (y <= -2.55e-61) tmp = t_1; elseif (y <= -3.8e-117) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (y <= 8.6) tmp = t_1; else tmp = t_2; 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 + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.15e+24], t$95$2, If[LessEqual[y, -2.55e-61], t$95$1, If[LessEqual[y, -3.8e-117], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.6], t$95$1, t$95$2]]]]]]
\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 + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -2.15 \cdot 10^{+24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.55 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-117}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 8.6:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.14999999999999994e24 or 8.59999999999999964 < y Initial program 47.8%
*-commutative47.8%
associate-/l*40.2%
associate-*l/33.9%
Simplified33.9%
Taylor expanded in t around 0 63.8%
*-commutative63.8%
times-frac66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in b around inf 80.5%
expm1-log1p-u77.9%
expm1-udef71.2%
div-inv71.2%
*-commutative71.2%
associate-*l*71.2%
div-inv71.2%
Applied egg-rr71.2%
expm1-def76.2%
expm1-log1p78.8%
associate-*r/80.5%
*-commutative80.5%
associate-*r/80.5%
Simplified80.5%
if -2.14999999999999994e24 < y < -2.54999999999999984e-61 or -3.79999999999999972e-117 < y < 8.59999999999999964Initial program 92.9%
*-commutative92.9%
associate-/l*93.7%
associate-*l/93.7%
Simplified93.7%
div-inv93.7%
clear-num93.7%
Applied egg-rr93.7%
if -2.54999999999999984e-61 < y < -3.79999999999999972e-117Initial program 48.9%
*-commutative48.9%
associate-/l*52.3%
associate-*l/52.3%
Simplified52.3%
Taylor expanded in x around 0 63.8%
Taylor expanded in t around 0 80.5%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* b (/ y t)))) (t_2 (/ (+ z (* t (/ x y))) b)))
(if (<= y -1.2e+24)
t_2
(if (<= y -7e-61)
(/ (+ x (* z (/ y t))) t_1)
(if (<= y -3.8e-117)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= y 255000000.0) (/ (+ x (/ z (/ t y))) t_1) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double t_2 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -1.2e+24) {
tmp = t_2;
} else if (y <= -7e-61) {
tmp = (x + (z * (y / t))) / t_1;
} else if (y <= -3.8e-117) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (y <= 255000000.0) {
tmp = (x + (z / (t / y))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a + 1.0d0) + (b * (y / t))
t_2 = (z + (t * (x / y))) / b
if (y <= (-1.2d+24)) then
tmp = t_2
else if (y <= (-7d-61)) then
tmp = (x + (z * (y / t))) / t_1
else if (y <= (-3.8d-117)) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (y <= 255000000.0d0) then
tmp = (x + (z / (t / y))) / t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (b * (y / t));
double t_2 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -1.2e+24) {
tmp = t_2;
} else if (y <= -7e-61) {
tmp = (x + (z * (y / t))) / t_1;
} else if (y <= -3.8e-117) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (y <= 255000000.0) {
tmp = (x + (z / (t / y))) / t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (b * (y / t)) t_2 = (z + (t * (x / y))) / b tmp = 0 if y <= -1.2e+24: tmp = t_2 elif y <= -7e-61: tmp = (x + (z * (y / t))) / t_1 elif y <= -3.8e-117: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif y <= 255000000.0: tmp = (x + (z / (t / y))) / t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))) t_2 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -1.2e+24) tmp = t_2; elseif (y <= -7e-61) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (y <= -3.8e-117) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (y <= 255000000.0) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (b * (y / t)); t_2 = (z + (t * (x / y))) / b; tmp = 0.0; if (y <= -1.2e+24) tmp = t_2; elseif (y <= -7e-61) tmp = (x + (z * (y / t))) / t_1; elseif (y <= -3.8e-117) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (y <= 255000000.0) tmp = (x + (z / (t / y))) / t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.2e+24], t$95$2, If[LessEqual[y, -7e-61], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, -3.8e-117], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 255000000.0], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + b \cdot \frac{y}{t}\\
t_2 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+24}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-61}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-117}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 255000000:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.2e24 or 2.55e8 < y Initial program 47.8%
*-commutative47.8%
associate-/l*40.2%
associate-*l/33.9%
Simplified33.9%
Taylor expanded in t around 0 63.8%
*-commutative63.8%
times-frac66.1%
unpow266.1%
Simplified66.1%
Taylor expanded in b around inf 80.5%
expm1-log1p-u77.9%
expm1-udef71.2%
div-inv71.2%
*-commutative71.2%
associate-*l*71.2%
div-inv71.2%
Applied egg-rr71.2%
expm1-def76.2%
expm1-log1p78.8%
associate-*r/80.5%
*-commutative80.5%
associate-*r/80.5%
Simplified80.5%
if -1.2e24 < y < -7.0000000000000006e-61Initial program 82.2%
*-commutative82.2%
associate-/l*82.1%
associate-*l/82.3%
Simplified82.3%
div-inv82.3%
clear-num82.3%
Applied egg-rr82.3%
if -7.0000000000000006e-61 < y < -3.79999999999999972e-117Initial program 48.9%
*-commutative48.9%
associate-/l*52.3%
associate-*l/52.3%
Simplified52.3%
Taylor expanded in x around 0 63.8%
Taylor expanded in t around 0 80.5%
if -3.79999999999999972e-117 < y < 2.55e8Initial program 95.5%
*-commutative95.5%
associate-/l*96.6%
associate-*l/96.5%
Simplified96.5%
Final simplification86.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.5e-145) (not (<= t 1.12e-129))) (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ y (/ t b)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.5e-145) || !(t <= 1.12e-129)) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b)));
} 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.5d-145)) .or. (.not. (t <= 1.12d-129))) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (y / (t / b)))
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.5e-145) || !(t <= 1.12e-129)) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.5e-145) or not (t <= 1.12e-129): tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.5e-145) || !(t <= 1.12e-129)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); 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.5e-145) || ~((t <= 1.12e-129))) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (y / (t / b))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.5e-145], N[Not[LessEqual[t, 1.12e-129]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $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.5 \cdot 10^{-145} \lor \neg \left(t \leq 1.12 \cdot 10^{-129}\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -5.50000000000000015e-145 or 1.12000000000000006e-129 < t Initial program 89.3%
associate-/l*86.6%
Simplified86.6%
if -5.50000000000000015e-145 < t < 1.12000000000000006e-129Initial program 48.5%
*-commutative48.5%
associate-/l*45.7%
associate-*l/43.2%
Simplified43.2%
Taylor expanded in t around 0 63.8%
*-commutative63.8%
times-frac64.1%
unpow264.1%
Simplified64.1%
Taylor expanded in b around inf 80.8%
Final simplification83.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.02e-201)
(/ z b)
(if (<= b -4.5e-301)
(/ (* y z) (* t a))
(if (<= b 7e-191)
(+ x (/ (* y z) t))
(if (<= b 1.1e-128) (* (/ y t) (/ z (+ a 1.0))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.02e-201) {
tmp = z / b;
} else if (b <= -4.5e-301) {
tmp = (y * z) / (t * a);
} else if (b <= 7e-191) {
tmp = x + ((y * z) / t);
} else if (b <= 1.1e-128) {
tmp = (y / t) * (z / (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 (b <= (-1.02d-201)) then
tmp = z / b
else if (b <= (-4.5d-301)) then
tmp = (y * z) / (t * a)
else if (b <= 7d-191) then
tmp = x + ((y * z) / t)
else if (b <= 1.1d-128) then
tmp = (y / t) * (z / (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 (b <= -1.02e-201) {
tmp = z / b;
} else if (b <= -4.5e-301) {
tmp = (y * z) / (t * a);
} else if (b <= 7e-191) {
tmp = x + ((y * z) / t);
} else if (b <= 1.1e-128) {
tmp = (y / t) * (z / (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.02e-201: tmp = z / b elif b <= -4.5e-301: tmp = (y * z) / (t * a) elif b <= 7e-191: tmp = x + ((y * z) / t) elif b <= 1.1e-128: tmp = (y / t) * (z / (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.02e-201) tmp = Float64(z / b); elseif (b <= -4.5e-301) tmp = Float64(Float64(y * z) / Float64(t * a)); elseif (b <= 7e-191) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (b <= 1.1e-128) tmp = Float64(Float64(y / t) * Float64(z / 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 (b <= -1.02e-201) tmp = z / b; elseif (b <= -4.5e-301) tmp = (y * z) / (t * a); elseif (b <= 7e-191) tmp = x + ((y * z) / t); elseif (b <= 1.1e-128) tmp = (y / t) * (z / (a + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.02e-201], N[(z / b), $MachinePrecision], If[LessEqual[b, -4.5e-301], N[(N[(y * z), $MachinePrecision] / N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e-191], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e-128], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.02 \cdot 10^{-201}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq -4.5 \cdot 10^{-301}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot a}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-191}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-128}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -1.01999999999999999e-201 or 1.10000000000000005e-128 < b Initial program 62.4%
*-commutative62.4%
associate-/l*59.2%
associate-*l/57.4%
Simplified57.4%
Taylor expanded in t around 0 58.0%
if -1.01999999999999999e-201 < b < -4.5000000000000002e-301Initial program 80.1%
*-commutative80.1%
associate-/l*76.1%
associate-*l/70.9%
Simplified70.9%
Taylor expanded in x around 0 83.6%
Taylor expanded in a around inf 59.7%
*-commutative59.7%
Simplified59.7%
if -4.5000000000000002e-301 < b < 7.00000000000000013e-191Initial program 89.5%
*-commutative89.5%
associate-/l*86.0%
associate-*l/74.1%
Simplified74.1%
Taylor expanded in b around 0 78.1%
Taylor expanded in a around 0 60.4%
if 7.00000000000000013e-191 < b < 1.10000000000000005e-128Initial program 86.8%
*-commutative86.8%
associate-/l*86.8%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in x around 0 86.3%
Taylor expanded in y around 0 73.8%
times-frac74.1%
Simplified74.1%
Final simplification58.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.9e-22) (not (<= b 1.8e-128))) (/ (+ 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 ((b <= -1.9e-22) || !(b <= 1.8e-128)) {
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 ((b <= (-1.9d-22)) .or. (.not. (b <= 1.8d-128))) 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 ((b <= -1.9e-22) || !(b <= 1.8e-128)) {
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 (b <= -1.9e-22) or not (b <= 1.8e-128): 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 ((b <= -1.9e-22) || !(b <= 1.8e-128)) 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 ((b <= -1.9e-22) || ~((b <= 1.8e-128))) 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[b, -1.9e-22], N[Not[LessEqual[b, 1.8e-128]], $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}\;b \leq -1.9 \cdot 10^{-22} \lor \neg \left(b \leq 1.8 \cdot 10^{-128}\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 b < -1.90000000000000012e-22 or 1.80000000000000012e-128 < b Initial program 59.2%
*-commutative59.2%
associate-/l*55.3%
associate-*l/54.6%
Simplified54.6%
Taylor expanded in t around 0 73.5%
*-commutative73.5%
times-frac74.9%
unpow274.9%
Simplified74.9%
Taylor expanded in b around inf 80.0%
if -1.90000000000000012e-22 < b < 1.80000000000000012e-128Initial program 82.6%
*-commutative82.6%
associate-/l*80.6%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in b around 0 71.9%
Final simplification77.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2e-199)
(/ z b)
(if (<= b -2.55e-306)
(* z (/ y (* t a)))
(if (<= b 7.5e-134) (+ x (* z (/ y t))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e-199) {
tmp = z / b;
} else if (b <= -2.55e-306) {
tmp = z * (y / (t * a));
} else if (b <= 7.5e-134) {
tmp = x + (z * (y / t));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2d-199)) then
tmp = z / b
else if (b <= (-2.55d-306)) then
tmp = z * (y / (t * a))
else if (b <= 7.5d-134) then
tmp = x + (z * (y / t))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2e-199) {
tmp = z / b;
} else if (b <= -2.55e-306) {
tmp = z * (y / (t * a));
} else if (b <= 7.5e-134) {
tmp = x + (z * (y / t));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2e-199: tmp = z / b elif b <= -2.55e-306: tmp = z * (y / (t * a)) elif b <= 7.5e-134: tmp = x + (z * (y / t)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2e-199) tmp = Float64(z / b); elseif (b <= -2.55e-306) tmp = Float64(z * Float64(y / Float64(t * a))); elseif (b <= 7.5e-134) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2e-199) tmp = z / b; elseif (b <= -2.55e-306) tmp = z * (y / (t * a)); elseif (b <= 7.5e-134) tmp = x + (z * (y / t)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2e-199], N[(z / b), $MachinePrecision], If[LessEqual[b, -2.55e-306], N[(z * N[(y / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e-134], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{-199}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq -2.55 \cdot 10^{-306}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot a}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-134}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -1.99999999999999996e-199 or 7.50000000000000048e-134 < b Initial program 62.3%
*-commutative62.3%
associate-/l*59.2%
associate-*l/57.3%
Simplified57.3%
Taylor expanded in t around 0 57.9%
if -1.99999999999999996e-199 < b < -2.54999999999999986e-306Initial program 80.1%
*-commutative80.1%
associate-/l*76.1%
associate-*l/70.9%
Simplified70.9%
Taylor expanded in x around 0 83.6%
Taylor expanded in a around inf 59.7%
*-commutative59.7%
Simplified59.7%
associate-/l*40.6%
associate-/r/56.0%
Applied egg-rr56.0%
if -2.54999999999999986e-306 < b < 7.50000000000000048e-134Initial program 91.1%
*-commutative91.1%
associate-/l*88.2%
associate-*l/78.1%
Simplified78.1%
Taylor expanded in b around 0 78.5%
Taylor expanded in a around 0 57.4%
+-commutative57.4%
associate-*l/57.4%
Simplified57.4%
Final simplification57.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.75e-199)
(/ z b)
(if (<= b 2.8e-306)
(* z (/ y (* t a)))
(if (<= b 8.5e-146) (+ x (/ (* y z) t)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.75e-199) {
tmp = z / b;
} else if (b <= 2.8e-306) {
tmp = z * (y / (t * a));
} else if (b <= 8.5e-146) {
tmp = x + ((y * z) / t);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.75d-199)) then
tmp = z / b
else if (b <= 2.8d-306) then
tmp = z * (y / (t * a))
else if (b <= 8.5d-146) then
tmp = x + ((y * z) / t)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.75e-199) {
tmp = z / b;
} else if (b <= 2.8e-306) {
tmp = z * (y / (t * a));
} else if (b <= 8.5e-146) {
tmp = x + ((y * z) / t);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.75e-199: tmp = z / b elif b <= 2.8e-306: tmp = z * (y / (t * a)) elif b <= 8.5e-146: tmp = x + ((y * z) / t) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.75e-199) tmp = Float64(z / b); elseif (b <= 2.8e-306) tmp = Float64(z * Float64(y / Float64(t * a))); elseif (b <= 8.5e-146) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.75e-199) tmp = z / b; elseif (b <= 2.8e-306) tmp = z * (y / (t * a)); elseif (b <= 8.5e-146) tmp = x + ((y * z) / t); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.75e-199], N[(z / b), $MachinePrecision], If[LessEqual[b, 2.8e-306], N[(z * N[(y / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.5e-146], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.75 \cdot 10^{-199}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-306}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot a}\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-146}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -2.75e-199 or 8.4999999999999997e-146 < b Initial program 62.3%
*-commutative62.3%
associate-/l*59.2%
associate-*l/57.3%
Simplified57.3%
Taylor expanded in t around 0 57.9%
if -2.75e-199 < b < 2.8000000000000001e-306Initial program 80.1%
*-commutative80.1%
associate-/l*76.1%
associate-*l/70.9%
Simplified70.9%
Taylor expanded in x around 0 83.6%
Taylor expanded in a around inf 59.7%
*-commutative59.7%
Simplified59.7%
associate-/l*40.6%
associate-/r/56.0%
Applied egg-rr56.0%
if 2.8000000000000001e-306 < b < 8.4999999999999997e-146Initial program 91.1%
*-commutative91.1%
associate-/l*88.2%
associate-*l/78.1%
Simplified78.1%
Taylor expanded in b around 0 78.5%
Taylor expanded in a around 0 57.4%
Final simplification57.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -5.2e-201)
(/ z b)
(if (<= b -1.25e-301)
(/ (* y z) (* t a))
(if (<= b 1.4e-147) (+ x (/ (* y z) t)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e-201) {
tmp = z / b;
} else if (b <= -1.25e-301) {
tmp = (y * z) / (t * a);
} else if (b <= 1.4e-147) {
tmp = x + ((y * z) / t);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-5.2d-201)) then
tmp = z / b
else if (b <= (-1.25d-301)) then
tmp = (y * z) / (t * a)
else if (b <= 1.4d-147) then
tmp = x + ((y * z) / t)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e-201) {
tmp = z / b;
} else if (b <= -1.25e-301) {
tmp = (y * z) / (t * a);
} else if (b <= 1.4e-147) {
tmp = x + ((y * z) / t);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.2e-201: tmp = z / b elif b <= -1.25e-301: tmp = (y * z) / (t * a) elif b <= 1.4e-147: tmp = x + ((y * z) / t) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.2e-201) tmp = Float64(z / b); elseif (b <= -1.25e-301) tmp = Float64(Float64(y * z) / Float64(t * a)); elseif (b <= 1.4e-147) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.2e-201) tmp = z / b; elseif (b <= -1.25e-301) tmp = (y * z) / (t * a); elseif (b <= 1.4e-147) tmp = x + ((y * z) / t); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.2e-201], N[(z / b), $MachinePrecision], If[LessEqual[b, -1.25e-301], N[(N[(y * z), $MachinePrecision] / N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e-147], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-201}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq -1.25 \cdot 10^{-301}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot a}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-147}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -5.19999999999999965e-201 or 1.4e-147 < b Initial program 62.3%
*-commutative62.3%
associate-/l*59.2%
associate-*l/57.3%
Simplified57.3%
Taylor expanded in t around 0 57.9%
if -5.19999999999999965e-201 < b < -1.25000000000000003e-301Initial program 80.1%
*-commutative80.1%
associate-/l*76.1%
associate-*l/70.9%
Simplified70.9%
Taylor expanded in x around 0 83.6%
Taylor expanded in a around inf 59.7%
*-commutative59.7%
Simplified59.7%
if -1.25000000000000003e-301 < b < 1.4e-147Initial program 91.1%
*-commutative91.1%
associate-/l*88.2%
associate-*l/78.1%
Simplified78.1%
Taylor expanded in b around 0 78.5%
Taylor expanded in a around 0 57.4%
Final simplification58.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5.1e-126) (not (<= b 1.85e-128))) (/ z b) (/ (* y z) (+ t (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5.1e-126) || !(b <= 1.85e-128)) {
tmp = z / b;
} else {
tmp = (y * z) / (t + (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) :: tmp
if ((b <= (-5.1d-126)) .or. (.not. (b <= 1.85d-128))) then
tmp = z / b
else
tmp = (y * z) / (t + (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 tmp;
if ((b <= -5.1e-126) || !(b <= 1.85e-128)) {
tmp = z / b;
} else {
tmp = (y * z) / (t + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5.1e-126) or not (b <= 1.85e-128): tmp = z / b else: tmp = (y * z) / (t + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5.1e-126) || !(b <= 1.85e-128)) tmp = Float64(z / b); else tmp = Float64(Float64(y * z) / Float64(t + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5.1e-126) || ~((b <= 1.85e-128))) tmp = z / b; else tmp = (y * z) / (t + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5.1e-126], N[Not[LessEqual[b, 1.85e-128]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(t + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{-126} \lor \neg \left(b \leq 1.85 \cdot 10^{-128}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t + t \cdot a}\\
\end{array}
\end{array}
if b < -5.10000000000000002e-126 or 1.85e-128 < b Initial program 60.6%
*-commutative60.6%
associate-/l*57.2%
associate-*l/55.8%
Simplified55.8%
Taylor expanded in t around 0 58.9%
if -5.10000000000000002e-126 < b < 1.85e-128Initial program 85.4%
*-commutative85.4%
associate-/l*82.7%
associate-*l/75.1%
Simplified75.1%
Taylor expanded in x around 0 74.8%
Taylor expanded in t around inf 61.6%
distribute-lft-in61.6%
*-rgt-identity61.6%
Simplified61.6%
Final simplification59.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.3e-126) (not (<= b 1.05e-236))) (/ (+ z (/ t (/ y x))) b) (/ (* y z) (+ t (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.3e-126) || !(b <= 1.05e-236)) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (y * z) / (t + (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) :: tmp
if ((b <= (-2.3d-126)) .or. (.not. (b <= 1.05d-236))) then
tmp = (z + (t / (y / x))) / b
else
tmp = (y * z) / (t + (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 tmp;
if ((b <= -2.3e-126) || !(b <= 1.05e-236)) {
tmp = (z + (t / (y / x))) / b;
} else {
tmp = (y * z) / (t + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.3e-126) or not (b <= 1.05e-236): tmp = (z + (t / (y / x))) / b else: tmp = (y * z) / (t + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.3e-126) || !(b <= 1.05e-236)) tmp = Float64(Float64(z + Float64(t / Float64(y / x))) / b); else tmp = Float64(Float64(y * z) / Float64(t + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.3e-126) || ~((b <= 1.05e-236))) tmp = (z + (t / (y / x))) / b; else tmp = (y * z) / (t + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.3e-126], N[Not[LessEqual[b, 1.05e-236]], $MachinePrecision]], N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(t + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{-126} \lor \neg \left(b \leq 1.05 \cdot 10^{-236}\right):\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t + t \cdot a}\\
\end{array}
\end{array}
if b < -2.30000000000000011e-126 or 1.04999999999999989e-236 < b Initial program 63.0%
*-commutative63.0%
associate-/l*59.4%
associate-*l/57.6%
Simplified57.6%
Taylor expanded in t around 0 65.6%
*-commutative65.6%
times-frac66.3%
unpow266.3%
Simplified66.3%
Taylor expanded in b around inf 73.6%
+-commutative73.6%
associate-/l*70.2%
Simplified70.2%
if -2.30000000000000011e-126 < b < 1.04999999999999989e-236Initial program 84.3%
*-commutative84.3%
associate-/l*82.5%
associate-*l/74.5%
Simplified74.5%
Taylor expanded in x around 0 75.7%
Taylor expanded in t around inf 66.9%
distribute-lft-in66.9%
*-rgt-identity66.9%
Simplified66.9%
Final simplification69.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.5e-126) (not (<= b 9e-237))) (/ (+ z (/ (* x t) y)) b) (/ (* y z) (+ t (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.5e-126) || !(b <= 9e-237)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (y * z) / (t + (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) :: tmp
if ((b <= (-4.5d-126)) .or. (.not. (b <= 9d-237))) then
tmp = (z + ((x * t) / y)) / b
else
tmp = (y * z) / (t + (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 tmp;
if ((b <= -4.5e-126) || !(b <= 9e-237)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (y * z) / (t + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.5e-126) or not (b <= 9e-237): tmp = (z + ((x * t) / y)) / b else: tmp = (y * z) / (t + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.5e-126) || !(b <= 9e-237)) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(Float64(y * z) / Float64(t + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -4.5e-126) || ~((b <= 9e-237))) tmp = (z + ((x * t) / y)) / b; else tmp = (y * z) / (t + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.5e-126], N[Not[LessEqual[b, 9e-237]], $MachinePrecision]], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(t + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{-126} \lor \neg \left(b \leq 9 \cdot 10^{-237}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t + t \cdot a}\\
\end{array}
\end{array}
if b < -4.50000000000000025e-126 or 9.00000000000000019e-237 < b Initial program 63.0%
*-commutative63.0%
associate-/l*59.4%
associate-*l/57.6%
Simplified57.6%
Taylor expanded in t around 0 65.6%
*-commutative65.6%
times-frac66.3%
unpow266.3%
Simplified66.3%
Taylor expanded in b around inf 73.6%
if -4.50000000000000025e-126 < b < 9.00000000000000019e-237Initial program 84.3%
*-commutative84.3%
associate-/l*82.5%
associate-*l/74.5%
Simplified74.5%
Taylor expanded in x around 0 75.7%
Taylor expanded in t around inf 66.9%
distribute-lft-in66.9%
*-rgt-identity66.9%
Simplified66.9%
Final simplification72.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.6e-15) (not (<= t 3.1e-110))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.6e-15) || !(t <= 3.1e-110)) {
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 <= (-6.6d-15)) .or. (.not. (t <= 3.1d-110))) 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 <= -6.6e-15) || !(t <= 3.1e-110)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.6e-15) or not (t <= 3.1e-110): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.6e-15) || !(t <= 3.1e-110)) 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 <= -6.6e-15) || ~((t <= 3.1e-110))) 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, -6.6e-15], N[Not[LessEqual[t, 3.1e-110]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-15} \lor \neg \left(t \leq 3.1 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -6.6e-15 or 3.10000000000000007e-110 < t Initial program 91.2%
*-commutative91.2%
associate-/l*89.3%
associate-*l/89.1%
Simplified89.1%
Taylor expanded in t around inf 40.6%
if -6.6e-15 < t < 3.10000000000000007e-110Initial program 61.0%
*-commutative61.0%
associate-/l*57.4%
associate-*l/53.4%
Simplified53.4%
Taylor expanded in t around 0 60.0%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.4e+28) (/ x a) (if (<= a 1.15e-8) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.4e+28) {
tmp = x / a;
} else if (a <= 1.15e-8) {
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 <= (-6.4d+28)) then
tmp = x / a
else if (a <= 1.15d-8) 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 <= -6.4e+28) {
tmp = x / a;
} else if (a <= 1.15e-8) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.4e+28: tmp = x / a elif a <= 1.15e-8: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.4e+28) tmp = Float64(x / a); elseif (a <= 1.15e-8) 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 <= -6.4e+28) tmp = x / a; elseif (a <= 1.15e-8) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.4e+28], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.15e-8], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -6.4000000000000001e28 or 1.15e-8 < a Initial program 72.2%
*-commutative72.2%
associate-/l*68.3%
associate-*l/65.5%
Simplified65.5%
Taylor expanded in x around inf 38.3%
Taylor expanded in a around inf 25.7%
if -6.4000000000000001e28 < a < 1.15e-8Initial program 63.9%
*-commutative63.9%
associate-/l*61.2%
associate-*l/57.7%
Simplified57.7%
Taylor expanded in x around inf 38.5%
Taylor expanded in a around 0 38.5%
Taylor expanded in y around 0 14.4%
Final simplification19.5%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4.1e+191) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.1e+191) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.1d+191)) then
tmp = x / a
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.1e+191) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.1e+191: tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.1e+191) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.1e+191) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.1e+191], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+191}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -4.0999999999999999e191Initial program 93.8%
*-commutative93.8%
associate-/l*88.1%
associate-*l/88.0%
Simplified88.0%
Taylor expanded in x around inf 49.2%
Taylor expanded in a around inf 33.4%
if -4.0999999999999999e191 < a Initial program 65.7%
*-commutative65.7%
associate-/l*62.7%
associate-*l/59.3%
Simplified59.3%
Taylor expanded in t around 0 54.0%
Final simplification52.6%
(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 67.6%
*-commutative67.6%
associate-/l*64.4%
associate-*l/61.2%
Simplified61.2%
Taylor expanded in x around inf 38.4%
Taylor expanded in a around 0 29.2%
Taylor expanded in y around 0 9.5%
Final simplification9.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 2023278
(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))))