
(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 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 -5e-314)
(/ (+ x (/ y (/ t z))) t_1)
(if (<= t_2 0.0)
(/ (+ z (* x (/ t y))) b)
(if (<= t_2 5e+301) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -5e-314) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t_2 <= 0.0) {
tmp = (z + (x * (t / y))) / b;
} else if (t_2 <= 5e+301) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((y * b) / t) + (a + 1.0d0)
t_2 = (x + ((y * z) / t)) / t_1
if (t_2 <= (-5d-314)) then
tmp = (x + (y / (t / z))) / t_1
else if (t_2 <= 0.0d0) then
tmp = (z + (x * (t / y))) / b
else if (t_2 <= 5d+301) then
tmp = t_2
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -5e-314) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t_2 <= 0.0) {
tmp = (z + (x * (t / y))) / b;
} else if (t_2 <= 5e+301) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -5e-314: tmp = (x + (y / (t / z))) / t_1 elif t_2 <= 0.0: tmp = (z + (x * (t / y))) / b elif t_2 <= 5e+301: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= -5e-314) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); elseif (t_2 <= 0.0) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); elseif (t_2 <= 5e+301) tmp = t_2; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -5e-314) tmp = (x + (y / (t / z))) / t_1; elseif (t_2 <= 0.0) tmp = (z + (x * (t / y))) / b; elseif (t_2 <= 5e+301) 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-314], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$2, 5e+301], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-314}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t_1}\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;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))) < -4.99999999982e-314Initial program 90.3%
*-un-lft-identity90.3%
associate-/l*92.7%
Applied egg-rr92.7%
if -4.99999999982e-314 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 59.4%
*-commutative59.4%
associate-/l*53.7%
associate-*l/63.6%
Simplified63.6%
Taylor expanded in y around inf 62.9%
associate--l+62.9%
times-frac65.0%
associate-*r*65.0%
unpow265.0%
Simplified65.0%
Taylor expanded in b around inf 73.7%
+-commutative73.7%
associate-*l/73.7%
*-commutative73.7%
Simplified73.7%
if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000004e301Initial program 99.7%
if 5.0000000000000004e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 12.3%
*-commutative12.3%
associate-/l*25.4%
associate-*l/29.1%
Simplified29.1%
Taylor expanded in t around 0 84.8%
Final simplification90.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))) (if (<= t_1 5e+301) t_1 (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= 5e+301) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))
if (t_1 <= 5d+301) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= 5e+301) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= 5e+301: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= 5e+301) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= 5e+301) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+301], t$95$1, N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000004e301Initial program 88.6%
if 5.0000000000000004e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 12.3%
*-commutative12.3%
associate-/l*25.4%
associate-*l/29.1%
Simplified29.1%
Taylor expanded in t around 0 84.8%
Final simplification87.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -2.4e-40)
t_1
(if (<= t 2.9e-162)
(/ z b)
(if (<= t 6.2e-113)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t 1.2e-48)
(/ z b)
(if (or (<= t 1.58e+159) (not (<= t 1.65e+196)))
t_1
(/ y (/ (+ t (* t a)) z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.4e-40) {
tmp = t_1;
} else if (t <= 2.9e-162) {
tmp = z / b;
} else if (t <= 6.2e-113) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 1.2e-48) {
tmp = z / b;
} else if ((t <= 1.58e+159) || !(t <= 1.65e+196)) {
tmp = t_1;
} else {
tmp = y / ((t + (t * a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-2.4d-40)) then
tmp = t_1
else if (t <= 2.9d-162) then
tmp = z / b
else if (t <= 6.2d-113) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= 1.2d-48) then
tmp = z / b
else if ((t <= 1.58d+159) .or. (.not. (t <= 1.65d+196))) then
tmp = t_1
else
tmp = y / ((t + (t * a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -2.4e-40) {
tmp = t_1;
} else if (t <= 2.9e-162) {
tmp = z / b;
} else if (t <= 6.2e-113) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 1.2e-48) {
tmp = z / b;
} else if ((t <= 1.58e+159) || !(t <= 1.65e+196)) {
tmp = t_1;
} else {
tmp = y / ((t + (t * a)) / z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -2.4e-40: tmp = t_1 elif t <= 2.9e-162: tmp = z / b elif t <= 6.2e-113: tmp = (y / t) * (z / (a + 1.0)) elif t <= 1.2e-48: tmp = z / b elif (t <= 1.58e+159) or not (t <= 1.65e+196): tmp = t_1 else: tmp = y / ((t + (t * a)) / z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -2.4e-40) tmp = t_1; elseif (t <= 2.9e-162) tmp = Float64(z / b); elseif (t <= 6.2e-113) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= 1.2e-48) tmp = Float64(z / b); elseif ((t <= 1.58e+159) || !(t <= 1.65e+196)) tmp = t_1; else tmp = Float64(y / Float64(Float64(t + Float64(t * a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -2.4e-40) tmp = t_1; elseif (t <= 2.9e-162) tmp = z / b; elseif (t <= 6.2e-113) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= 1.2e-48) tmp = z / b; elseif ((t <= 1.58e+159) || ~((t <= 1.65e+196))) tmp = t_1; else tmp = y / ((t + (t * a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e-40], t$95$1, If[LessEqual[t, 2.9e-162], N[(z / b), $MachinePrecision], If[LessEqual[t, 6.2e-113], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-48], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, 1.58e+159], N[Not[LessEqual[t, 1.65e+196]], $MachinePrecision]], t$95$1, N[(y / N[(N[(t + N[(t * a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-162}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.58 \cdot 10^{+159} \lor \neg \left(t \leq 1.65 \cdot 10^{+196}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t + t \cdot a}{z}}\\
\end{array}
\end{array}
if t < -2.39999999999999991e-40 or 1.2e-48 < t < 1.58000000000000007e159 or 1.6500000000000001e196 < t Initial program 84.2%
*-commutative84.2%
associate-/l*88.5%
associate-*l/93.8%
Simplified93.8%
Taylor expanded in t around inf 60.2%
if -2.39999999999999991e-40 < t < 2.9000000000000001e-162 or 6.20000000000000024e-113 < t < 1.2e-48Initial program 61.8%
*-commutative61.8%
associate-/l*57.8%
associate-*l/54.5%
Simplified54.5%
Taylor expanded in t around 0 64.1%
if 2.9000000000000001e-162 < t < 6.20000000000000024e-113Initial program 99.6%
*-commutative99.6%
associate-/l*99.4%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in x around 0 75.5%
Taylor expanded in y around 0 69.9%
times-frac69.9%
Simplified69.9%
if 1.58000000000000007e159 < t < 1.6500000000000001e196Initial program 59.7%
*-commutative59.7%
associate-/l*79.2%
associate-*l/79.2%
Simplified79.2%
Taylor expanded in y around 0 53.7%
Taylor expanded in x around 0 26.9%
associate-/l*67.6%
distribute-rgt-in67.6%
*-lft-identity67.6%
*-commutative67.6%
Simplified67.6%
Final simplification62.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.52e+72) (not (<= y 3.7e+147))) (/ (+ z (* x (/ t y))) b) (/ (+ x (* y (/ z t))) (+ (* b (/ y t)) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.52e+72) || !(y <= 3.7e+147)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = (x + (y * (z / t))) / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.52d+72)) .or. (.not. (y <= 3.7d+147))) then
tmp = (z + (x * (t / y))) / b
else
tmp = (x + (y * (z / t))) / ((b * (y / t)) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.52e+72) || !(y <= 3.7e+147)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = (x + (y * (z / t))) / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.52e+72) or not (y <= 3.7e+147): tmp = (z + (x * (t / y))) / b else: tmp = (x + (y * (z / t))) / ((b * (y / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.52e+72) || !(y <= 3.7e+147)) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.52e+72) || ~((y <= 3.7e+147))) tmp = (z + (x * (t / y))) / b; else tmp = (x + (y * (z / t))) / ((b * (y / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.52e+72], N[Not[LessEqual[y, 3.7e+147]], $MachinePrecision]], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.52 \cdot 10^{+72} \lor \neg \left(y \leq 3.7 \cdot 10^{+147}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -1.52e72 or 3.7e147 < y Initial program 43.2%
*-commutative43.2%
associate-/l*39.1%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in y around inf 59.2%
associate--l+59.2%
times-frac56.0%
associate-*r*55.9%
unpow255.9%
Simplified55.9%
Taylor expanded in b around inf 76.8%
+-commutative76.8%
associate-*l/78.3%
*-commutative78.3%
Simplified78.3%
if -1.52e72 < y < 3.7e147Initial program 87.7%
*-commutative87.7%
associate-/l*91.1%
associate-*l/91.1%
Simplified91.1%
associate-/r/33.7%
Applied egg-rr88.7%
Final simplification85.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.4e+72) (not (<= y 3.7e+147))) (/ (+ z (* x (/ t y))) b) (/ (+ x (/ z (/ t y))) (+ (* b (/ y t)) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e+72) || !(y <= 3.7e+147)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = (x + (z / (t / y))) / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.4d+72)) .or. (.not. (y <= 3.7d+147))) then
tmp = (z + (x * (t / y))) / b
else
tmp = (x + (z / (t / y))) / ((b * (y / t)) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e+72) || !(y <= 3.7e+147)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = (x + (z / (t / y))) / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.4e+72) or not (y <= 3.7e+147): tmp = (z + (x * (t / y))) / b else: tmp = (x + (z / (t / y))) / ((b * (y / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.4e+72) || !(y <= 3.7e+147)) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.4e+72) || ~((y <= 3.7e+147))) tmp = (z + (x * (t / y))) / b; else tmp = (x + (z / (t / y))) / ((b * (y / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.4e+72], N[Not[LessEqual[y, 3.7e+147]], $MachinePrecision]], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+72} \lor \neg \left(y \leq 3.7 \cdot 10^{+147}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -5.4000000000000001e72 or 3.7e147 < y Initial program 43.2%
*-commutative43.2%
associate-/l*39.1%
associate-*l/44.9%
Simplified44.9%
Taylor expanded in y around inf 59.2%
associate--l+59.2%
times-frac56.0%
associate-*r*55.9%
unpow255.9%
Simplified55.9%
Taylor expanded in b around inf 76.8%
+-commutative76.8%
associate-*l/78.3%
*-commutative78.3%
Simplified78.3%
if -5.4000000000000001e72 < y < 3.7e147Initial program 87.7%
*-commutative87.7%
associate-/l*91.1%
associate-*l/91.1%
Simplified91.1%
Final simplification87.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0))))
(if (<= t -8.8e+212)
t_1
(if (<= t -2.6e-18)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (or (<= t -6.5e-53) (not (<= t 9e-49)))
t_1
(/ (+ z (* x (/ t y))) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -8.8e+212) {
tmp = t_1;
} else if (t <= -2.6e-18) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if ((t <= -6.5e-53) || !(t <= 9e-49)) {
tmp = t_1;
} else {
tmp = (z + (x * (t / y))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / (a + 1.0d0)
if (t <= (-8.8d+212)) then
tmp = t_1
else if (t <= (-2.6d-18)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if ((t <= (-6.5d-53)) .or. (.not. (t <= 9d-49))) then
tmp = t_1
else
tmp = (z + (x * (t / y))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / (a + 1.0);
double tmp;
if (t <= -8.8e+212) {
tmp = t_1;
} else if (t <= -2.6e-18) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if ((t <= -6.5e-53) || !(t <= 9e-49)) {
tmp = t_1;
} else {
tmp = (z + (x * (t / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / (a + 1.0) tmp = 0 if t <= -8.8e+212: tmp = t_1 elif t <= -2.6e-18: tmp = x / (1.0 + (a + ((y * b) / t))) elif (t <= -6.5e-53) or not (t <= 9e-49): tmp = t_1 else: tmp = (z + (x * (t / y))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)) tmp = 0.0 if (t <= -8.8e+212) tmp = t_1; elseif (t <= -2.6e-18) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif ((t <= -6.5e-53) || !(t <= 9e-49)) tmp = t_1; else tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / (a + 1.0); tmp = 0.0; if (t <= -8.8e+212) tmp = t_1; elseif (t <= -2.6e-18) tmp = x / (1.0 + (a + ((y * b) / t))); elseif ((t <= -6.5e-53) || ~((t <= 9e-49))) tmp = t_1; else tmp = (z + (x * (t / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e+212], t$95$1, If[LessEqual[t, -2.6e-18], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -6.5e-53], N[Not[LessEqual[t, 9e-49]], $MachinePrecision]], t$95$1, N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{+212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-18}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-53} \lor \neg \left(t \leq 9 \cdot 10^{-49}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\end{array}
\end{array}
if t < -8.7999999999999998e212 or -2.6e-18 < t < -6.4999999999999997e-53 or 9.0000000000000004e-49 < t Initial program 82.7%
*-commutative82.7%
associate-/l*88.3%
associate-*l/93.3%
Simplified93.3%
associate-/r/39.3%
Applied egg-rr94.6%
Taylor expanded in y around 0 77.0%
if -8.7999999999999998e212 < t < -2.6e-18Initial program 85.0%
*-commutative85.0%
associate-/l*87.9%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in x around inf 80.1%
if -6.4999999999999997e-53 < t < 9.0000000000000004e-49Initial program 64.0%
*-commutative64.0%
associate-/l*60.2%
associate-*l/57.0%
Simplified57.0%
Taylor expanded in y around inf 63.1%
associate--l+63.1%
times-frac60.3%
associate-*r*64.0%
unpow264.0%
Simplified64.0%
Taylor expanded in b around inf 71.9%
+-commutative71.9%
associate-*l/71.1%
*-commutative71.1%
Simplified71.1%
Final simplification75.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* x (/ t y))) b)))
(if (<= y -2.5e+63)
t_1
(if (<= y 1.22e-52)
(/ (+ x (/ z (/ t y))) (+ a 1.0))
(if (or (<= y 21000000.0) (not (<= y 1.9e+56)))
t_1
(/ (+ x (* y (/ z t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x * (t / y))) / b;
double tmp;
if (y <= -2.5e+63) {
tmp = t_1;
} else if (y <= 1.22e-52) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else if ((y <= 21000000.0) || !(y <= 1.9e+56)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + (x * (t / y))) / b
if (y <= (-2.5d+63)) then
tmp = t_1
else if (y <= 1.22d-52) then
tmp = (x + (z / (t / y))) / (a + 1.0d0)
else if ((y <= 21000000.0d0) .or. (.not. (y <= 1.9d+56))) then
tmp = t_1
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 t_1 = (z + (x * (t / y))) / b;
double tmp;
if (y <= -2.5e+63) {
tmp = t_1;
} else if (y <= 1.22e-52) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else if ((y <= 21000000.0) || !(y <= 1.9e+56)) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x * (t / y))) / b tmp = 0 if y <= -2.5e+63: tmp = t_1 elif y <= 1.22e-52: tmp = (x + (z / (t / y))) / (a + 1.0) elif (y <= 21000000.0) or not (y <= 1.9e+56): tmp = t_1 else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x * Float64(t / y))) / b) tmp = 0.0 if (y <= -2.5e+63) tmp = t_1; elseif (y <= 1.22e-52) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); elseif ((y <= 21000000.0) || !(y <= 1.9e+56)) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x * (t / y))) / b; tmp = 0.0; if (y <= -2.5e+63) tmp = t_1; elseif (y <= 1.22e-52) tmp = (x + (z / (t / y))) / (a + 1.0); elseif ((y <= 21000000.0) || ~((y <= 1.9e+56))) tmp = t_1; else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.5e+63], t$95$1, If[LessEqual[y, 1.22e-52], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 21000000.0], N[Not[LessEqual[y, 1.9e+56]], $MachinePrecision]], t$95$1, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{-52}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\mathbf{elif}\;y \leq 21000000 \lor \neg \left(y \leq 1.9 \cdot 10^{+56}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -2.50000000000000005e63 or 1.22e-52 < y < 2.1e7 or 1.89999999999999998e56 < y Initial program 48.5%
*-commutative48.5%
associate-/l*51.3%
associate-*l/55.3%
Simplified55.3%
Taylor expanded in y around inf 54.6%
associate--l+54.6%
times-frac52.3%
associate-*r*54.2%
unpow254.2%
Simplified54.2%
Taylor expanded in b around inf 72.3%
+-commutative72.3%
associate-*l/73.3%
*-commutative73.3%
Simplified73.3%
if -2.50000000000000005e63 < y < 1.22e-52Initial program 94.4%
*-commutative94.4%
associate-/l*94.1%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in y around 0 74.2%
if 2.1e7 < y < 1.89999999999999998e56Initial program 70.7%
*-commutative70.7%
associate-/l*80.1%
associate-*l/80.1%
Simplified80.1%
associate-/r/61.2%
Applied egg-rr80.4%
Taylor expanded in y around 0 80.5%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* x (/ t y))) b)))
(if (<= y -1.32e+70)
t_1
(if (<= y 6.5e-53)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (or (<= y 7200000.0) (not (<= y 3e+57)))
t_1
(/ (+ x (* y (/ z t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x * (t / y))) / b;
double tmp;
if (y <= -1.32e+70) {
tmp = t_1;
} else if (y <= 6.5e-53) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 7200000.0) || !(y <= 3e+57)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + (x * (t / y))) / b
if (y <= (-1.32d+70)) then
tmp = t_1
else if (y <= 6.5d-53) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if ((y <= 7200000.0d0) .or. (.not. (y <= 3d+57))) then
tmp = t_1
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 t_1 = (z + (x * (t / y))) / b;
double tmp;
if (y <= -1.32e+70) {
tmp = t_1;
} else if (y <= 6.5e-53) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if ((y <= 7200000.0) || !(y <= 3e+57)) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x * (t / y))) / b tmp = 0 if y <= -1.32e+70: tmp = t_1 elif y <= 6.5e-53: tmp = (x + ((y * z) / t)) / (a + 1.0) elif (y <= 7200000.0) or not (y <= 3e+57): tmp = t_1 else: tmp = (x + (y * (z / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x * Float64(t / y))) / b) tmp = 0.0 if (y <= -1.32e+70) tmp = t_1; elseif (y <= 6.5e-53) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif ((y <= 7200000.0) || !(y <= 3e+57)) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x * (t / y))) / b; tmp = 0.0; if (y <= -1.32e+70) tmp = t_1; elseif (y <= 6.5e-53) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif ((y <= 7200000.0) || ~((y <= 3e+57))) tmp = t_1; else tmp = (x + (y * (z / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.32e+70], t$95$1, If[LessEqual[y, 6.5e-53], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 7200000.0], N[Not[LessEqual[y, 3e+57]], $MachinePrecision]], t$95$1, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-53}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 7200000 \lor \neg \left(y \leq 3 \cdot 10^{+57}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -1.3199999999999999e70 or 6.4999999999999997e-53 < y < 7.2e6 or 3e57 < y Initial program 48.5%
*-commutative48.5%
associate-/l*51.3%
associate-*l/55.3%
Simplified55.3%
Taylor expanded in y around inf 54.6%
associate--l+54.6%
times-frac52.3%
associate-*r*54.2%
unpow254.2%
Simplified54.2%
Taylor expanded in b around inf 72.3%
+-commutative72.3%
associate-*l/73.3%
*-commutative73.3%
Simplified73.3%
if -1.3199999999999999e70 < y < 6.4999999999999997e-53Initial program 94.4%
*-commutative94.4%
associate-/l*94.1%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in b around 0 74.5%
if 7.2e6 < y < 3e57Initial program 70.7%
*-commutative70.7%
associate-/l*80.1%
associate-*l/80.1%
Simplified80.1%
associate-/r/61.2%
Applied egg-rr80.4%
Taylor expanded in y around 0 80.5%
Final simplification74.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* x (/ t y))) b)))
(if (<= y -3e-28)
t_1
(if (<= y 5e-55)
(/ x (+ a 1.0))
(if (or (<= y 48000000.0) (not (<= y 3.1e+55)))
t_1
(+ x (* y (/ z t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x * (t / y))) / b;
double tmp;
if (y <= -3e-28) {
tmp = t_1;
} else if (y <= 5e-55) {
tmp = x / (a + 1.0);
} else if ((y <= 48000000.0) || !(y <= 3.1e+55)) {
tmp = t_1;
} else {
tmp = x + (y * (z / 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) :: t_1
real(8) :: tmp
t_1 = (z + (x * (t / y))) / b
if (y <= (-3d-28)) then
tmp = t_1
else if (y <= 5d-55) then
tmp = x / (a + 1.0d0)
else if ((y <= 48000000.0d0) .or. (.not. (y <= 3.1d+55))) then
tmp = t_1
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x * (t / y))) / b;
double tmp;
if (y <= -3e-28) {
tmp = t_1;
} else if (y <= 5e-55) {
tmp = x / (a + 1.0);
} else if ((y <= 48000000.0) || !(y <= 3.1e+55)) {
tmp = t_1;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x * (t / y))) / b tmp = 0 if y <= -3e-28: tmp = t_1 elif y <= 5e-55: tmp = x / (a + 1.0) elif (y <= 48000000.0) or not (y <= 3.1e+55): tmp = t_1 else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x * Float64(t / y))) / b) tmp = 0.0 if (y <= -3e-28) tmp = t_1; elseif (y <= 5e-55) tmp = Float64(x / Float64(a + 1.0)); elseif ((y <= 48000000.0) || !(y <= 3.1e+55)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x * (t / y))) / b; tmp = 0.0; if (y <= -3e-28) tmp = t_1; elseif (y <= 5e-55) tmp = x / (a + 1.0); elseif ((y <= 48000000.0) || ~((y <= 3.1e+55))) tmp = t_1; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -3e-28], t$95$1, If[LessEqual[y, 5e-55], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 48000000.0], N[Not[LessEqual[y, 3.1e+55]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{if}\;y \leq -3 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 48000000 \lor \neg \left(y \leq 3.1 \cdot 10^{+55}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if y < -3.00000000000000003e-28 or 5.0000000000000002e-55 < y < 4.8e7 or 3.09999999999999994e55 < y Initial program 52.9%
*-commutative52.9%
associate-/l*56.2%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in y around inf 51.4%
associate--l+51.4%
times-frac48.8%
associate-*r*51.3%
unpow251.3%
Simplified51.3%
Taylor expanded in b around inf 67.7%
+-commutative67.7%
associate-*l/68.6%
*-commutative68.6%
Simplified68.6%
if -3.00000000000000003e-28 < y < 5.0000000000000002e-55Initial program 96.1%
*-commutative96.1%
associate-/l*95.0%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in t around inf 62.6%
if 4.8e7 < y < 3.09999999999999994e55Initial program 70.7%
*-commutative70.7%
associate-/l*80.1%
associate-*l/80.1%
Simplified80.1%
Taylor expanded in y around 0 80.2%
Taylor expanded in a around 0 51.7%
+-commutative51.7%
*-commutative51.7%
associate-/l*61.0%
Simplified61.0%
associate-/r/61.2%
Applied egg-rr61.2%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.3e-39)
t_1
(if (<= t 5.7e-164)
(/ z b)
(if (<= t 1.05e-116)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= t 1.25e-48) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.3e-39) {
tmp = t_1;
} else if (t <= 5.7e-164) {
tmp = z / b;
} else if (t <= 1.05e-116) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 1.25e-48) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.3d-39)) then
tmp = t_1
else if (t <= 5.7d-164) then
tmp = z / b
else if (t <= 1.05d-116) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (t <= 1.25d-48) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.3e-39) {
tmp = t_1;
} else if (t <= 5.7e-164) {
tmp = z / b;
} else if (t <= 1.05e-116) {
tmp = (y / t) * (z / (a + 1.0));
} else if (t <= 1.25e-48) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.3e-39: tmp = t_1 elif t <= 5.7e-164: tmp = z / b elif t <= 1.05e-116: tmp = (y / t) * (z / (a + 1.0)) elif t <= 1.25e-48: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.3e-39) tmp = t_1; elseif (t <= 5.7e-164) tmp = Float64(z / b); elseif (t <= 1.05e-116) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (t <= 1.25e-48) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.3e-39) tmp = t_1; elseif (t <= 5.7e-164) tmp = z / b; elseif (t <= 1.05e-116) tmp = (y / t) * (z / (a + 1.0)); elseif (t <= 1.25e-48) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e-39], t$95$1, If[LessEqual[t, 5.7e-164], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.05e-116], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e-48], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{-164}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-116}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-48}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.3e-39 or 1.25e-48 < t Initial program 83.0%
*-commutative83.0%
associate-/l*88.1%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in t around inf 57.8%
if -1.3e-39 < t < 5.70000000000000023e-164 or 1.05e-116 < t < 1.25e-48Initial program 61.8%
*-commutative61.8%
associate-/l*57.8%
associate-*l/54.5%
Simplified54.5%
Taylor expanded in t around 0 64.1%
if 5.70000000000000023e-164 < t < 1.05e-116Initial program 99.6%
*-commutative99.6%
associate-/l*99.4%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in x around 0 75.5%
Taylor expanded in y around 0 69.9%
times-frac69.9%
Simplified69.9%
Final simplification60.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e+68) (not (<= y 4.9e+55))) (/ (+ z (* x (/ t y))) b) (/ x (+ 1.0 (+ a (/ (* y b) t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e+68) || !(y <= 4.9e+55)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.15d+68)) .or. (.not. (y <= 4.9d+55))) then
tmp = (z + (x * (t / y))) / b
else
tmp = x / (1.0d0 + (a + ((y * b) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e+68) || !(y <= 4.9e+55)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e+68) or not (y <= 4.9e+55): tmp = (z + (x * (t / y))) / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e+68) || !(y <= 4.9e+55)) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e+68) || ~((y <= 4.9e+55))) tmp = (z + (x * (t / y))) / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e+68], N[Not[LessEqual[y, 4.9e+55]], $MachinePrecision]], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+68} \lor \neg \left(y \leq 4.9 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -1.15e68 or 4.90000000000000015e55 < y Initial program 45.4%
*-commutative45.4%
associate-/l*47.4%
associate-*l/52.0%
Simplified52.0%
Taylor expanded in y around inf 54.5%
associate--l+54.5%
times-frac52.0%
associate-*r*54.2%
unpow254.2%
Simplified54.2%
Taylor expanded in b around inf 73.2%
+-commutative73.2%
associate-*l/74.4%
*-commutative74.4%
Simplified74.4%
if -1.15e68 < y < 4.90000000000000015e55Initial program 91.6%
*-commutative91.6%
associate-/l*92.5%
associate-*l/92.5%
Simplified92.5%
Taylor expanded in x around inf 67.4%
Final simplification69.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2e-36) (not (<= t 1.22e-48))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e-36) || !(t <= 1.22e-48)) {
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 <= (-2d-36)) .or. (.not. (t <= 1.22d-48))) 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 <= -2e-36) || !(t <= 1.22e-48)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2e-36) or not (t <= 1.22e-48): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2e-36) || !(t <= 1.22e-48)) 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 <= -2e-36) || ~((t <= 1.22e-48))) 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, -2e-36], N[Not[LessEqual[t, 1.22e-48]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-36} \lor \neg \left(t \leq 1.22 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.9999999999999999e-36 or 1.21999999999999993e-48 < t Initial program 83.0%
*-commutative83.0%
associate-/l*88.1%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in t around inf 57.8%
if -1.9999999999999999e-36 < t < 1.21999999999999993e-48Initial program 64.6%
*-commutative64.6%
associate-/l*60.9%
associate-*l/57.8%
Simplified57.8%
Taylor expanded in t around 0 60.6%
Final simplification59.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -4.2e-12) (/ x a) (if (<= a 27000000000000.0) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.2e-12) {
tmp = x / a;
} else if (a <= 27000000000000.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 <= (-4.2d-12)) then
tmp = x / a
else if (a <= 27000000000000.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 <= -4.2e-12) {
tmp = x / a;
} else if (a <= 27000000000000.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.2e-12: tmp = x / a elif a <= 27000000000000.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.2e-12) tmp = Float64(x / a); elseif (a <= 27000000000000.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 <= -4.2e-12) tmp = x / a; elseif (a <= 27000000000000.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.2e-12], N[(x / a), $MachinePrecision], If[LessEqual[a, 27000000000000.0], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 27000000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -4.19999999999999988e-12 or 2.7e13 < a Initial program 75.7%
*-commutative75.7%
associate-/l*75.2%
associate-*l/78.1%
Simplified78.1%
Taylor expanded in x around inf 53.7%
Taylor expanded in a around inf 46.4%
if -4.19999999999999988e-12 < a < 2.7e13Initial program 74.7%
*-commutative74.7%
associate-/l*77.7%
associate-*l/78.1%
Simplified78.1%
Taylor expanded in t around inf 34.6%
Taylor expanded in a around 0 33.5%
Final simplification39.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.5e+19) (/ x a) (if (<= t 2.3e+18) (/ z b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.5e+19) {
tmp = x / a;
} else if (t <= 2.3e+18) {
tmp = z / b;
} 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 (t <= (-2.5d+19)) then
tmp = x / a
else if (t <= 2.3d+18) then
tmp = z / b
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 (t <= -2.5e+19) {
tmp = x / a;
} else if (t <= 2.3e+18) {
tmp = z / b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.5e+19: tmp = x / a elif t <= 2.3e+18: tmp = z / b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.5e+19) tmp = Float64(x / a); elseif (t <= 2.3e+18) tmp = Float64(z / b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.5e+19) tmp = x / a; elseif (t <= 2.3e+18) tmp = z / b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.5e+19], N[(x / a), $MachinePrecision], If[LessEqual[t, 2.3e+18], N[(z / b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+18}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.5e19Initial program 85.0%
*-commutative85.0%
associate-/l*89.8%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 76.1%
Taylor expanded in a around inf 43.4%
if -2.5e19 < t < 2.3e18Initial program 69.5%
*-commutative69.5%
associate-/l*66.5%
associate-*l/64.0%
Simplified64.0%
Taylor expanded in t around 0 52.8%
if 2.3e18 < t Initial program 78.1%
*-commutative78.1%
associate-/l*85.6%
associate-*l/92.2%
Simplified92.2%
Taylor expanded in t around inf 51.9%
Taylor expanded in a around 0 34.2%
Final simplification46.3%
(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 75.2%
*-commutative75.2%
associate-/l*76.5%
associate-*l/78.1%
Simplified78.1%
Taylor expanded in t around inf 40.3%
Taylor expanded in a around 0 19.2%
Final simplification19.2%
(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 2023199
(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))))