
(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 18 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: t and a 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)))
(t_2 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
(t_3 (/ (/ (+ b (- t_1 (* (* z 4.0) (* t a)))) z) c)))
(if (<= t_2 1e-43)
t_3
(if (<= t_2 1e+290)
(/ (+ b (- t_1 (* a (* z (* 4.0 t))))) (* z c))
(if (<= t_2 INFINITY) t_3 (* (/ (* t a) c) -4.0))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_3 = ((b + (t_1 - ((z * 4.0) * (t * a)))) / z) / c;
double tmp;
if (t_2 <= 1e-43) {
tmp = t_3;
} else if (t_2 <= 1e+290) {
tmp = (b + (t_1 - (a * (z * (4.0 * t))))) / (z * c);
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
assert t < a;
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);
double t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_3 = ((b + (t_1 - ((z * 4.0) * (t * a)))) / z) / c;
double tmp;
if (t_2 <= 1e-43) {
tmp = t_3;
} else if (t_2 <= 1e+290) {
tmp = (b + (t_1 - (a * (z * (4.0 * t))))) / (z * c);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = x * (9.0 * y) t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c) t_3 = ((b + (t_1 - ((z * 4.0) * (t * a)))) / z) / c tmp = 0 if t_2 <= 1e-43: tmp = t_3 elif t_2 <= 1e+290: tmp = (b + (t_1 - (a * (z * (4.0 * t))))) / (z * c) elif t_2 <= math.inf: tmp = t_3 else: tmp = ((t * a) / c) * -4.0 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) t_2 = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_3 = Float64(Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(t * a)))) / z) / c) tmp = 0.0 if (t_2 <= 1e-43) tmp = t_3; elseif (t_2 <= 1e+290) tmp = Float64(Float64(b + Float64(t_1 - Float64(a * Float64(z * Float64(4.0 * t))))) / Float64(z * c)); elseif (t_2 <= Inf) tmp = t_3; else tmp = Float64(Float64(Float64(t * a) / c) * -4.0); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = x * (9.0 * y);
t_2 = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
t_3 = ((b + (t_1 - ((z * 4.0) * (t * a)))) / z) / c;
tmp = 0.0;
if (t_2 <= 1e-43)
tmp = t_3;
elseif (t_2 <= 1e+290)
tmp = (b + (t_1 - (a * (z * (4.0 * t))))) / (z * c);
elseif (t_2 <= Inf)
tmp = t_3;
else
tmp = ((t * a) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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$3 = N[(N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-43], t$95$3, If[LessEqual[t$95$2, 1e+290], N[(N[(b + N[(t$95$1 - N[(a * N[(z * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
t_2 := \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_3 := \frac{\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z}}{c}\\
\mathbf{if}\;t_2 \leq 10^{-43}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq 10^{+290}:\\
\;\;\;\;\frac{b + \left(t_1 - a \cdot \left(z \cdot \left(4 \cdot t\right)\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 1.00000000000000008e-43 or 1.00000000000000006e290 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 83.0%
associate-+l-83.0%
*-commutative83.0%
associate-*r*80.9%
*-commutative80.9%
associate-+l-80.9%
Simplified84.0%
*-un-lft-identity84.0%
times-frac87.7%
associate-+l-87.7%
associate-*r*87.2%
associate-+l-87.2%
associate-*l*87.2%
associate-*r*87.8%
Applied egg-rr87.8%
associate-*l/87.9%
*-un-lft-identity87.9%
div-inv87.8%
associate-*l/90.1%
un-div-inv90.2%
Applied egg-rr90.2%
if 1.00000000000000008e-43 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 1.00000000000000006e290Initial program 99.6%
associate-+l-99.6%
*-commutative99.6%
associate-*r*97.0%
*-commutative97.0%
associate-+l-97.0%
Simplified94.6%
associate-*r*99.6%
cancel-sign-sub-inv99.6%
associate-*l*99.6%
associate-*l*99.6%
Applied egg-rr99.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.0%
*-commutative1.0%
associate-+l-1.0%
Simplified1.0%
Taylor expanded in z around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification89.4%
NOTE: t and a 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))
(t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c))))
(if (<= t_2 -5e-209)
(/ (+ b (- t_1 (* (* z 4.0) (* t a)))) (* z c))
(if (<= t_2 0.0)
(/ (* (/ 1.0 z) (+ b (* 9.0 (* x y)))) c)
(if (<= t_2 INFINITY) t_2 (* (/ (* t a) c) -4.0))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c);
double tmp;
if (t_2 <= -5e-209) {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
} else if (t_2 <= 0.0) {
tmp = ((1.0 / z) * (b + (9.0 * (x * y)))) / c;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
assert t < a;
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;
double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c);
double tmp;
if (t_2 <= -5e-209) {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
} else if (t_2 <= 0.0) {
tmp = ((1.0 / z) * (b + (9.0 * (x * y)))) / c;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) * y t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c) tmp = 0 if t_2 <= -5e-209: tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c) elif t_2 <= 0.0: tmp = ((1.0 / z) * (b + (9.0 * (x * y)))) / c elif t_2 <= math.inf: tmp = t_2 else: tmp = ((t * a) / c) * -4.0 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) tmp = 0.0 if (t_2 <= -5e-209) tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(1.0 / z) * Float64(b + Float64(9.0 * Float64(x * y)))) / c); elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(Float64(Float64(t * a) / c) * -4.0); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (x * 9.0) * y;
t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c);
tmp = 0.0;
if (t_2 <= -5e-209)
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
elseif (t_2 <= 0.0)
tmp = ((1.0 / z) * (b + (9.0 * (x * y)))) / c;
elseif (t_2 <= Inf)
tmp = t_2;
else
tmp = ((t * a) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-209], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(1.0 / z), $MachinePrecision] * N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-209}:\\
\;\;\;\;\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{\frac{1}{z} \cdot \left(b + 9 \cdot \left(x \cdot y\right)\right)}{c}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -5.0000000000000005e-209Initial program 89.6%
associate-+l-89.6%
*-commutative89.6%
associate-*r*86.0%
*-commutative86.0%
associate-+l-86.0%
Simplified90.6%
if -5.0000000000000005e-209 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -0.0Initial program 34.9%
associate-+l-34.9%
*-commutative34.9%
associate-*r*28.4%
*-commutative28.4%
associate-+l-28.4%
Simplified34.9%
*-un-lft-identity34.9%
times-frac99.5%
associate-+l-99.5%
associate-*r*99.4%
associate-+l-99.4%
associate-*l*99.3%
associate-*r*99.5%
Applied egg-rr99.5%
associate-*r/99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 69.7%
if -0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 90.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.0%
*-commutative1.0%
associate-+l-1.0%
Simplified1.0%
Taylor expanded in z around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification86.7%
NOTE: t and a 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 5e+52)
t_2
(if (<= t_1 1e+290)
t_1
(if (<= t_1 INFINITY) t_2 (* (/ (* t a) c) -4.0))))))assert(t < a);
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 <= 5e+52) {
tmp = t_2;
} else if (t_1 <= 1e+290) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
assert t < a;
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 <= 5e+52) {
tmp = t_2;
} else if (t_1 <= 1e+290) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
[t, a] = sort([t, a]) 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 <= 5e+52: tmp = t_2 elif t_1 <= 1e+290: tmp = t_1 elif t_1 <= math.inf: tmp = t_2 else: tmp = ((t * a) / c) * -4.0 return tmp
t, a = sort([t, a]) 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(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(Float64(z * 4.0) * Float64(t * a)))) / z) / c) tmp = 0.0 if (t_1 <= 5e+52) tmp = t_2; elseif (t_1 <= 1e+290) tmp = t_1; elseif (t_1 <= Inf) tmp = t_2; else tmp = Float64(Float64(Float64(t * a) / c) * -4.0); end return tmp end
t, a = num2cell(sort([t, a])){:}
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 <= 5e+52)
tmp = t_2;
elseif (t_1 <= 1e+290)
tmp = t_1;
elseif (t_1 <= Inf)
tmp = t_2;
else
tmp = ((t * a) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: t and a 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[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+52], t$95$2, If[LessEqual[t$95$1, 1e+290], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\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{\frac{b + \left(x \cdot \left(9 \cdot y\right) - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z}}{c}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{+52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 10^{+290}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 5e52 or 1.00000000000000006e290 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*81.5%
*-commutative81.5%
associate-+l-81.5%
Simplified84.5%
*-un-lft-identity84.5%
times-frac87.7%
associate-+l-87.7%
associate-*r*87.1%
associate-+l-87.1%
associate-*l*87.2%
associate-*r*87.7%
Applied egg-rr87.7%
associate-*l/87.8%
*-un-lft-identity87.8%
div-inv87.7%
associate-*l/90.4%
un-div-inv90.5%
Applied egg-rr90.5%
if 5e52 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 1.00000000000000006e290Initial program 99.6%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.0%
*-commutative1.0%
associate-+l-1.0%
Simplified1.0%
Taylor expanded in z around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification89.4%
NOTE: t and a 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))
(t_2 (/ (+ (- t_1 (* (* (* z 4.0) t) a)) b) (* z c)))
(t_3 (* (* z 4.0) (* t a))))
(if (<= t_2 -5e-246)
(/ (+ b (- t_1 t_3)) (* z c))
(if (<= t_2 INFINITY)
(* (/ 1.0 z) (/ (+ b (- (* x (* 9.0 y)) t_3)) c))
(* (/ (* t a) c) -4.0)))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (x * 9.0) * y;
double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_3 = (z * 4.0) * (t * a);
double tmp;
if (t_2 <= -5e-246) {
tmp = (b + (t_1 - t_3)) / (z * c);
} else if (t_2 <= ((double) INFINITY)) {
tmp = (1.0 / z) * ((b + ((x * (9.0 * y)) - t_3)) / c);
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
assert t < a;
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;
double t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c);
double t_3 = (z * 4.0) * (t * a);
double tmp;
if (t_2 <= -5e-246) {
tmp = (b + (t_1 - t_3)) / (z * c);
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = (1.0 / z) * ((b + ((x * (9.0 * y)) - t_3)) / c);
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (x * 9.0) * y t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c) t_3 = (z * 4.0) * (t * a) tmp = 0 if t_2 <= -5e-246: tmp = (b + (t_1 - t_3)) / (z * c) elif t_2 <= math.inf: tmp = (1.0 / z) * ((b + ((x * (9.0 * y)) - t_3)) / c) else: tmp = ((t * a) / c) * -4.0 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(x * 9.0) * y) t_2 = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) t_3 = Float64(Float64(z * 4.0) * Float64(t * a)) tmp = 0.0 if (t_2 <= -5e-246) tmp = Float64(Float64(b + Float64(t_1 - t_3)) / Float64(z * c)); elseif (t_2 <= Inf) tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - t_3)) / c)); else tmp = Float64(Float64(Float64(t * a) / c) * -4.0); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (x * 9.0) * y;
t_2 = ((t_1 - (((z * 4.0) * t) * a)) + b) / (z * c);
t_3 = (z * 4.0) * (t * a);
tmp = 0.0;
if (t_2 <= -5e-246)
tmp = (b + (t_1 - t_3)) / (z * c);
elseif (t_2 <= Inf)
tmp = (1.0 / z) * ((b + ((x * (9.0 * y)) - t_3)) / c);
else
tmp = ((t * a) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$1 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-246], N[(N[(b + N[(t$95$1 - t$95$3), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\left(t_1 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\
t_3 := \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-246}:\\
\;\;\;\;\frac{b + \left(t_1 - t_3\right)}{z \cdot c}\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + \left(x \cdot \left(9 \cdot y\right) - t_3\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -4.9999999999999997e-246Initial program 89.8%
associate-+l-89.8%
*-commutative89.8%
associate-*r*86.2%
*-commutative86.2%
associate-+l-86.2%
Simplified90.8%
if -4.9999999999999997e-246 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 82.4%
associate-+l-82.4%
*-commutative82.4%
associate-*r*81.4%
*-commutative81.4%
associate-+l-81.4%
Simplified81.7%
*-un-lft-identity81.7%
times-frac92.3%
associate-+l-92.3%
associate-*r*93.0%
associate-+l-93.0%
associate-*l*93.0%
associate-*r*92.3%
Applied egg-rr92.3%
if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) Initial program 0.0%
associate-+l-0.0%
*-commutative0.0%
associate-*r*1.0%
*-commutative1.0%
associate-+l-1.0%
Simplified1.0%
Taylor expanded in z around inf 59.6%
*-commutative59.6%
Simplified59.6%
Final simplification89.3%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* (/ (* t a) c) -4.0) (/ b (* z c)))) (t_2 (* 9.0 (* x y))))
(if (<= z -6.2e-19)
t_1
(if (<= z 4.3e-106)
(/ (+ b t_2) (* z c))
(if (<= z 5900000.0)
(/ (+ b (* (* t a) (* z -4.0))) (* z c))
(if (<= z 1.02e+60)
(/ (- t_2 (* 4.0 (* a (* z t)))) (* z c))
t_1))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * a) / c) * -4.0) + (b / (z * c));
double t_2 = 9.0 * (x * y);
double tmp;
if (z <= -6.2e-19) {
tmp = t_1;
} else if (z <= 4.3e-106) {
tmp = (b + t_2) / (z * c);
} else if (z <= 5900000.0) {
tmp = (b + ((t * a) * (z * -4.0))) / (z * c);
} else if (z <= 1.02e+60) {
tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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) :: t_2
real(8) :: tmp
t_1 = (((t * a) / c) * (-4.0d0)) + (b / (z * c))
t_2 = 9.0d0 * (x * y)
if (z <= (-6.2d-19)) then
tmp = t_1
else if (z <= 4.3d-106) then
tmp = (b + t_2) / (z * c)
else if (z <= 5900000.0d0) then
tmp = (b + ((t * a) * (z * (-4.0d0)))) / (z * c)
else if (z <= 1.02d+60) then
tmp = (t_2 - (4.0d0 * (a * (z * t)))) / (z * c)
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * a) / c) * -4.0) + (b / (z * c));
double t_2 = 9.0 * (x * y);
double tmp;
if (z <= -6.2e-19) {
tmp = t_1;
} else if (z <= 4.3e-106) {
tmp = (b + t_2) / (z * c);
} else if (z <= 5900000.0) {
tmp = (b + ((t * a) * (z * -4.0))) / (z * c);
} else if (z <= 1.02e+60) {
tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c);
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (((t * a) / c) * -4.0) + (b / (z * c)) t_2 = 9.0 * (x * y) tmp = 0 if z <= -6.2e-19: tmp = t_1 elif z <= 4.3e-106: tmp = (b + t_2) / (z * c) elif z <= 5900000.0: tmp = (b + ((t * a) * (z * -4.0))) / (z * c) elif z <= 1.02e+60: tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c) else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(t * a) / c) * -4.0) + Float64(b / Float64(z * c))) t_2 = Float64(9.0 * Float64(x * y)) tmp = 0.0 if (z <= -6.2e-19) tmp = t_1; elseif (z <= 4.3e-106) tmp = Float64(Float64(b + t_2) / Float64(z * c)); elseif (z <= 5900000.0) tmp = Float64(Float64(b + Float64(Float64(t * a) * Float64(z * -4.0))) / Float64(z * c)); elseif (z <= 1.02e+60) tmp = Float64(Float64(t_2 - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (((t * a) / c) * -4.0) + (b / (z * c));
t_2 = 9.0 * (x * y);
tmp = 0.0;
if (z <= -6.2e-19)
tmp = t_1;
elseif (z <= 4.3e-106)
tmp = (b + t_2) / (z * c);
elseif (z <= 5900000.0)
tmp = (b + ((t * a) * (z * -4.0))) / (z * c);
elseif (z <= 1.02e+60)
tmp = (t_2 - (4.0 * (a * (z * t)))) / (z * c);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a 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[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-19], t$95$1, If[LessEqual[z, 4.3e-106], N[(N[(b + t$95$2), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5900000.0], N[(N[(b + N[(N[(t * a), $MachinePrecision] * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+60], N[(N[(t$95$2 - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{t \cdot a}{c} \cdot -4 + \frac{b}{z \cdot c}\\
t_2 := 9 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-106}:\\
\;\;\;\;\frac{b + t_2}{z \cdot c}\\
\mathbf{elif}\;z \leq 5900000:\\
\;\;\;\;\frac{b + \left(t \cdot a\right) \cdot \left(z \cdot -4\right)}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{+60}:\\
\;\;\;\;\frac{t_2 - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.1999999999999998e-19 or 1.0200000000000001e60 < z Initial program 62.2%
associate-+l-62.2%
*-commutative62.2%
associate-*r*59.1%
*-commutative59.1%
associate-+l-59.1%
Simplified65.5%
Taylor expanded in x around 0 52.7%
associate-*r*55.3%
*-commutative55.3%
associate-*l*55.3%
*-commutative55.3%
associate-*l*55.3%
*-rgt-identity55.3%
cancel-sign-sub-inv55.3%
*-rgt-identity55.3%
*-commutative55.3%
distribute-rgt-neg-in55.3%
*-commutative55.3%
distribute-rgt-neg-in55.3%
metadata-eval55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in b around 0 72.5%
if -6.1999999999999998e-19 < z < 4.3000000000000002e-106Initial program 95.3%
associate-+l-95.3%
*-commutative95.3%
associate-*r*94.4%
*-commutative94.4%
associate-+l-94.4%
Simplified92.5%
Taylor expanded in x around inf 85.9%
if 4.3000000000000002e-106 < z < 5.9e6Initial program 94.1%
associate-+l-94.1%
*-commutative94.1%
associate-*r*93.9%
*-commutative93.9%
associate-+l-93.9%
Simplified88.4%
Taylor expanded in x around 0 82.9%
associate-*r*77.2%
*-commutative77.2%
associate-*l*77.2%
*-commutative77.2%
associate-*l*77.2%
*-rgt-identity77.2%
cancel-sign-sub-inv77.2%
*-rgt-identity77.2%
*-commutative77.2%
distribute-rgt-neg-in77.2%
*-commutative77.2%
distribute-rgt-neg-in77.2%
metadata-eval77.2%
*-commutative77.2%
Simplified77.2%
if 5.9e6 < z < 1.0200000000000001e60Initial program 99.2%
associate-+l-99.2%
*-commutative99.2%
associate-*r*99.1%
*-commutative99.1%
associate-+l-99.1%
Simplified99.3%
Taylor expanded in b around 0 79.0%
Final simplification78.5%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ (* (/ (* t a) c) -4.0) (/ b (* z c)))) (t_2 (* 9.0 (* x y))))
(if (<= z -6.2e-19)
t_1
(if (<= z 7.4e-19)
(/ (+ b t_2) (* z c))
(if (<= z 2e+107) (/ (/ (- t_2 (* 4.0 (* a (* z t)))) z) c) t_1)))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * a) / c) * -4.0) + (b / (z * c));
double t_2 = 9.0 * (x * y);
double tmp;
if (z <= -6.2e-19) {
tmp = t_1;
} else if (z <= 7.4e-19) {
tmp = (b + t_2) / (z * c);
} else if (z <= 2e+107) {
tmp = ((t_2 - (4.0 * (a * (z * t)))) / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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) :: t_2
real(8) :: tmp
t_1 = (((t * a) / c) * (-4.0d0)) + (b / (z * c))
t_2 = 9.0d0 * (x * y)
if (z <= (-6.2d-19)) then
tmp = t_1
else if (z <= 7.4d-19) then
tmp = (b + t_2) / (z * c)
else if (z <= 2d+107) then
tmp = ((t_2 - (4.0d0 * (a * (z * t)))) / z) / c
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (((t * a) / c) * -4.0) + (b / (z * c));
double t_2 = 9.0 * (x * y);
double tmp;
if (z <= -6.2e-19) {
tmp = t_1;
} else if (z <= 7.4e-19) {
tmp = (b + t_2) / (z * c);
} else if (z <= 2e+107) {
tmp = ((t_2 - (4.0 * (a * (z * t)))) / z) / c;
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (((t * a) / c) * -4.0) + (b / (z * c)) t_2 = 9.0 * (x * y) tmp = 0 if z <= -6.2e-19: tmp = t_1 elif z <= 7.4e-19: tmp = (b + t_2) / (z * c) elif z <= 2e+107: tmp = ((t_2 - (4.0 * (a * (z * t)))) / z) / c else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(Float64(t * a) / c) * -4.0) + Float64(b / Float64(z * c))) t_2 = Float64(9.0 * Float64(x * y)) tmp = 0.0 if (z <= -6.2e-19) tmp = t_1; elseif (z <= 7.4e-19) tmp = Float64(Float64(b + t_2) / Float64(z * c)); elseif (z <= 2e+107) tmp = Float64(Float64(Float64(t_2 - Float64(4.0 * Float64(a * Float64(z * t)))) / z) / c); else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (((t * a) / c) * -4.0) + (b / (z * c));
t_2 = 9.0 * (x * y);
tmp = 0.0;
if (z <= -6.2e-19)
tmp = t_1;
elseif (z <= 7.4e-19)
tmp = (b + t_2) / (z * c);
elseif (z <= 2e+107)
tmp = ((t_2 - (4.0 * (a * (z * t)))) / z) / c;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a 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[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e-19], t$95$1, If[LessEqual[z, 7.4e-19], N[(N[(b + t$95$2), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+107], N[(N[(N[(t$95$2 - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{t \cdot a}{c} \cdot -4 + \frac{b}{z \cdot c}\\
t_2 := 9 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{-19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-19}:\\
\;\;\;\;\frac{b + t_2}{z \cdot c}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+107}:\\
\;\;\;\;\frac{\frac{t_2 - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.1999999999999998e-19 or 1.9999999999999999e107 < z Initial program 60.9%
associate-+l-60.9%
*-commutative60.9%
associate-*r*57.6%
*-commutative57.6%
associate-+l-57.6%
Simplified64.5%
Taylor expanded in x around 0 52.4%
associate-*r*55.2%
*-commutative55.2%
associate-*l*55.2%
*-commutative55.2%
associate-*l*55.2%
*-rgt-identity55.2%
cancel-sign-sub-inv55.2%
*-rgt-identity55.2%
*-commutative55.2%
distribute-rgt-neg-in55.2%
*-commutative55.2%
distribute-rgt-neg-in55.2%
metadata-eval55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in b around 0 73.7%
if -6.1999999999999998e-19 < z < 7.40000000000000011e-19Initial program 94.9%
associate-+l-94.9%
*-commutative94.9%
associate-*r*94.1%
*-commutative94.1%
associate-+l-94.1%
Simplified91.6%
Taylor expanded in x around inf 82.4%
if 7.40000000000000011e-19 < z < 1.9999999999999999e107Initial program 91.9%
associate-+l-91.9%
*-commutative91.9%
associate-*r*91.7%
*-commutative91.7%
associate-+l-91.7%
Simplified91.9%
*-un-lft-identity91.9%
times-frac91.9%
associate-+l-91.9%
associate-*r*92.0%
associate-+l-92.0%
associate-*l*92.2%
associate-*r*92.1%
Applied egg-rr92.1%
associate-*l/92.0%
*-un-lft-identity92.0%
div-inv91.8%
associate-*l/95.6%
un-div-inv95.9%
Applied egg-rr95.9%
Taylor expanded in b around 0 82.9%
Final simplification78.6%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.22e+163) (not (<= z 1.02e+152))) (+ (* (/ (* t a) c) -4.0) (/ b (* z c))) (/ (+ b (- (* (* x 9.0) y) (* (* z 4.0) (* t a)))) (* z c))))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.22e+163) || !(z <= 1.02e+152)) {
tmp = (((t * a) / c) * -4.0) + (b / (z * c));
} else {
tmp = (b + (((x * 9.0) * y) - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
NOTE: t and a 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 ((z <= (-1.22d+163)) .or. (.not. (z <= 1.02d+152))) then
tmp = (((t * a) / c) * (-4.0d0)) + (b / (z * c))
else
tmp = (b + (((x * 9.0d0) * y) - ((z * 4.0d0) * (t * a)))) / (z * c)
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.22e+163) || !(z <= 1.02e+152)) {
tmp = (((t * a) / c) * -4.0) + (b / (z * c));
} else {
tmp = (b + (((x * 9.0) * y) - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.22e+163) or not (z <= 1.02e+152): tmp = (((t * a) / c) * -4.0) + (b / (z * c)) else: tmp = (b + (((x * 9.0) * y) - ((z * 4.0) * (t * a)))) / (z * c) return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.22e+163) || !(z <= 1.02e+152)) tmp = Float64(Float64(Float64(Float64(t * a) / c) * -4.0) + Float64(b / Float64(z * c))); else tmp = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.22e+163) || ~((z <= 1.02e+152)))
tmp = (((t * a) / c) * -4.0) + (b / (z * c));
else
tmp = (b + (((x * 9.0) * y) - ((z * 4.0) * (t * a)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.22e+163], N[Not[LessEqual[z, 1.02e+152]], $MachinePrecision]], N[(N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+163} \lor \neg \left(z \leq 1.02 \cdot 10^{+152}\right):\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4 + \frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(\left(x \cdot 9\right) \cdot y - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.22e163 or 1.01999999999999999e152 < z Initial program 50.5%
associate-+l-50.5%
*-commutative50.5%
associate-*r*45.2%
*-commutative45.2%
associate-+l-45.2%
Simplified54.9%
Taylor expanded in x around 0 46.6%
associate-*r*49.7%
*-commutative49.7%
associate-*l*49.7%
*-commutative49.7%
associate-*l*49.7%
*-rgt-identity49.7%
cancel-sign-sub-inv49.7%
*-rgt-identity49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
*-commutative49.7%
distribute-rgt-neg-in49.7%
metadata-eval49.7%
*-commutative49.7%
Simplified49.7%
Taylor expanded in b around 0 77.1%
if -1.22e163 < z < 1.01999999999999999e152Initial program 90.4%
associate-+l-90.4%
*-commutative90.4%
associate-*r*89.8%
*-commutative89.8%
associate-+l-89.8%
Simplified88.9%
Final simplification85.6%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)) (t_2 (* (/ (* t a) c) -4.0)))
(if (<= b -3.3e+15)
t_1
(if (<= b -1.2e-187)
(/ (* x (* y (/ 9.0 c))) z)
(if (<= b -3e-226)
t_2
(if (<= b 6e-235)
(* a (* t (/ -4.0 c)))
(if (<= b 3.1e-17)
(/ (* x 9.0) (* z (/ c y)))
(if (<= b 1.4e+58) t_2 t_1))))))))assert(t < a);
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 = ((t * a) / c) * -4.0;
double tmp;
if (b <= -3.3e+15) {
tmp = t_1;
} else if (b <= -1.2e-187) {
tmp = (x * (y * (9.0 / c))) / z;
} else if (b <= -3e-226) {
tmp = t_2;
} else if (b <= 6e-235) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 3.1e-17) {
tmp = (x * 9.0) / (z * (c / y));
} else if (b <= 1.4e+58) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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) :: t_2
real(8) :: tmp
t_1 = (b / c) / z
t_2 = ((t * a) / c) * (-4.0d0)
if (b <= (-3.3d+15)) then
tmp = t_1
else if (b <= (-1.2d-187)) then
tmp = (x * (y * (9.0d0 / c))) / z
else if (b <= (-3d-226)) then
tmp = t_2
else if (b <= 6d-235) then
tmp = a * (t * ((-4.0d0) / c))
else if (b <= 3.1d-17) then
tmp = (x * 9.0d0) / (z * (c / y))
else if (b <= 1.4d+58) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
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 = ((t * a) / c) * -4.0;
double tmp;
if (b <= -3.3e+15) {
tmp = t_1;
} else if (b <= -1.2e-187) {
tmp = (x * (y * (9.0 / c))) / z;
} else if (b <= -3e-226) {
tmp = t_2;
} else if (b <= 6e-235) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 3.1e-17) {
tmp = (x * 9.0) / (z * (c / y));
} else if (b <= 1.4e+58) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z t_2 = ((t * a) / c) * -4.0 tmp = 0 if b <= -3.3e+15: tmp = t_1 elif b <= -1.2e-187: tmp = (x * (y * (9.0 / c))) / z elif b <= -3e-226: tmp = t_2 elif b <= 6e-235: tmp = a * (t * (-4.0 / c)) elif b <= 3.1e-17: tmp = (x * 9.0) / (z * (c / y)) elif b <= 1.4e+58: tmp = t_2 else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) t_2 = Float64(Float64(Float64(t * a) / c) * -4.0) tmp = 0.0 if (b <= -3.3e+15) tmp = t_1; elseif (b <= -1.2e-187) tmp = Float64(Float64(x * Float64(y * Float64(9.0 / c))) / z); elseif (b <= -3e-226) tmp = t_2; elseif (b <= 6e-235) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (b <= 3.1e-17) tmp = Float64(Float64(x * 9.0) / Float64(z * Float64(c / y))); elseif (b <= 1.4e+58) tmp = t_2; else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
t_2 = ((t * a) / c) * -4.0;
tmp = 0.0;
if (b <= -3.3e+15)
tmp = t_1;
elseif (b <= -1.2e-187)
tmp = (x * (y * (9.0 / c))) / z;
elseif (b <= -3e-226)
tmp = t_2;
elseif (b <= 6e-235)
tmp = a * (t * (-4.0 / c));
elseif (b <= 3.1e-17)
tmp = (x * 9.0) / (z * (c / y));
elseif (b <= 1.4e+58)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]}, If[LessEqual[b, -3.3e+15], t$95$1, If[LessEqual[b, -1.2e-187], N[(N[(x * N[(y * N[(9.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, -3e-226], t$95$2, If[LessEqual[b, 6e-235], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.1e-17], N[(N[(x * 9.0), $MachinePrecision] / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.4e+58], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
t_2 := \frac{t \cdot a}{c} \cdot -4\\
\mathbf{if}\;b \leq -3.3 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.2 \cdot 10^{-187}:\\
\;\;\;\;\frac{x \cdot \left(y \cdot \frac{9}{c}\right)}{z}\\
\mathbf{elif}\;b \leq -3 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-235}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;b \leq 3.1 \cdot 10^{-17}:\\
\;\;\;\;\frac{x \cdot 9}{z \cdot \frac{c}{y}}\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{+58}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -3.3e15 or 1.3999999999999999e58 < b Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*84.1%
*-commutative84.1%
associate-+l-84.1%
Simplified86.6%
Taylor expanded in b around inf 50.3%
associate-/r*58.6%
Simplified58.6%
if -3.3e15 < b < -1.20000000000000007e-187Initial program 85.8%
associate-+l-85.8%
*-commutative85.8%
associate-*r*85.8%
*-commutative85.8%
associate-+l-85.8%
Simplified83.6%
Taylor expanded in x around inf 52.2%
associate-*r/52.2%
associate-*r*52.2%
*-commutative52.2%
associate-*r*52.2%
*-commutative52.2%
times-frac50.3%
associate-/l*50.3%
Simplified50.3%
associate-*l/56.8%
associate-/r/56.9%
Applied egg-rr56.9%
if -1.20000000000000007e-187 < b < -2.99999999999999995e-226 or 3.0999999999999998e-17 < b < 1.3999999999999999e58Initial program 65.8%
associate-+l-65.8%
*-commutative65.8%
associate-*r*65.8%
*-commutative65.8%
associate-+l-65.8%
Simplified66.0%
Taylor expanded in z around inf 72.0%
*-commutative72.0%
Simplified72.0%
if -2.99999999999999995e-226 < b < 5.9999999999999997e-235Initial program 62.2%
associate-+l-62.2%
*-commutative62.2%
associate-*r*56.6%
*-commutative56.6%
associate-+l-56.6%
Simplified62.3%
*-un-lft-identity62.3%
times-frac72.7%
associate-+l-72.7%
associate-*r*72.7%
associate-+l-72.7%
associate-*l*72.7%
associate-*r*72.7%
Applied egg-rr72.7%
associate-*r/72.8%
Applied egg-rr72.8%
Taylor expanded in z around inf 53.5%
associate-*r/53.5%
*-commutative53.5%
associate-*l/53.4%
*-commutative53.4%
*-commutative53.4%
associate-*l*50.8%
Simplified50.8%
if 5.9999999999999997e-235 < b < 3.0999999999999998e-17Initial program 82.3%
associate-+l-82.3%
*-commutative82.3%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
Simplified77.6%
Taylor expanded in x around inf 55.5%
associate-*r/55.5%
associate-*r*55.5%
*-commutative55.5%
associate-*r*55.5%
*-commutative55.5%
times-frac63.1%
associate-/l*63.0%
Simplified63.0%
frac-times58.4%
Applied egg-rr58.4%
Final simplification58.4%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -6e+15)
t_1
(if (<= b 2.2e-235)
(* a (* t (/ -4.0 c)))
(if (<= b 4.2e-197)
(* (/ x z) (/ 9.0 (/ c y)))
(if (<= b 1.7e-17)
(* 9.0 (/ (/ x c) (/ z y)))
(if (<= b 2e+59) (* (/ (* t a) c) -4.0) t_1)))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -6e+15) {
tmp = t_1;
} else if (b <= 2.2e-235) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 4.2e-197) {
tmp = (x / z) * (9.0 / (c / y));
} else if (b <= 1.7e-17) {
tmp = 9.0 * ((x / c) / (z / y));
} else if (b <= 2e+59) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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 = (b / c) / z
if (b <= (-6d+15)) then
tmp = t_1
else if (b <= 2.2d-235) then
tmp = a * (t * ((-4.0d0) / c))
else if (b <= 4.2d-197) then
tmp = (x / z) * (9.0d0 / (c / y))
else if (b <= 1.7d-17) then
tmp = 9.0d0 * ((x / c) / (z / y))
else if (b <= 2d+59) then
tmp = ((t * a) / c) * (-4.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
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 tmp;
if (b <= -6e+15) {
tmp = t_1;
} else if (b <= 2.2e-235) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 4.2e-197) {
tmp = (x / z) * (9.0 / (c / y));
} else if (b <= 1.7e-17) {
tmp = 9.0 * ((x / c) / (z / y));
} else if (b <= 2e+59) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -6e+15: tmp = t_1 elif b <= 2.2e-235: tmp = a * (t * (-4.0 / c)) elif b <= 4.2e-197: tmp = (x / z) * (9.0 / (c / y)) elif b <= 1.7e-17: tmp = 9.0 * ((x / c) / (z / y)) elif b <= 2e+59: tmp = ((t * a) / c) * -4.0 else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -6e+15) tmp = t_1; elseif (b <= 2.2e-235) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (b <= 4.2e-197) tmp = Float64(Float64(x / z) * Float64(9.0 / Float64(c / y))); elseif (b <= 1.7e-17) tmp = Float64(9.0 * Float64(Float64(x / c) / Float64(z / y))); elseif (b <= 2e+59) tmp = Float64(Float64(Float64(t * a) / c) * -4.0); else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
tmp = 0.0;
if (b <= -6e+15)
tmp = t_1;
elseif (b <= 2.2e-235)
tmp = a * (t * (-4.0 / c));
elseif (b <= 4.2e-197)
tmp = (x / z) * (9.0 / (c / y));
elseif (b <= 1.7e-17)
tmp = 9.0 * ((x / c) / (z / y));
elseif (b <= 2e+59)
tmp = ((t * a) / c) * -4.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -6e+15], t$95$1, If[LessEqual[b, 2.2e-235], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e-197], N[(N[(x / z), $MachinePrecision] * N[(9.0 / N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-17], N[(9.0 * N[(N[(x / c), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+59], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -6 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{-235}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-197}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{9}{\frac{c}{y}}\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-17}:\\
\;\;\;\;9 \cdot \frac{\frac{x}{c}}{\frac{z}{y}}\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+59}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -6e15 or 1.99999999999999994e59 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*84.0%
*-commutative84.0%
associate-+l-84.0%
Simplified86.4%
Taylor expanded in b around inf 50.8%
associate-/r*59.1%
Simplified59.1%
if -6e15 < b < 2.19999999999999984e-235Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
Simplified71.4%
*-un-lft-identity71.4%
times-frac78.1%
associate-+l-78.1%
associate-*r*78.1%
associate-+l-78.1%
associate-*l*78.1%
associate-*r*78.2%
Applied egg-rr78.2%
associate-*r/78.3%
Applied egg-rr78.3%
Taylor expanded in z around inf 51.3%
associate-*r/51.3%
*-commutative51.3%
associate-*l/51.2%
*-commutative51.2%
*-commutative51.2%
associate-*l*51.2%
Simplified51.2%
if 2.19999999999999984e-235 < b < 4.2e-197Initial program 83.5%
associate-+l-83.5%
*-commutative83.5%
associate-*r*83.5%
*-commutative83.5%
associate-+l-83.5%
Simplified83.5%
Taylor expanded in x around inf 83.7%
associate-*r/83.7%
associate-*r*83.5%
*-commutative83.5%
associate-*r*84.0%
*-commutative84.0%
times-frac68.9%
associate-/l*68.6%
Simplified68.6%
if 4.2e-197 < b < 1.6999999999999999e-17Initial program 82.1%
associate-+l-82.1%
*-commutative82.1%
associate-*r*73.2%
*-commutative73.2%
associate-+l-73.2%
Simplified76.5%
*-un-lft-identity76.5%
times-frac82.2%
associate-+l-82.2%
associate-*r*84.9%
associate-+l-84.9%
associate-*l*85.0%
associate-*r*82.3%
Applied egg-rr82.3%
associate-*l/82.5%
*-un-lft-identity82.5%
div-inv82.3%
associate-*l/82.3%
un-div-inv82.4%
Applied egg-rr82.4%
Taylor expanded in x around inf 50.4%
times-frac56.6%
associate-*r/59.3%
associate-/l*56.6%
Simplified56.6%
if 1.6999999999999999e-17 < b < 1.99999999999999994e59Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
Simplified76.6%
Taylor expanded in z around inf 68.1%
*-commutative68.1%
Simplified68.1%
Final simplification57.0%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.1e-19) (not (<= z 1.2e-105))) (+ (* (/ (* t a) c) -4.0) (/ b (* z c))) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.1e-19) || !(z <= 1.2e-105)) {
tmp = (((t * a) / c) * -4.0) + (b / (z * c));
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: t and a 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 ((z <= (-1.1d-19)) .or. (.not. (z <= 1.2d-105))) then
tmp = (((t * a) / c) * (-4.0d0)) + (b / (z * c))
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.1e-19) || !(z <= 1.2e-105)) {
tmp = (((t * a) / c) * -4.0) + (b / (z * c));
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.1e-19) or not (z <= 1.2e-105): tmp = (((t * a) / c) * -4.0) + (b / (z * c)) else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.1e-19) || !(z <= 1.2e-105)) tmp = Float64(Float64(Float64(Float64(t * a) / c) * -4.0) + Float64(b / Float64(z * c))); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.1e-19) || ~((z <= 1.2e-105)))
tmp = (((t * a) / c) * -4.0) + (b / (z * c));
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.1e-19], N[Not[LessEqual[z, 1.2e-105]], $MachinePrecision]], N[(N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision] + N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-19} \lor \neg \left(z \leq 1.2 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4 + \frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.0999999999999999e-19 or 1.20000000000000007e-105 < z Initial program 68.4%
associate-+l-68.4%
*-commutative68.4%
associate-*r*65.9%
*-commutative65.9%
associate-+l-65.9%
Simplified70.5%
Taylor expanded in x around 0 55.7%
associate-*r*57.2%
*-commutative57.2%
associate-*l*57.2%
*-commutative57.2%
associate-*l*57.2%
*-rgt-identity57.2%
cancel-sign-sub-inv57.2%
*-rgt-identity57.2%
*-commutative57.2%
distribute-rgt-neg-in57.2%
*-commutative57.2%
distribute-rgt-neg-in57.2%
metadata-eval57.2%
*-commutative57.2%
Simplified57.2%
Taylor expanded in b around 0 70.6%
if -1.0999999999999999e-19 < z < 1.20000000000000007e-105Initial program 95.3%
associate-+l-95.3%
*-commutative95.3%
associate-*r*94.4%
*-commutative94.4%
associate-+l-94.4%
Simplified92.5%
Taylor expanded in x around inf 85.9%
Final simplification76.8%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -1.45e+16)
t_1
(if (<= b 5.2e-233)
(* a (* t (/ -4.0 c)))
(if (<= b 2.3e-17)
(* 9.0 (* (/ x c) (/ y z)))
(if (<= b 3.9e+60) (* (/ (* t a) c) -4.0) t_1))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -1.45e+16) {
tmp = t_1;
} else if (b <= 5.2e-233) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 2.3e-17) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (b <= 3.9e+60) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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 = (b / c) / z
if (b <= (-1.45d+16)) then
tmp = t_1
else if (b <= 5.2d-233) then
tmp = a * (t * ((-4.0d0) / c))
else if (b <= 2.3d-17) then
tmp = 9.0d0 * ((x / c) * (y / z))
else if (b <= 3.9d+60) then
tmp = ((t * a) / c) * (-4.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
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 tmp;
if (b <= -1.45e+16) {
tmp = t_1;
} else if (b <= 5.2e-233) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 2.3e-17) {
tmp = 9.0 * ((x / c) * (y / z));
} else if (b <= 3.9e+60) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -1.45e+16: tmp = t_1 elif b <= 5.2e-233: tmp = a * (t * (-4.0 / c)) elif b <= 2.3e-17: tmp = 9.0 * ((x / c) * (y / z)) elif b <= 3.9e+60: tmp = ((t * a) / c) * -4.0 else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -1.45e+16) tmp = t_1; elseif (b <= 5.2e-233) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (b <= 2.3e-17) tmp = Float64(9.0 * Float64(Float64(x / c) * Float64(y / z))); elseif (b <= 3.9e+60) tmp = Float64(Float64(Float64(t * a) / c) * -4.0); else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
tmp = 0.0;
if (b <= -1.45e+16)
tmp = t_1;
elseif (b <= 5.2e-233)
tmp = a * (t * (-4.0 / c));
elseif (b <= 2.3e-17)
tmp = 9.0 * ((x / c) * (y / z));
elseif (b <= 3.9e+60)
tmp = ((t * a) / c) * -4.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -1.45e+16], t$95$1, If[LessEqual[b, 5.2e-233], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.3e-17], N[(9.0 * N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.9e+60], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -1.45 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;b \leq 2.3 \cdot 10^{-17}:\\
\;\;\;\;9 \cdot \left(\frac{x}{c} \cdot \frac{y}{z}\right)\\
\mathbf{elif}\;b \leq 3.9 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -1.45e16 or 3.9000000000000003e60 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*84.0%
*-commutative84.0%
associate-+l-84.0%
Simplified86.4%
Taylor expanded in b around inf 50.8%
associate-/r*59.1%
Simplified59.1%
if -1.45e16 < b < 5.1999999999999996e-233Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
Simplified71.4%
*-un-lft-identity71.4%
times-frac78.1%
associate-+l-78.1%
associate-*r*78.1%
associate-+l-78.1%
associate-*l*78.1%
associate-*r*78.2%
Applied egg-rr78.2%
associate-*r/78.3%
Applied egg-rr78.3%
Taylor expanded in z around inf 51.3%
associate-*r/51.3%
*-commutative51.3%
associate-*l/51.2%
*-commutative51.2%
*-commutative51.2%
associate-*l*51.2%
Simplified51.2%
if 5.1999999999999996e-233 < b < 2.30000000000000009e-17Initial program 82.3%
associate-+l-82.3%
*-commutative82.3%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
Simplified77.6%
Taylor expanded in x around inf 55.5%
times-frac63.2%
Applied egg-rr63.2%
if 2.30000000000000009e-17 < b < 3.9000000000000003e60Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
Simplified76.6%
Taylor expanded in z around inf 68.1%
*-commutative68.1%
Simplified68.1%
Final simplification57.7%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -2.05e+16)
t_1
(if (<= b 3.8e-234)
(* a (* t (/ -4.0 c)))
(if (<= b 1.7e-17)
(/ (* x 9.0) (* z (/ c y)))
(if (<= b 1.38e+60) (* (/ (* t a) c) -4.0) t_1))))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -2.05e+16) {
tmp = t_1;
} else if (b <= 3.8e-234) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 1.7e-17) {
tmp = (x * 9.0) / (z * (c / y));
} else if (b <= 1.38e+60) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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 = (b / c) / z
if (b <= (-2.05d+16)) then
tmp = t_1
else if (b <= 3.8d-234) then
tmp = a * (t * ((-4.0d0) / c))
else if (b <= 1.7d-17) then
tmp = (x * 9.0d0) / (z * (c / y))
else if (b <= 1.38d+60) then
tmp = ((t * a) / c) * (-4.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
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 tmp;
if (b <= -2.05e+16) {
tmp = t_1;
} else if (b <= 3.8e-234) {
tmp = a * (t * (-4.0 / c));
} else if (b <= 1.7e-17) {
tmp = (x * 9.0) / (z * (c / y));
} else if (b <= 1.38e+60) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -2.05e+16: tmp = t_1 elif b <= 3.8e-234: tmp = a * (t * (-4.0 / c)) elif b <= 1.7e-17: tmp = (x * 9.0) / (z * (c / y)) elif b <= 1.38e+60: tmp = ((t * a) / c) * -4.0 else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -2.05e+16) tmp = t_1; elseif (b <= 3.8e-234) tmp = Float64(a * Float64(t * Float64(-4.0 / c))); elseif (b <= 1.7e-17) tmp = Float64(Float64(x * 9.0) / Float64(z * Float64(c / y))); elseif (b <= 1.38e+60) tmp = Float64(Float64(Float64(t * a) / c) * -4.0); else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
tmp = 0.0;
if (b <= -2.05e+16)
tmp = t_1;
elseif (b <= 3.8e-234)
tmp = a * (t * (-4.0 / c));
elseif (b <= 1.7e-17)
tmp = (x * 9.0) / (z * (c / y));
elseif (b <= 1.38e+60)
tmp = ((t * a) / c) * -4.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -2.05e+16], t$95$1, If[LessEqual[b, 3.8e-234], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-17], N[(N[(x * 9.0), $MachinePrecision] / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.38e+60], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -2.05 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-234}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-17}:\\
\;\;\;\;\frac{x \cdot 9}{z \cdot \frac{c}{y}}\\
\mathbf{elif}\;b \leq 1.38 \cdot 10^{+60}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -2.05e16 or 1.38e60 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*84.0%
*-commutative84.0%
associate-+l-84.0%
Simplified86.4%
Taylor expanded in b around inf 50.8%
associate-/r*59.1%
Simplified59.1%
if -2.05e16 < b < 3.79999999999999984e-234Initial program 72.4%
associate-+l-72.4%
*-commutative72.4%
associate-*r*70.1%
*-commutative70.1%
associate-+l-70.1%
Simplified71.4%
*-un-lft-identity71.4%
times-frac78.1%
associate-+l-78.1%
associate-*r*78.1%
associate-+l-78.1%
associate-*l*78.1%
associate-*r*78.2%
Applied egg-rr78.2%
associate-*r/78.3%
Applied egg-rr78.3%
Taylor expanded in z around inf 51.3%
associate-*r/51.3%
*-commutative51.3%
associate-*l/51.2%
*-commutative51.2%
*-commutative51.2%
associate-*l*51.2%
Simplified51.2%
if 3.79999999999999984e-234 < b < 1.6999999999999999e-17Initial program 82.3%
associate-+l-82.3%
*-commutative82.3%
associate-*r*74.8%
*-commutative74.8%
associate-+l-74.8%
Simplified77.6%
Taylor expanded in x around inf 55.5%
associate-*r/55.5%
associate-*r*55.5%
*-commutative55.5%
associate-*r*55.5%
*-commutative55.5%
times-frac63.1%
associate-/l*63.0%
Simplified63.0%
frac-times58.4%
Applied egg-rr58.4%
if 1.6999999999999999e-17 < b < 1.38e60Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
Simplified76.6%
Taylor expanded in z around inf 68.1%
*-commutative68.1%
Simplified68.1%
Final simplification57.0%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -4e+21) (not (<= z 1.05e+60))) (* (/ (* t a) c) -4.0) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4e+21) || !(z <= 1.05e+60)) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: t and a 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 ((z <= (-4d+21)) .or. (.not. (z <= 1.05d+60))) then
tmp = ((t * a) / c) * (-4.0d0)
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4e+21) || !(z <= 1.05e+60)) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -4e+21) or not (z <= 1.05e+60): tmp = ((t * a) / c) * -4.0 else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4e+21) || !(z <= 1.05e+60)) tmp = Float64(Float64(Float64(t * a) / c) * -4.0); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -4e+21) || ~((z <= 1.05e+60)))
tmp = ((t * a) / c) * -4.0;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4e+21], N[Not[LessEqual[z, 1.05e+60]], $MachinePrecision]], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+21} \lor \neg \left(z \leq 1.05 \cdot 10^{+60}\right):\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4e21 or 1.0500000000000001e60 < z Initial program 60.1%
associate-+l-60.1%
*-commutative60.1%
associate-*r*56.8%
*-commutative56.8%
associate-+l-56.8%
Simplified63.7%
Taylor expanded in z around inf 62.0%
*-commutative62.0%
Simplified62.0%
if -4e21 < z < 1.0500000000000001e60Initial program 95.0%
associate-+l-95.0%
*-commutative95.0%
associate-*r*94.3%
*-commutative94.3%
associate-+l-94.3%
Simplified92.3%
Taylor expanded in x around inf 78.0%
Final simplification70.8%
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (/ b c) z)))
(if (<= b -33000000000000.0)
t_1
(if (<= b 2.75e-17)
(* 9.0 (/ (* y (/ x c)) z))
(if (<= b 4.2e+59) (* (/ (* t a) c) -4.0) t_1)))))assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b / c) / z;
double tmp;
if (b <= -33000000000000.0) {
tmp = t_1;
} else if (b <= 2.75e-17) {
tmp = 9.0 * ((y * (x / c)) / z);
} else if (b <= 4.2e+59) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: t and a 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 = (b / c) / z
if (b <= (-33000000000000.0d0)) then
tmp = t_1
else if (b <= 2.75d-17) then
tmp = 9.0d0 * ((y * (x / c)) / z)
else if (b <= 4.2d+59) then
tmp = ((t * a) / c) * (-4.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert t < a;
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 tmp;
if (b <= -33000000000000.0) {
tmp = t_1;
} else if (b <= 2.75e-17) {
tmp = 9.0 * ((y * (x / c)) / z);
} else if (b <= 4.2e+59) {
tmp = ((t * a) / c) * -4.0;
} else {
tmp = t_1;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (b / c) / z tmp = 0 if b <= -33000000000000.0: tmp = t_1 elif b <= 2.75e-17: tmp = 9.0 * ((y * (x / c)) / z) elif b <= 4.2e+59: tmp = ((t * a) / c) * -4.0 else: tmp = t_1 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b / c) / z) tmp = 0.0 if (b <= -33000000000000.0) tmp = t_1; elseif (b <= 2.75e-17) tmp = Float64(9.0 * Float64(Float64(y * Float64(x / c)) / z)); elseif (b <= 4.2e+59) tmp = Float64(Float64(Float64(t * a) / c) * -4.0); else tmp = t_1; end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b / c) / z;
tmp = 0.0;
if (b <= -33000000000000.0)
tmp = t_1;
elseif (b <= 2.75e-17)
tmp = 9.0 * ((y * (x / c)) / z);
elseif (b <= 4.2e+59)
tmp = ((t * a) / c) * -4.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[b, -33000000000000.0], t$95$1, If[LessEqual[b, 2.75e-17], N[(9.0 * N[(N[(y * N[(x / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+59], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{c}}{z}\\
\mathbf{if}\;b \leq -33000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.75 \cdot 10^{-17}:\\
\;\;\;\;9 \cdot \frac{y \cdot \frac{x}{c}}{z}\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+59}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if b < -3.3e13 or 4.19999999999999968e59 < b Initial program 84.0%
associate-+l-84.0%
*-commutative84.0%
associate-*r*84.1%
*-commutative84.1%
associate-+l-84.1%
Simplified86.6%
Taylor expanded in b around inf 50.3%
associate-/r*58.6%
Simplified58.6%
if -3.3e13 < b < 2.75e-17Initial program 75.3%
associate-+l-75.3%
*-commutative75.3%
associate-*r*71.4%
*-commutative71.4%
associate-+l-71.4%
Simplified73.1%
Taylor expanded in x around inf 46.3%
times-frac49.3%
Applied egg-rr49.3%
associate-*r/52.4%
Applied egg-rr52.4%
if 2.75e-17 < b < 4.19999999999999968e59Initial program 76.6%
associate-+l-76.6%
*-commutative76.6%
associate-*r*76.3%
*-commutative76.3%
associate-+l-76.3%
Simplified76.6%
Taylor expanded in z around inf 68.1%
*-commutative68.1%
Simplified68.1%
Final simplification56.2%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -1.65e+16) (not (<= b 1e+55))) (/ (/ b c) z) (* a (* t (/ -4.0 c)))))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.65e+16) || !(b <= 1e+55)) {
tmp = (b / c) / z;
} else {
tmp = a * (t * (-4.0 / c));
}
return tmp;
}
NOTE: t and a 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.65d+16)) .or. (.not. (b <= 1d+55))) then
tmp = (b / c) / z
else
tmp = a * (t * ((-4.0d0) / c))
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -1.65e+16) || !(b <= 1e+55)) {
tmp = (b / c) / z;
} else {
tmp = a * (t * (-4.0 / c));
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -1.65e+16) or not (b <= 1e+55): tmp = (b / c) / z else: tmp = a * (t * (-4.0 / c)) return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -1.65e+16) || !(b <= 1e+55)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(t * Float64(-4.0 / c))); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -1.65e+16) || ~((b <= 1e+55)))
tmp = (b / c) / z;
else
tmp = a * (t * (-4.0 / c));
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -1.65e+16], N[Not[LessEqual[b, 1e+55]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.65 \cdot 10^{+16} \lor \neg \left(b \leq 10^{+55}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if b < -1.65e16 or 1.00000000000000001e55 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*84.0%
*-commutative84.0%
associate-+l-84.0%
Simplified86.4%
Taylor expanded in b around inf 50.8%
associate-/r*59.1%
Simplified59.1%
if -1.65e16 < b < 1.00000000000000001e55Initial program 75.7%
associate-+l-75.7%
*-commutative75.7%
associate-*r*72.1%
*-commutative72.1%
associate-+l-72.1%
Simplified73.7%
*-un-lft-identity73.7%
times-frac80.5%
associate-+l-80.5%
associate-*r*81.1%
associate-+l-81.1%
associate-*l*81.1%
associate-*r*80.5%
Applied egg-rr80.5%
associate-*r/79.3%
Applied egg-rr79.3%
Taylor expanded in z around inf 50.4%
associate-*r/50.4%
*-commutative50.4%
associate-*l/50.3%
*-commutative50.3%
*-commutative50.3%
associate-*l*50.1%
Simplified50.1%
Final simplification54.1%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -2.05e+16) (not (<= b 1.48e+57))) (/ (/ b c) z) (* (/ (* t a) c) -4.0)))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2.05e+16) || !(b <= 1.48e+57)) {
tmp = (b / c) / z;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
NOTE: t and a 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.05d+16)) .or. (.not. (b <= 1.48d+57))) then
tmp = (b / c) / z
else
tmp = ((t * a) / c) * (-4.0d0)
end if
code = tmp
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -2.05e+16) || !(b <= 1.48e+57)) {
tmp = (b / c) / z;
} else {
tmp = ((t * a) / c) * -4.0;
}
return tmp;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -2.05e+16) or not (b <= 1.48e+57): tmp = (b / c) / z else: tmp = ((t * a) / c) * -4.0 return tmp
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -2.05e+16) || !(b <= 1.48e+57)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(Float64(Float64(t * a) / c) * -4.0); end return tmp end
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -2.05e+16) || ~((b <= 1.48e+57)))
tmp = (b / c) / z;
else
tmp = ((t * a) / c) * -4.0;
end
tmp_2 = tmp;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -2.05e+16], N[Not[LessEqual[b, 1.48e+57]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] / c), $MachinePrecision] * -4.0), $MachinePrecision]]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.05 \cdot 10^{+16} \lor \neg \left(b \leq 1.48 \cdot 10^{+57}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a}{c} \cdot -4\\
\end{array}
\end{array}
if b < -2.05e16 or 1.47999999999999999e57 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*84.0%
*-commutative84.0%
associate-+l-84.0%
Simplified86.4%
Taylor expanded in b around inf 50.8%
associate-/r*59.1%
Simplified59.1%
if -2.05e16 < b < 1.47999999999999999e57Initial program 75.7%
associate-+l-75.7%
*-commutative75.7%
associate-*r*72.1%
*-commutative72.1%
associate-+l-72.1%
Simplified73.7%
Taylor expanded in z around inf 50.4%
*-commutative50.4%
Simplified50.4%
Final simplification54.3%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: t and a 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 t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): return b / (z * c)
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
t, a = num2cell(sort([t, a])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: t and a 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}
[t, a] = \mathsf{sort}([t, a])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 79.3%
associate-+l-79.3%
associate-*l*79.4%
fma-neg80.1%
neg-sub080.1%
associate-+l-80.1%
neg-sub080.1%
+-commutative80.1%
distribute-rgt-neg-out80.1%
*-commutative80.1%
associate-*l*78.2%
distribute-rgt-neg-in78.2%
*-commutative78.2%
distribute-rgt-neg-in78.2%
distribute-rgt-neg-in78.2%
metadata-eval78.2%
Simplified78.2%
Taylor expanded in b around inf 29.4%
Final simplification29.4%
NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: t and a 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 / c) / z
end function
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): return (b / c) / z
t, a = sort([t, a]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
t, a = num2cell(sort([t, a])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[t, a] = \mathsf{sort}([t, a])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 79.3%
associate-+l-79.3%
*-commutative79.3%
associate-*r*77.4%
*-commutative77.4%
associate-+l-77.4%
Simplified79.4%
Taylor expanded in b around inf 29.4%
associate-/r*32.4%
Simplified32.4%
Final simplification32.4%
(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 2023285
(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)))