
(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 11 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 (+ (+ a 1.0) (/ (* y b) t)))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 t_1))
(t_4 (* (/ y t) (/ z t_1))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 1e+273)
(/ t_2 (+ (+ a 1.0) (* b (/ y t))))
(if (<= t_3 INFINITY) t_4 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + ((y * b) / t);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double t_4 = (y / t) * (z / t_1);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= 1e+273) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_4;
} 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 = (a + 1.0) + ((y * b) / t);
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / t_1;
double t_4 = (y / t) * (z / t_1);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_3 <= 1e+273) {
tmp = t_2 / ((a + 1.0) + (b * (y / t)));
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + ((y * b) / t) t_2 = x + ((y * z) / t) t_3 = t_2 / t_1 t_4 = (y / t) * (z / t_1) tmp = 0 if t_3 <= -math.inf: tmp = t_4 elif t_3 <= 1e+273: tmp = t_2 / ((a + 1.0) + (b * (y / t))) elif t_3 <= math.inf: tmp = t_4 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(y / t) * Float64(z / t_1)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= 1e+273) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (t_3 <= Inf) tmp = t_4; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + ((y * b) / t); t_2 = x + ((y * z) / t); t_3 = t_2 / t_1; t_4 = (y / t) * (z / t_1); tmp = 0.0; if (t_3 <= -Inf) tmp = t_4; elseif (t_3 <= 1e+273) tmp = t_2 / ((a + 1.0) + (b * (y / t))); elseif (t_3 <= Inf) tmp = t_4; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, 1e+273], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \frac{y}{t} \cdot \frac{z}{t\_1}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 10^{+273}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 9.99999999999999945e272 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 61.9%
associate-/l*77.3%
associate-/l*77.1%
Simplified77.1%
Taylor expanded in x around 0 73.1%
times-frac93.4%
associate-+r+93.4%
*-commutative93.4%
Simplified93.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.99999999999999945e272Initial program 94.3%
*-commutative94.3%
associate-/l*95.2%
Applied egg-rr95.2%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*1.0%
associate-/l*16.2%
Simplified16.2%
Taylor expanded in y around inf 92.2%
Final simplification94.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* x (+ (/ t y) (/ z x))) b))
(t_2 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
(if (<= z -2.7e+72)
t_2
(if (<= z -2.35e+17)
t_1
(if (<= z 6.2e-80)
(/ x (+ (+ a 1.0) (/ (* y b) t)))
(if (<= z 2.5e-38)
t_1
(if (or (<= z 5e+121) (not (<= z 4.2e+206))) t_2 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * ((t / y) + (z / x))) / b;
double t_2 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (z <= -2.7e+72) {
tmp = t_2;
} else if (z <= -2.35e+17) {
tmp = t_1;
} else if (z <= 6.2e-80) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (z <= 2.5e-38) {
tmp = t_1;
} else if ((z <= 5e+121) || !(z <= 4.2e+206)) {
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 = (x * ((t / y) + (z / x))) / b
t_2 = (x + (y / (t / z))) / (a + 1.0d0)
if (z <= (-2.7d+72)) then
tmp = t_2
else if (z <= (-2.35d+17)) then
tmp = t_1
else if (z <= 6.2d-80) then
tmp = x / ((a + 1.0d0) + ((y * b) / t))
else if (z <= 2.5d-38) then
tmp = t_1
else if ((z <= 5d+121) .or. (.not. (z <= 4.2d+206))) 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 = (x * ((t / y) + (z / x))) / b;
double t_2 = (x + (y / (t / z))) / (a + 1.0);
double tmp;
if (z <= -2.7e+72) {
tmp = t_2;
} else if (z <= -2.35e+17) {
tmp = t_1;
} else if (z <= 6.2e-80) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else if (z <= 2.5e-38) {
tmp = t_1;
} else if ((z <= 5e+121) || !(z <= 4.2e+206)) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x * ((t / y) + (z / x))) / b t_2 = (x + (y / (t / z))) / (a + 1.0) tmp = 0 if z <= -2.7e+72: tmp = t_2 elif z <= -2.35e+17: tmp = t_1 elif z <= 6.2e-80: tmp = x / ((a + 1.0) + ((y * b) / t)) elif z <= 2.5e-38: tmp = t_1 elif (z <= 5e+121) or not (z <= 4.2e+206): tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / b) t_2 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)) tmp = 0.0 if (z <= -2.7e+72) tmp = t_2; elseif (z <= -2.35e+17) tmp = t_1; elseif (z <= 6.2e-80) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); elseif (z <= 2.5e-38) tmp = t_1; elseif ((z <= 5e+121) || !(z <= 4.2e+206)) 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 * ((t / y) + (z / x))) / b; t_2 = (x + (y / (t / z))) / (a + 1.0); tmp = 0.0; if (z <= -2.7e+72) tmp = t_2; elseif (z <= -2.35e+17) tmp = t_1; elseif (z <= 6.2e-80) tmp = x / ((a + 1.0) + ((y * b) / t)); elseif (z <= 2.5e-38) tmp = t_1; elseif ((z <= 5e+121) || ~((z <= 4.2e+206))) 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[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+72], t$95$2, If[LessEqual[z, -2.35e+17], t$95$1, If[LessEqual[z, 6.2e-80], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-38], t$95$1, If[Or[LessEqual[z, 5e+121], N[Not[LessEqual[z, 4.2e+206]], $MachinePrecision]], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
t_2 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+72}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.35 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-80}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+121} \lor \neg \left(z \leq 4.2 \cdot 10^{+206}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if z < -2.7000000000000001e72 or 2.50000000000000017e-38 < z < 5.00000000000000007e121 or 4.19999999999999974e206 < z Initial program 78.7%
associate-/l*79.7%
associate-/l*80.6%
Simplified80.6%
clear-num80.6%
un-div-inv80.6%
Applied egg-rr80.6%
Taylor expanded in y around 0 69.0%
if -2.7000000000000001e72 < z < -2.35e17 or 6.20000000000000032e-80 < z < 2.50000000000000017e-38Initial program 46.4%
associate-/l*37.0%
associate-/l*41.6%
Simplified41.6%
Taylor expanded in x around inf 47.2%
associate-+r+47.2%
*-commutative47.2%
*-commutative47.2%
associate-+r+47.2%
*-commutative47.2%
Simplified47.2%
Taylor expanded in b around inf 85.0%
if -2.35e17 < z < 6.20000000000000032e-80Initial program 95.7%
associate-/l*95.6%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in x around inf 87.0%
associate-+r+87.0%
*-commutative87.0%
Simplified87.0%
if 5.00000000000000007e121 < z < 4.19999999999999974e206Initial program 55.7%
associate-/l*51.2%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in y around inf 67.3%
Final simplification77.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.0)
(/ x a)
(if (<= a -3.5e-71)
x
(if (<= a 1.22e-262)
(/ z b)
(if (<= a 1.3e-18) x (if (<= a 9.4e+151) (/ z b) (/ x a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= -3.5e-71) {
tmp = x;
} else if (a <= 1.22e-262) {
tmp = z / b;
} else if (a <= 1.3e-18) {
tmp = x;
} else if (a <= 9.4e+151) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.0d0)) then
tmp = x / a
else if (a <= (-3.5d-71)) then
tmp = x
else if (a <= 1.22d-262) then
tmp = z / b
else if (a <= 1.3d-18) then
tmp = x
else if (a <= 9.4d+151) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.0) {
tmp = x / a;
} else if (a <= -3.5e-71) {
tmp = x;
} else if (a <= 1.22e-262) {
tmp = z / b;
} else if (a <= 1.3e-18) {
tmp = x;
} else if (a <= 9.4e+151) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.0: tmp = x / a elif a <= -3.5e-71: tmp = x elif a <= 1.22e-262: tmp = z / b elif a <= 1.3e-18: tmp = x elif a <= 9.4e+151: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.0) tmp = Float64(x / a); elseif (a <= -3.5e-71) tmp = x; elseif (a <= 1.22e-262) tmp = Float64(z / b); elseif (a <= 1.3e-18) tmp = x; elseif (a <= 9.4e+151) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.0) tmp = x / a; elseif (a <= -3.5e-71) tmp = x; elseif (a <= 1.22e-262) tmp = z / b; elseif (a <= 1.3e-18) tmp = x; elseif (a <= 9.4e+151) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, -3.5e-71], x, If[LessEqual[a, 1.22e-262], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.3e-18], x, If[LessEqual[a, 9.4e+151], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-71}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.22 \cdot 10^{-262}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.4 \cdot 10^{+151}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1 or 9.39999999999999978e151 < a Initial program 79.7%
associate-/l*78.9%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in x around inf 60.8%
Taylor expanded in a around inf 54.2%
if -1 < a < -3.4999999999999999e-71 or 1.2199999999999999e-262 < a < 1.3e-18Initial program 93.4%
associate-/l*93.5%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in a around 0 92.5%
Taylor expanded in y around 0 68.2%
Taylor expanded in y around 0 55.9%
if -3.4999999999999999e-71 < a < 1.2199999999999999e-262 or 1.3e-18 < a < 9.39999999999999978e151Initial program 76.6%
associate-/l*75.6%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around inf 51.9%
Final simplification53.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -6.5e-59)
t_1
(if (<= t 3.8e-166)
(/ z b)
(if (<= t 1.5e-74) (/ (* x (+ (/ t y) (/ z x))) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -6.5e-59) {
tmp = t_1;
} else if (t <= 3.8e-166) {
tmp = z / b;
} else if (t <= 1.5e-74) {
tmp = (x * ((t / y) + (z / x))) / 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) + (y * (b / t)))
if (t <= (-6.5d-59)) then
tmp = t_1
else if (t <= 3.8d-166) then
tmp = z / b
else if (t <= 1.5d-74) then
tmp = (x * ((t / y) + (z / x))) / 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) + (y * (b / t)));
double tmp;
if (t <= -6.5e-59) {
tmp = t_1;
} else if (t <= 3.8e-166) {
tmp = z / b;
} else if (t <= 1.5e-74) {
tmp = (x * ((t / y) + (z / x))) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -6.5e-59: tmp = t_1 elif t <= 3.8e-166: tmp = z / b elif t <= 1.5e-74: tmp = (x * ((t / y) + (z / x))) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -6.5e-59) tmp = t_1; elseif (t <= 3.8e-166) tmp = Float64(z / b); elseif (t <= 1.5e-74) tmp = Float64(Float64(x * Float64(Float64(t / y) + Float64(z / x))) / 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) + (y * (b / t))); tmp = 0.0; if (t <= -6.5e-59) tmp = t_1; elseif (t <= 3.8e-166) tmp = z / b; elseif (t <= 1.5e-74) tmp = (x * ((t / y) + (z / x))) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e-59], t$95$1, If[LessEqual[t, 3.8e-166], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.5e-74], N[(N[(x * N[(N[(t / y), $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.50000000000000017e-59 or 1.50000000000000003e-74 < t Initial program 88.0%
associate-/l*89.8%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in x around inf 70.5%
if -6.50000000000000017e-59 < t < 3.79999999999999982e-166Initial program 65.2%
associate-/l*57.9%
associate-/l*56.2%
Simplified56.2%
Taylor expanded in y around inf 67.6%
if 3.79999999999999982e-166 < t < 1.50000000000000003e-74Initial program 84.4%
associate-/l*84.4%
associate-/l*74.3%
Simplified74.3%
Taylor expanded in x around inf 79.3%
associate-+r+79.3%
*-commutative79.3%
*-commutative79.3%
associate-+r+79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in b around inf 74.5%
Final simplification70.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.25e+30)
(/ (+ x (* z (/ y t))) a)
(if (<= a 1.85e+15)
(/ (+ x (/ (* y z) t)) (+ 1.0 (/ (* y b) t)))
(if (<= a 9.4e+151) (/ z b) (/ (+ x (/ y (/ t z))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.25e+30) {
tmp = (x + (z * (y / t))) / a;
} else if (a <= 1.85e+15) {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
} else if (a <= 9.4e+151) {
tmp = z / b;
} else {
tmp = (x + (y / (t / z))) / 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 <= (-1.25d+30)) then
tmp = (x + (z * (y / t))) / a
else if (a <= 1.85d+15) then
tmp = (x + ((y * z) / t)) / (1.0d0 + ((y * b) / t))
else if (a <= 9.4d+151) then
tmp = z / b
else
tmp = (x + (y / (t / z))) / 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 <= -1.25e+30) {
tmp = (x + (z * (y / t))) / a;
} else if (a <= 1.85e+15) {
tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t));
} else if (a <= 9.4e+151) {
tmp = z / b;
} else {
tmp = (x + (y / (t / z))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.25e+30: tmp = (x + (z * (y / t))) / a elif a <= 1.85e+15: tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)) elif a <= 9.4e+151: tmp = z / b else: tmp = (x + (y / (t / z))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.25e+30) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); elseif (a <= 1.85e+15) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (a <= 9.4e+151) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.25e+30) tmp = (x + (z * (y / t))) / a; elseif (a <= 1.85e+15) tmp = (x + ((y * z) / t)) / (1.0 + ((y * b) / t)); elseif (a <= 9.4e+151) tmp = z / b; else tmp = (x + (y / (t / z))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.25e+30], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1.85e+15], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.4e+151], N[(z / b), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+30}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{+15}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;a \leq 9.4 \cdot 10^{+151}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\end{array}
\end{array}
if a < -1.25e30Initial program 80.0%
associate-/l*81.8%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in a around inf 68.7%
*-commutative68.7%
associate-/l*72.1%
Applied egg-rr72.1%
if -1.25e30 < a < 1.85e15Initial program 87.4%
associate-/l*84.6%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in a around 0 84.0%
if 1.85e15 < a < 9.39999999999999978e151Initial program 68.1%
associate-/l*75.0%
associate-/l*74.9%
Simplified74.9%
Taylor expanded in y around inf 59.1%
if 9.39999999999999978e151 < a Initial program 75.9%
associate-/l*73.6%
associate-/l*83.9%
Simplified83.9%
clear-num84.0%
un-div-inv83.9%
Applied egg-rr83.9%
Taylor expanded in a around inf 73.6%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.3e-59) (not (<= t 3.3e-184))) (/ x (+ (+ a 1.0) (/ (* y b) t))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.3e-59) || !(t <= 3.3e-184)) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.3d-59)) .or. (.not. (t <= 3.3d-184))) then
tmp = x / ((a + 1.0d0) + ((y * b) / t))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.3e-59) || !(t <= 3.3e-184)) {
tmp = x / ((a + 1.0) + ((y * b) / t));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.3e-59) or not (t <= 3.3e-184): tmp = x / ((a + 1.0) + ((y * b) / t)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.3e-59) || !(t <= 3.3e-184)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.3e-59) || ~((t <= 3.3e-184))) tmp = x / ((a + 1.0) + ((y * b) / t)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.3e-59], N[Not[LessEqual[t, 3.3e-184]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-59} \lor \neg \left(t \leq 3.3 \cdot 10^{-184}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.29999999999999979e-59 or 3.2999999999999997e-184 < t Initial program 87.8%
associate-/l*89.4%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in x around inf 66.9%
associate-+r+66.9%
*-commutative66.9%
Simplified66.9%
if -2.29999999999999979e-59 < t < 3.2999999999999997e-184Initial program 63.5%
associate-/l*55.8%
associate-/l*54.1%
Simplified54.1%
Taylor expanded in y around inf 69.2%
Final simplification67.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.2e-60) (not (<= t 9e-102))) (/ x (+ (+ a 1.0) (* y (/ b t)))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.2e-60) || !(t <= 9e-102)) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.2d-60)) .or. (.not. (t <= 9d-102))) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.2e-60) || !(t <= 9e-102)) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.2e-60) or not (t <= 9e-102): tmp = x / ((a + 1.0) + (y * (b / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.2e-60) || !(t <= 9e-102)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.2e-60) || ~((t <= 9e-102))) tmp = x / ((a + 1.0) + (y * (b / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.2e-60], N[Not[LessEqual[t, 9e-102]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-60} \lor \neg \left(t \leq 9 \cdot 10^{-102}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.19999999999999982e-60 or 8.99999999999999999e-102 < t Initial program 87.8%
associate-/l*89.5%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in x around inf 70.2%
if -4.19999999999999982e-60 < t < 8.99999999999999999e-102Initial program 68.8%
associate-/l*62.8%
associate-/l*60.2%
Simplified60.2%
Taylor expanded in y around inf 63.9%
Final simplification68.3%
(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(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(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[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}
\end{array}
Initial program 81.9%
associate-/l*81.3%
associate-/l*83.1%
Simplified83.1%
Final simplification83.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.4e-52) (not (<= t 5.5e-95))) (/ 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.4e-52) || !(t <= 5.5e-95)) {
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.4d-52)) .or. (.not. (t <= 5.5d-95))) 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.4e-52) || !(t <= 5.5e-95)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.4e-52) or not (t <= 5.5e-95): 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.4e-52) || !(t <= 5.5e-95)) 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.4e-52) || ~((t <= 5.5e-95))) 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.4e-52], N[Not[LessEqual[t, 5.5e-95]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{-52} \lor \neg \left(t \leq 5.5 \cdot 10^{-95}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -6.4000000000000002e-52 or 5.50000000000000003e-95 < t Initial program 87.5%
associate-/l*89.3%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 59.3%
if -6.4000000000000002e-52 < t < 5.50000000000000003e-95Initial program 70.3%
associate-/l*64.6%
associate-/l*59.8%
Simplified59.8%
Taylor expanded in y around inf 62.1%
Final simplification60.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 0.072))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 0.072)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.0d0)) .or. (.not. (a <= 0.072d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 0.072)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 0.072): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 0.072)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.0) || ~((a <= 0.072))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 0.072]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 0.072\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 0.0719999999999999946 < a Initial program 77.7%
associate-/l*78.6%
associate-/l*81.4%
Simplified81.4%
Taylor expanded in x around inf 55.4%
Taylor expanded in a around inf 47.5%
if -1 < a < 0.0719999999999999946Initial program 86.4%
associate-/l*84.2%
associate-/l*85.0%
Simplified85.0%
Taylor expanded in a around 0 86.0%
Taylor expanded in y around 0 54.5%
Taylor expanded in y around 0 44.7%
Final simplification46.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 81.9%
associate-/l*81.3%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in a around 0 53.6%
Taylor expanded in y around 0 28.2%
Taylor expanded in y around 0 23.3%
Final simplification23.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024061
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(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))))