
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(t_2 (/ (+ b (- (* x (* 9.0 y)) (* (* z 4.0) (* t a)))) (* z c))))
(if (<= t_1 -4e-321)
t_2
(if (<= t_1 0.0)
(* (+ (* (* t a) -4.0) (/ b z)) (/ 1.0 c))
(if (<= t_1 INFINITY) t_2 (/ (* a -4.0) (/ c t)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
double tmp;
if (t_1 <= -4e-321) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = (a * -4.0) / (c / t);
}
return tmp;
}
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
double tmp;
if (t_1 <= -4e-321) {
tmp = t_2;
} else if (t_1 <= 0.0) {
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = (a * -4.0) / (c / t);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c) t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c) tmp = 0 if t_1 <= -4e-321: tmp = t_2 elif t_1 <= 0.0: tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c) elif t_1 <= math.inf: tmp = t_2 else: tmp = (a * -4.0) / (c / t) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_2 = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -4e-321) tmp = t_2; elseif (t_1 <= 0.0) tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) * Float64(1.0 / c)); elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(Float64(a * -4.0) / Float64(c / t)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
t_2 = (b + ((x * (9.0 * y)) - ((z * 4.0) * (t * a)))) / (z * c);
tmp = 0.0;
if (t_1 <= -4e-321)
tmp = t_2;
elseif (t_1 <= 0.0)
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = (a * -4.0) / (c / t);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e-321], t$95$2, If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$2, N[(N[(a * -4.0), $MachinePrecision] / N[(c / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_2 := \frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-321}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= x -3.9e+102) (not (<= x 2.6e-56))) (/ (- (* 9.0 (* x y)) (* 4.0 (* a (* z t)))) (* z c)) (* (+ (* (* t a) -4.0) (/ b z)) (/ 1.0 c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -3.9e+102) || !(x <= 2.6e-56)) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((x <= (-3.9d+102)) .or. (.not. (x <= 2.6d-56))) then
tmp = ((9.0d0 * (x * y)) - (4.0d0 * (a * (z * t)))) / (z * c)
else
tmp = (((t * a) * (-4.0d0)) + (b / z)) * (1.0d0 / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -3.9e+102) || !(x <= 2.6e-56)) {
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (x <= -3.9e+102) or not (x <= 2.6e-56): tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c) else: tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((x <= -3.9e+102) || !(x <= 2.6e-56)) tmp = Float64(Float64(Float64(9.0 * Float64(x * y)) - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); else tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) * Float64(1.0 / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((x <= -3.9e+102) || ~((x <= 2.6e-56)))
tmp = ((9.0 * (x * y)) - (4.0 * (a * (z * t)))) / (z * c);
else
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[x, -3.9e+102], N[Not[LessEqual[x, 2.6e-56]], $MachinePrecision]], N[(N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{+102} \lor \neg \left(x \leq 2.6 \cdot 10^{-56}\right):\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ y c) (/ x z)))))
(if (<= y -1.5e-7)
t_1
(if (<= y -3.9e-227)
(/ (* a -4.0) (/ c t))
(if (<= y 2e-285)
(/ 1.0 (/ z (/ b c)))
(if (<= y 1.25e-31)
(* t (/ (* a -4.0) c))
(if (<= y 1.3e+111) (/ b (* z c)) t_1)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / c) * (x / z));
double tmp;
if (y <= -1.5e-7) {
tmp = t_1;
} else if (y <= -3.9e-227) {
tmp = (a * -4.0) / (c / t);
} else if (y <= 2e-285) {
tmp = 1.0 / (z / (b / c));
} else if (y <= 1.25e-31) {
tmp = t * ((a * -4.0) / c);
} else if (y <= 1.3e+111) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = 9.0d0 * ((y / c) * (x / z))
if (y <= (-1.5d-7)) then
tmp = t_1
else if (y <= (-3.9d-227)) then
tmp = (a * (-4.0d0)) / (c / t)
else if (y <= 2d-285) then
tmp = 1.0d0 / (z / (b / c))
else if (y <= 1.25d-31) then
tmp = t * ((a * (-4.0d0)) / c)
else if (y <= 1.3d+111) then
tmp = b / (z * c)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / c) * (x / z));
double tmp;
if (y <= -1.5e-7) {
tmp = t_1;
} else if (y <= -3.9e-227) {
tmp = (a * -4.0) / (c / t);
} else if (y <= 2e-285) {
tmp = 1.0 / (z / (b / c));
} else if (y <= 1.25e-31) {
tmp = t * ((a * -4.0) / c);
} else if (y <= 1.3e+111) {
tmp = b / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * ((y / c) * (x / z)) tmp = 0 if y <= -1.5e-7: tmp = t_1 elif y <= -3.9e-227: tmp = (a * -4.0) / (c / t) elif y <= 2e-285: tmp = 1.0 / (z / (b / c)) elif y <= 1.25e-31: tmp = t * ((a * -4.0) / c) elif y <= 1.3e+111: tmp = b / (z * c) else: tmp = t_1 return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) tmp = 0.0 if (y <= -1.5e-7) tmp = t_1; elseif (y <= -3.9e-227) tmp = Float64(Float64(a * -4.0) / Float64(c / t)); elseif (y <= 2e-285) tmp = Float64(1.0 / Float64(z / Float64(b / c))); elseif (y <= 1.25e-31) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); elseif (y <= 1.3e+111) tmp = Float64(b / Float64(z * c)); else tmp = t_1; end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * ((y / c) * (x / z));
tmp = 0.0;
if (y <= -1.5e-7)
tmp = t_1;
elseif (y <= -3.9e-227)
tmp = (a * -4.0) / (c / t);
elseif (y <= 2e-285)
tmp = 1.0 / (z / (b / c));
elseif (y <= 1.25e-31)
tmp = t * ((a * -4.0) / c);
elseif (y <= 1.3e+111)
tmp = b / (z * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.5e-7], t$95$1, If[LessEqual[y, -3.9e-227], N[(N[(a * -4.0), $MachinePrecision] / N[(c / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e-285], N[(1.0 / N[(z / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e-31], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+111], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-227}:\\
\;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-285}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+111}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -1.7e-7)
(/ y (/ c (/ x (/ z 9.0))))
(if (<= y -2.4e-224)
(/ (* a -4.0) (/ c t))
(if (<= y 2.7e-285)
(/ 1.0 (/ z (/ b c)))
(if (<= y 1.6e-31)
(* t (/ (* a -4.0) c))
(if (<= y 2.1e+110) (/ b (* z c)) (* 9.0 (* (/ y c) (/ x z)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -1.7e-7) {
tmp = y / (c / (x / (z / 9.0)));
} else if (y <= -2.4e-224) {
tmp = (a * -4.0) / (c / t);
} else if (y <= 2.7e-285) {
tmp = 1.0 / (z / (b / c));
} else if (y <= 1.6e-31) {
tmp = t * ((a * -4.0) / c);
} else if (y <= 2.1e+110) {
tmp = b / (z * c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (y <= (-1.7d-7)) then
tmp = y / (c / (x / (z / 9.0d0)))
else if (y <= (-2.4d-224)) then
tmp = (a * (-4.0d0)) / (c / t)
else if (y <= 2.7d-285) then
tmp = 1.0d0 / (z / (b / c))
else if (y <= 1.6d-31) then
tmp = t * ((a * (-4.0d0)) / c)
else if (y <= 2.1d+110) then
tmp = b / (z * c)
else
tmp = 9.0d0 * ((y / c) * (x / z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -1.7e-7) {
tmp = y / (c / (x / (z / 9.0)));
} else if (y <= -2.4e-224) {
tmp = (a * -4.0) / (c / t);
} else if (y <= 2.7e-285) {
tmp = 1.0 / (z / (b / c));
} else if (y <= 1.6e-31) {
tmp = t * ((a * -4.0) / c);
} else if (y <= 2.1e+110) {
tmp = b / (z * c);
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= -1.7e-7: tmp = y / (c / (x / (z / 9.0))) elif y <= -2.4e-224: tmp = (a * -4.0) / (c / t) elif y <= 2.7e-285: tmp = 1.0 / (z / (b / c)) elif y <= 1.6e-31: tmp = t * ((a * -4.0) / c) elif y <= 2.1e+110: tmp = b / (z * c) else: tmp = 9.0 * ((y / c) * (x / z)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -1.7e-7) tmp = Float64(y / Float64(c / Float64(x / Float64(z / 9.0)))); elseif (y <= -2.4e-224) tmp = Float64(Float64(a * -4.0) / Float64(c / t)); elseif (y <= 2.7e-285) tmp = Float64(1.0 / Float64(z / Float64(b / c))); elseif (y <= 1.6e-31) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); elseif (y <= 2.1e+110) tmp = Float64(b / Float64(z * c)); else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (y <= -1.7e-7)
tmp = y / (c / (x / (z / 9.0)));
elseif (y <= -2.4e-224)
tmp = (a * -4.0) / (c / t);
elseif (y <= 2.7e-285)
tmp = 1.0 / (z / (b / c));
elseif (y <= 1.6e-31)
tmp = t * ((a * -4.0) / c);
elseif (y <= 2.1e+110)
tmp = b / (z * c);
else
tmp = 9.0 * ((y / c) * (x / z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -1.7e-7], N[(y / N[(c / N[(x / N[(z / 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e-224], N[(N[(a * -4.0), $MachinePrecision] / N[(c / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e-285], N[(1.0 / N[(z / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-31], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+110], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\frac{c}{\frac{x}{\frac{z}{9}}}}\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{-224}:\\
\;\;\;\;\frac{a \cdot -4}{\frac{c}{t}}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-285}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-31}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+110}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= x -1.06e+265)
(/ x (* (/ z 9.0) (/ c y)))
(if (<= x 1e+27)
(* (+ (* (* t a) -4.0) (/ b z)) (/ 1.0 c))
(* (/ (* x 9.0) z) (/ y c)))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.06e+265) {
tmp = x / ((z / 9.0) * (c / y));
} else if (x <= 1e+27) {
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
} else {
tmp = ((x * 9.0) / z) * (y / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (x <= (-1.06d+265)) then
tmp = x / ((z / 9.0d0) * (c / y))
else if (x <= 1d+27) then
tmp = (((t * a) * (-4.0d0)) + (b / z)) * (1.0d0 / c)
else
tmp = ((x * 9.0d0) / z) * (y / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (x <= -1.06e+265) {
tmp = x / ((z / 9.0) * (c / y));
} else if (x <= 1e+27) {
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
} else {
tmp = ((x * 9.0) / z) * (y / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if x <= -1.06e+265: tmp = x / ((z / 9.0) * (c / y)) elif x <= 1e+27: tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c) else: tmp = ((x * 9.0) / z) * (y / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (x <= -1.06e+265) tmp = Float64(x / Float64(Float64(z / 9.0) * Float64(c / y))); elseif (x <= 1e+27) tmp = Float64(Float64(Float64(Float64(t * a) * -4.0) + Float64(b / z)) * Float64(1.0 / c)); else tmp = Float64(Float64(Float64(x * 9.0) / z) * Float64(y / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (x <= -1.06e+265)
tmp = x / ((z / 9.0) * (c / y));
elseif (x <= 1e+27)
tmp = (((t * a) * -4.0) + (b / z)) * (1.0 / c);
else
tmp = ((x * 9.0) / z) * (y / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[x, -1.06e+265], N[(x / N[(N[(z / 9.0), $MachinePrecision] * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+27], N[(N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 9.0), $MachinePrecision] / z), $MachinePrecision] * N[(y / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.06 \cdot 10^{+265}:\\
\;\;\;\;\frac{x}{\frac{z}{9} \cdot \frac{c}{y}}\\
\mathbf{elif}\;x \leq 10^{+27}:\\
\;\;\;\;\left(\left(t \cdot a\right) \cdot -4 + \frac{b}{z}\right) \cdot \frac{1}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 9}{z} \cdot \frac{y}{c}\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -1.75e+80) (not (<= b 5.2e-25))) (* (/ b c) (/ 1.0 z)) (* t (/ (* a -4.0) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.75e+80) || !(b <= 5.2e-25)) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t * ((a * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if ((b <= (-1.75d+80)) .or. (.not. (b <= 5.2d-25))) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = t * ((a * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.75e+80) || !(b <= 5.2e-25)) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t * ((a * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.75e+80) or not (b <= 5.2e-25): tmp = (b / c) * (1.0 / z) else: tmp = t * ((a * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.75e+80) || !(b <= 5.2e-25)) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = Float64(t * Float64(Float64(a * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -1.75e+80) || ~((b <= 5.2e-25)))
tmp = (b / c) * (1.0 / z);
else
tmp = t * ((a * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.75e+80], N[Not[LessEqual[b, 5.2e-25]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.75 \cdot 10^{+80} \lor \neg \left(b \leq 5.2 \cdot 10^{-25}\right):\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= b -2.8e+80) (* (/ b c) (/ 1.0 z)) (if (<= b 2e-24) (* t (/ (* a -4.0) c)) (/ 1.0 (/ z (/ b c))))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.8e+80) {
tmp = (b / c) * (1.0 / z);
} else if (b <= 2e-24) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 1.0 / (z / (b / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: tmp
if (b <= (-2.8d+80)) then
tmp = (b / c) * (1.0d0 / z)
else if (b <= 2d-24) then
tmp = t * ((a * (-4.0d0)) / c)
else
tmp = 1.0d0 / (z / (b / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.8e+80) {
tmp = (b / c) * (1.0 / z);
} else if (b <= 2e-24) {
tmp = t * ((a * -4.0) / c);
} else {
tmp = 1.0 / (z / (b / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -2.8e+80: tmp = (b / c) * (1.0 / z) elif b <= 2e-24: tmp = t * ((a * -4.0) / c) else: tmp = 1.0 / (z / (b / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -2.8e+80) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); elseif (b <= 2e-24) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); else tmp = Float64(1.0 / Float64(z / Float64(b / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -2.8e+80)
tmp = (b / c) * (1.0 / z);
elseif (b <= 2e-24)
tmp = t * ((a * -4.0) / c);
else
tmp = 1.0 / (z / (b / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -2.8e+80], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e-24], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(z / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{+80}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-24}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{b}{c}}}\\
\end{array}
\end{array}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
code = b / (z * c)
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
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), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2024010
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))