
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x and y should be sorted in increasing order before calling this function. 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 -1950000.0) (not (<= z 2e-38))) (/ (+ (fma 9.0 (* x (/ y z)) (/ b z)) (* a (* t -4.0))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1950000.0) || !(z <= 2e-38)) {
tmp = (fma(9.0, (x * (y / z)), (b / z)) + (a * (t * -4.0))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1950000.0) || !(z <= 2e-38)) tmp = Float64(Float64(fma(9.0, Float64(x * Float64(y / z)), Float64(b / z)) + Float64(a * Float64(t * -4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. 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, -1950000.0], N[Not[LessEqual[z, 2e-38]], $MachinePrecision]], N[(N[(N[(9.0 * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1950000 \lor \neg \left(z \leq 2 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{\mathsf{fma}\left(9, x \cdot \frac{y}{z}, \frac{b}{z}\right) + a \cdot \left(t \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.95e6 or 1.9999999999999999e-38 < z Initial program 63.0%
Taylor expanded in x around 0 81.8%
Taylor expanded in c around 0 90.0%
cancel-sign-sub-inv90.0%
fma-def90.0%
associate-*r/92.3%
metadata-eval92.3%
*-commutative92.3%
associate-*l*92.3%
Simplified92.3%
if -1.95e6 < z < 1.9999999999999999e-38Initial program 96.1%
Final simplification94.2%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
(if (<= t_1 -1e-175)
t_1
(if (<= t_1 0.0)
(* (/ 1.0 z) (/ (+ (* -4.0 (* a (* z t))) (* 9.0 (* x y))) c))
(if (<= t_1 INFINITY) t_1 (* a (* -4.0 (/ t c))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -1e-175) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
assert x < y;
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 + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
double tmp;
if (t_1 <= -1e-175) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c);
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) tmp = 0 if t_1 <= -1e-175: tmp = t_1 elif t_1 <= 0.0: tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c) elif t_1 <= math.inf: tmp = t_1 else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)) tmp = 0.0 if (t_1 <= -1e-175) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(1.0 / z) * Float64(Float64(Float64(-4.0 * Float64(a * Float64(z * t))) + Float64(9.0 * Float64(x * y))) / c)); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
tmp = 0.0;
if (t_1 <= -1e-175)
tmp = t_1;
elseif (t_1 <= 0.0)
tmp = (1.0 / z) * (((-4.0 * (a * (z * t))) + (9.0 * (x * y))) / c);
elseif (t_1 <= Inf)
tmp = t_1;
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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 + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-175], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(N[(-4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-175}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{1}{z} \cdot \frac{-4 \cdot \left(a \cdot \left(z \cdot t\right)\right) + 9 \cdot \left(x \cdot y\right)}{c}\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < -1e-175 or 0.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < +inf.0Initial program 91.3%
if -1e-175 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x 9) y) (*.f64 (*.f64 (*.f64 z 4) t) a)) b) (*.f64 z c)) < 0.0Initial program 45.4%
associate-+l-45.4%
associate-*r*45.4%
associate-*r*45.4%
*-un-lft-identity45.4%
times-frac99.6%
associate--r-99.6%
fma-neg99.6%
associate-*r*99.6%
distribute-rgt-neg-in99.6%
associate-*l*99.6%
Applied egg-rr99.6%
Taylor expanded in b around 0 88.2%
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%
Taylor expanded in x around 0 67.9%
Taylor expanded in z around inf 68.1%
associate-*r/68.1%
*-commutative68.1%
associate-/l*68.1%
associate-*r/88.7%
associate-/r/88.7%
Simplified88.7%
Final simplification90.7%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* a (* -4.0 (/ t c)))) (t_2 (* 9.0 (/ x (* z (/ c y))))))
(if (<= y -10200.0)
(* 9.0 (* (/ y c) (/ x z)))
(if (<= y 1.75e-71)
t_1
(if (<= y 4.2e-28)
(/ (/ b c) z)
(if (<= y 1.2e+72)
t_1
(if (<= y 2.2e+121)
t_2
(if (<= y 9e+130)
(* -4.0 (* t (/ a c)))
(if (<= y 9e+144) (* b (/ 1.0 (* z c))) t_2)))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double t_2 = 9.0 * (x / (z * (c / y)));
double tmp;
if (y <= -10200.0) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (y <= 1.75e-71) {
tmp = t_1;
} else if (y <= 4.2e-28) {
tmp = (b / c) / z;
} else if (y <= 1.2e+72) {
tmp = t_1;
} else if (y <= 2.2e+121) {
tmp = t_2;
} else if (y <= 9e+130) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = a * ((-4.0d0) * (t / c))
t_2 = 9.0d0 * (x / (z * (c / y)))
if (y <= (-10200.0d0)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if (y <= 1.75d-71) then
tmp = t_1
else if (y <= 4.2d-28) then
tmp = (b / c) / z
else if (y <= 1.2d+72) then
tmp = t_1
else if (y <= 2.2d+121) then
tmp = t_2
else if (y <= 9d+130) then
tmp = (-4.0d0) * (t * (a / c))
else if (y <= 9d+144) then
tmp = b * (1.0d0 / (z * c))
else
tmp = t_2
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double t_2 = 9.0 * (x / (z * (c / y)));
double tmp;
if (y <= -10200.0) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (y <= 1.75e-71) {
tmp = t_1;
} else if (y <= 4.2e-28) {
tmp = (b / c) / z;
} else if (y <= 1.2e+72) {
tmp = t_1;
} else if (y <= 2.2e+121) {
tmp = t_2;
} else if (y <= 9e+130) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = t_2;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) t_2 = 9.0 * (x / (z * (c / y))) tmp = 0 if y <= -10200.0: tmp = 9.0 * ((y / c) * (x / z)) elif y <= 1.75e-71: tmp = t_1 elif y <= 4.2e-28: tmp = (b / c) / z elif y <= 1.2e+72: tmp = t_1 elif y <= 2.2e+121: tmp = t_2 elif y <= 9e+130: tmp = -4.0 * (t * (a / c)) elif y <= 9e+144: tmp = b * (1.0 / (z * c)) else: tmp = t_2 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) t_2 = Float64(9.0 * Float64(x / Float64(z * Float64(c / y)))) tmp = 0.0 if (y <= -10200.0) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif (y <= 1.75e-71) tmp = t_1; elseif (y <= 4.2e-28) tmp = Float64(Float64(b / c) / z); elseif (y <= 1.2e+72) tmp = t_1; elseif (y <= 2.2e+121) tmp = t_2; elseif (y <= 9e+130) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (y <= 9e+144) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = t_2; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
t_2 = 9.0 * (x / (z * (c / y)));
tmp = 0.0;
if (y <= -10200.0)
tmp = 9.0 * ((y / c) * (x / z));
elseif (y <= 1.75e-71)
tmp = t_1;
elseif (y <= 4.2e-28)
tmp = (b / c) / z;
elseif (y <= 1.2e+72)
tmp = t_1;
elseif (y <= 2.2e+121)
tmp = t_2;
elseif (y <= 9e+130)
tmp = -4.0 * (t * (a / c));
elseif (y <= 9e+144)
tmp = b * (1.0 / (z * c));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -10200.0], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-71], t$95$1, If[LessEqual[y, 4.2e-28], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.2e+72], t$95$1, If[LessEqual[y, 2.2e+121], t$95$2, If[LessEqual[y, 9e+130], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+144], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
t_2 := 9 \cdot \frac{x}{z \cdot \frac{c}{y}}\\
\mathbf{if}\;y \leq -10200:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+130}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+144}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -10200Initial program 76.2%
Taylor expanded in x around inf 55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in x around 0 55.2%
*-commutative55.2%
times-frac60.9%
Simplified60.9%
if -10200 < y < 1.75e-71 or 4.20000000000000013e-28 < y < 1.20000000000000005e72Initial program 81.5%
Taylor expanded in x around 0 81.6%
Taylor expanded in z around inf 47.3%
associate-*r/47.3%
*-commutative47.3%
associate-/l*47.3%
associate-*r/50.5%
associate-/r/50.5%
Simplified50.5%
if 1.75e-71 < y < 4.20000000000000013e-28Initial program 99.8%
Taylor expanded in b around inf 49.9%
*-commutative49.9%
Simplified49.9%
div-inv49.7%
Applied egg-rr49.7%
un-div-inv49.9%
*-commutative49.9%
associate-/r*38.8%
Applied egg-rr38.8%
if 1.20000000000000005e72 < y < 2.20000000000000001e121 or 8.99999999999999935e144 < y Initial program 78.7%
associate-+l-78.7%
associate-*r*78.8%
associate-*r*81.2%
*-un-lft-identity81.2%
times-frac76.8%
associate--r-76.8%
fma-neg79.2%
associate-*r*79.1%
distribute-rgt-neg-in79.1%
associate-*l*79.1%
Applied egg-rr79.1%
Taylor expanded in c around 0 76.7%
Taylor expanded in x around inf 60.0%
associate-/r*57.6%
associate-/l*64.4%
associate-/l/64.6%
Simplified64.6%
if 2.20000000000000001e121 < y < 9.00000000000000078e130Initial program 0.0%
Taylor expanded in x around 0 51.5%
Taylor expanded in z around inf 51.5%
associate-*l/99.2%
Simplified99.2%
if 9.00000000000000078e130 < y < 8.99999999999999935e144Initial program 100.0%
Taylor expanded in b around inf 52.8%
*-commutative52.8%
Simplified52.8%
div-inv52.8%
Applied egg-rr52.8%
Final simplification55.4%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* a (* -4.0 (/ t c)))))
(if (<= y -10200.0)
(* 9.0 (* (/ y c) (/ x z)))
(if (<= y 8e-74)
t_1
(if (<= y 3.1e-29)
(/ (/ b c) z)
(if (<= y 5.9e+72)
t_1
(if (<= y 7.8e+121)
(* 9.0 (/ (* x y) (* z c)))
(if (<= y 7.5e+128)
(* -4.0 (* t (/ a c)))
(if (<= y 9e+144)
(* b (/ 1.0 (* z c)))
(* 9.0 (/ x (* z (/ c y)))))))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (y <= -10200.0) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (y <= 8e-74) {
tmp = t_1;
} else if (y <= 3.1e-29) {
tmp = (b / c) / z;
} else if (y <= 5.9e+72) {
tmp = t_1;
} else if (y <= 7.8e+121) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 7.5e+128) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 9.0 * (x / (z * (c / y)));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = a * ((-4.0d0) * (t / c))
if (y <= (-10200.0d0)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if (y <= 8d-74) then
tmp = t_1
else if (y <= 3.1d-29) then
tmp = (b / c) / z
else if (y <= 5.9d+72) then
tmp = t_1
else if (y <= 7.8d+121) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (y <= 7.5d+128) then
tmp = (-4.0d0) * (t * (a / c))
else if (y <= 9d+144) then
tmp = b * (1.0d0 / (z * c))
else
tmp = 9.0d0 * (x / (z * (c / y)))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (y <= -10200.0) {
tmp = 9.0 * ((y / c) * (x / z));
} else if (y <= 8e-74) {
tmp = t_1;
} else if (y <= 3.1e-29) {
tmp = (b / c) / z;
} else if (y <= 5.9e+72) {
tmp = t_1;
} else if (y <= 7.8e+121) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 7.5e+128) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 9.0 * (x / (z * (c / y)));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) tmp = 0 if y <= -10200.0: tmp = 9.0 * ((y / c) * (x / z)) elif y <= 8e-74: tmp = t_1 elif y <= 3.1e-29: tmp = (b / c) / z elif y <= 5.9e+72: tmp = t_1 elif y <= 7.8e+121: tmp = 9.0 * ((x * y) / (z * c)) elif y <= 7.5e+128: tmp = -4.0 * (t * (a / c)) elif y <= 9e+144: tmp = b * (1.0 / (z * c)) else: tmp = 9.0 * (x / (z * (c / y))) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) tmp = 0.0 if (y <= -10200.0) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif (y <= 8e-74) tmp = t_1; elseif (y <= 3.1e-29) tmp = Float64(Float64(b / c) / z); elseif (y <= 5.9e+72) tmp = t_1; elseif (y <= 7.8e+121) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (y <= 7.5e+128) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (y <= 9e+144) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(9.0 * Float64(x / Float64(z * Float64(c / y)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
tmp = 0.0;
if (y <= -10200.0)
tmp = 9.0 * ((y / c) * (x / z));
elseif (y <= 8e-74)
tmp = t_1;
elseif (y <= 3.1e-29)
tmp = (b / c) / z;
elseif (y <= 5.9e+72)
tmp = t_1;
elseif (y <= 7.8e+121)
tmp = 9.0 * ((x * y) / (z * c));
elseif (y <= 7.5e+128)
tmp = -4.0 * (t * (a / c));
elseif (y <= 9e+144)
tmp = b * (1.0 / (z * c));
else
tmp = 9.0 * (x / (z * (c / y)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -10200.0], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-74], t$95$1, If[LessEqual[y, 3.1e-29], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 5.9e+72], t$95$1, If[LessEqual[y, 7.8e+121], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+128], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+144], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;y \leq -10200:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+121}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+128}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+144}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x}{z \cdot \frac{c}{y}}\\
\end{array}
\end{array}
if y < -10200Initial program 76.2%
Taylor expanded in x around inf 55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in x around 0 55.2%
*-commutative55.2%
times-frac60.9%
Simplified60.9%
if -10200 < y < 7.99999999999999966e-74 or 3.10000000000000026e-29 < y < 5.9000000000000002e72Initial program 81.3%
Taylor expanded in x around 0 81.3%
Taylor expanded in z around inf 47.9%
associate-*r/47.9%
*-commutative47.9%
associate-/l*47.9%
associate-*r/51.2%
associate-/r/51.2%
Simplified51.2%
if 7.99999999999999966e-74 < y < 3.10000000000000026e-29Initial program 99.7%
Taylor expanded in b around inf 50.0%
*-commutative50.0%
Simplified50.0%
div-inv49.9%
Applied egg-rr49.9%
un-div-inv50.0%
*-commutative50.0%
associate-/r*31.9%
Applied egg-rr31.9%
if 5.9000000000000002e72 < y < 7.79999999999999967e121Initial program 100.0%
Taylor expanded in x around inf 51.7%
*-commutative51.7%
Simplified51.7%
if 7.79999999999999967e121 < y < 7.50000000000000076e128Initial program 0.0%
Taylor expanded in x around 0 51.5%
Taylor expanded in z around inf 51.5%
associate-*l/99.2%
Simplified99.2%
if 7.50000000000000076e128 < y < 8.99999999999999935e144Initial program 100.0%
Taylor expanded in b around inf 52.8%
*-commutative52.8%
Simplified52.8%
div-inv52.8%
Applied egg-rr52.8%
if 8.99999999999999935e144 < y Initial program 75.1%
associate-+l-75.1%
associate-*r*75.1%
associate-*r*77.9%
*-un-lft-identity77.9%
times-frac72.8%
associate--r-72.8%
fma-neg75.6%
associate-*r*75.5%
distribute-rgt-neg-in75.5%
associate-*l*75.5%
Applied egg-rr75.5%
Taylor expanded in c around 0 72.7%
Taylor expanded in x around inf 61.5%
associate-/r*61.3%
associate-/l*69.3%
associate-/l/66.8%
Simplified66.8%
Final simplification55.4%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* a (* -4.0 (/ t c)))))
(if (<= y -7800.0)
(* (* x (/ y c)) (/ 9.0 z))
(if (<= y 1.3e-70)
t_1
(if (<= y 3e-29)
(/ (/ b c) z)
(if (<= y 6.2e+72)
t_1
(if (<= y 1.2e+119)
(* 9.0 (/ (* x y) (* z c)))
(if (<= y 1.55e+131)
(* -4.0 (* t (/ a c)))
(if (<= y 9e+144)
(* b (/ 1.0 (* z c)))
(* 9.0 (/ x (* z (/ c y)))))))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (y <= -7800.0) {
tmp = (x * (y / c)) * (9.0 / z);
} else if (y <= 1.3e-70) {
tmp = t_1;
} else if (y <= 3e-29) {
tmp = (b / c) / z;
} else if (y <= 6.2e+72) {
tmp = t_1;
} else if (y <= 1.2e+119) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 1.55e+131) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 9.0 * (x / (z * (c / y)));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = a * ((-4.0d0) * (t / c))
if (y <= (-7800.0d0)) then
tmp = (x * (y / c)) * (9.0d0 / z)
else if (y <= 1.3d-70) then
tmp = t_1
else if (y <= 3d-29) then
tmp = (b / c) / z
else if (y <= 6.2d+72) then
tmp = t_1
else if (y <= 1.2d+119) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (y <= 1.55d+131) then
tmp = (-4.0d0) * (t * (a / c))
else if (y <= 9d+144) then
tmp = b * (1.0d0 / (z * c))
else
tmp = 9.0d0 * (x / (z * (c / y)))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (y <= -7800.0) {
tmp = (x * (y / c)) * (9.0 / z);
} else if (y <= 1.3e-70) {
tmp = t_1;
} else if (y <= 3e-29) {
tmp = (b / c) / z;
} else if (y <= 6.2e+72) {
tmp = t_1;
} else if (y <= 1.2e+119) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (y <= 1.55e+131) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 9.0 * (x / (z * (c / y)));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) tmp = 0 if y <= -7800.0: tmp = (x * (y / c)) * (9.0 / z) elif y <= 1.3e-70: tmp = t_1 elif y <= 3e-29: tmp = (b / c) / z elif y <= 6.2e+72: tmp = t_1 elif y <= 1.2e+119: tmp = 9.0 * ((x * y) / (z * c)) elif y <= 1.55e+131: tmp = -4.0 * (t * (a / c)) elif y <= 9e+144: tmp = b * (1.0 / (z * c)) else: tmp = 9.0 * (x / (z * (c / y))) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) tmp = 0.0 if (y <= -7800.0) tmp = Float64(Float64(x * Float64(y / c)) * Float64(9.0 / z)); elseif (y <= 1.3e-70) tmp = t_1; elseif (y <= 3e-29) tmp = Float64(Float64(b / c) / z); elseif (y <= 6.2e+72) tmp = t_1; elseif (y <= 1.2e+119) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (y <= 1.55e+131) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (y <= 9e+144) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(9.0 * Float64(x / Float64(z * Float64(c / y)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
tmp = 0.0;
if (y <= -7800.0)
tmp = (x * (y / c)) * (9.0 / z);
elseif (y <= 1.3e-70)
tmp = t_1;
elseif (y <= 3e-29)
tmp = (b / c) / z;
elseif (y <= 6.2e+72)
tmp = t_1;
elseif (y <= 1.2e+119)
tmp = 9.0 * ((x * y) / (z * c));
elseif (y <= 1.55e+131)
tmp = -4.0 * (t * (a / c));
elseif (y <= 9e+144)
tmp = b * (1.0 / (z * c));
else
tmp = 9.0 * (x / (z * (c / y)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7800.0], N[(N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-70], t$95$1, If[LessEqual[y, 3e-29], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6.2e+72], t$95$1, If[LessEqual[y, 1.2e+119], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+131], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+144], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;y \leq -7800:\\
\;\;\;\;\left(x \cdot \frac{y}{c}\right) \cdot \frac{9}{z}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+119}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+131}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+144}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x}{z \cdot \frac{c}{y}}\\
\end{array}
\end{array}
if y < -7800Initial program 76.2%
associate-+l-76.2%
associate-*r*76.2%
associate-*r*76.2%
*-un-lft-identity76.2%
times-frac85.0%
associate--r-85.0%
fma-neg85.0%
associate-*r*83.6%
distribute-rgt-neg-in83.6%
associate-*l*83.6%
Applied egg-rr83.6%
Taylor expanded in x around inf 55.2%
associate-*r/55.2%
*-commutative55.2%
times-frac63.5%
associate-*r/63.4%
Simplified63.4%
if -7800 < y < 1.30000000000000001e-70 or 3.0000000000000003e-29 < y < 6.19999999999999977e72Initial program 81.5%
Taylor expanded in x around 0 81.6%
Taylor expanded in z around inf 47.3%
associate-*r/47.3%
*-commutative47.3%
associate-/l*47.3%
associate-*r/50.5%
associate-/r/50.5%
Simplified50.5%
if 1.30000000000000001e-70 < y < 3.0000000000000003e-29Initial program 99.8%
Taylor expanded in b around inf 49.9%
*-commutative49.9%
Simplified49.9%
div-inv49.7%
Applied egg-rr49.7%
un-div-inv49.9%
*-commutative49.9%
associate-/r*38.8%
Applied egg-rr38.8%
if 6.19999999999999977e72 < y < 1.2e119Initial program 100.0%
Taylor expanded in x around inf 51.7%
*-commutative51.7%
Simplified51.7%
if 1.2e119 < y < 1.55000000000000008e131Initial program 0.0%
Taylor expanded in x around 0 51.5%
Taylor expanded in z around inf 51.5%
associate-*l/99.2%
Simplified99.2%
if 1.55000000000000008e131 < y < 8.99999999999999935e144Initial program 100.0%
Taylor expanded in b around inf 52.8%
*-commutative52.8%
Simplified52.8%
div-inv52.8%
Applied egg-rr52.8%
if 8.99999999999999935e144 < y Initial program 75.1%
associate-+l-75.1%
associate-*r*75.1%
associate-*r*77.9%
*-un-lft-identity77.9%
times-frac72.8%
associate--r-72.8%
fma-neg75.6%
associate-*r*75.5%
distribute-rgt-neg-in75.5%
associate-*l*75.5%
Applied egg-rr75.5%
Taylor expanded in c around 0 72.7%
Taylor expanded in x around inf 61.5%
associate-/r*61.3%
associate-/l*69.3%
associate-/l/66.8%
Simplified66.8%
Final simplification56.0%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* a (* -4.0 (/ t c)))))
(if (<= y -6800.0)
(* (* x (/ y c)) (/ 9.0 z))
(if (<= y 9.5e-73)
t_1
(if (<= y 2.5e-29)
(/ (/ b c) z)
(if (<= y 2.4e+39)
t_1
(if (<= y 2.1e+121)
(/ 1.0 (* 0.1111111111111111 (/ (* z c) (* x y))))
(if (<= y 1.55e+131)
(* -4.0 (* t (/ a c)))
(if (<= y 9e+144)
(* b (/ 1.0 (* z c)))
(* 9.0 (/ x (* z (/ c y)))))))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (y <= -6800.0) {
tmp = (x * (y / c)) * (9.0 / z);
} else if (y <= 9.5e-73) {
tmp = t_1;
} else if (y <= 2.5e-29) {
tmp = (b / c) / z;
} else if (y <= 2.4e+39) {
tmp = t_1;
} else if (y <= 2.1e+121) {
tmp = 1.0 / (0.1111111111111111 * ((z * c) / (x * y)));
} else if (y <= 1.55e+131) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 9.0 * (x / (z * (c / y)));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = a * ((-4.0d0) * (t / c))
if (y <= (-6800.0d0)) then
tmp = (x * (y / c)) * (9.0d0 / z)
else if (y <= 9.5d-73) then
tmp = t_1
else if (y <= 2.5d-29) then
tmp = (b / c) / z
else if (y <= 2.4d+39) then
tmp = t_1
else if (y <= 2.1d+121) then
tmp = 1.0d0 / (0.1111111111111111d0 * ((z * c) / (x * y)))
else if (y <= 1.55d+131) then
tmp = (-4.0d0) * (t * (a / c))
else if (y <= 9d+144) then
tmp = b * (1.0d0 / (z * c))
else
tmp = 9.0d0 * (x / (z * (c / y)))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double tmp;
if (y <= -6800.0) {
tmp = (x * (y / c)) * (9.0 / z);
} else if (y <= 9.5e-73) {
tmp = t_1;
} else if (y <= 2.5e-29) {
tmp = (b / c) / z;
} else if (y <= 2.4e+39) {
tmp = t_1;
} else if (y <= 2.1e+121) {
tmp = 1.0 / (0.1111111111111111 * ((z * c) / (x * y)));
} else if (y <= 1.55e+131) {
tmp = -4.0 * (t * (a / c));
} else if (y <= 9e+144) {
tmp = b * (1.0 / (z * c));
} else {
tmp = 9.0 * (x / (z * (c / y)));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) tmp = 0 if y <= -6800.0: tmp = (x * (y / c)) * (9.0 / z) elif y <= 9.5e-73: tmp = t_1 elif y <= 2.5e-29: tmp = (b / c) / z elif y <= 2.4e+39: tmp = t_1 elif y <= 2.1e+121: tmp = 1.0 / (0.1111111111111111 * ((z * c) / (x * y))) elif y <= 1.55e+131: tmp = -4.0 * (t * (a / c)) elif y <= 9e+144: tmp = b * (1.0 / (z * c)) else: tmp = 9.0 * (x / (z * (c / y))) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) tmp = 0.0 if (y <= -6800.0) tmp = Float64(Float64(x * Float64(y / c)) * Float64(9.0 / z)); elseif (y <= 9.5e-73) tmp = t_1; elseif (y <= 2.5e-29) tmp = Float64(Float64(b / c) / z); elseif (y <= 2.4e+39) tmp = t_1; elseif (y <= 2.1e+121) tmp = Float64(1.0 / Float64(0.1111111111111111 * Float64(Float64(z * c) / Float64(x * y)))); elseif (y <= 1.55e+131) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (y <= 9e+144) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(9.0 * Float64(x / Float64(z * Float64(c / y)))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
tmp = 0.0;
if (y <= -6800.0)
tmp = (x * (y / c)) * (9.0 / z);
elseif (y <= 9.5e-73)
tmp = t_1;
elseif (y <= 2.5e-29)
tmp = (b / c) / z;
elseif (y <= 2.4e+39)
tmp = t_1;
elseif (y <= 2.1e+121)
tmp = 1.0 / (0.1111111111111111 * ((z * c) / (x * y)));
elseif (y <= 1.55e+131)
tmp = -4.0 * (t * (a / c));
elseif (y <= 9e+144)
tmp = b * (1.0 / (z * c));
else
tmp = 9.0 * (x / (z * (c / y)));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6800.0], N[(N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(9.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e-73], t$95$1, If[LessEqual[y, 2.5e-29], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 2.4e+39], t$95$1, If[LessEqual[y, 2.1e+121], N[(1.0 / N[(0.1111111111111111 * N[(N[(z * c), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+131], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+144], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(9.0 * N[(x / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{if}\;y \leq -6800:\\
\;\;\;\;\left(x \cdot \frac{y}{c}\right) \cdot \frac{9}{z}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+121}:\\
\;\;\;\;\frac{1}{0.1111111111111111 \cdot \frac{z \cdot c}{x \cdot y}}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+131}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+144}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \frac{x}{z \cdot \frac{c}{y}}\\
\end{array}
\end{array}
if y < -6800Initial program 76.2%
associate-+l-76.2%
associate-*r*76.2%
associate-*r*76.2%
*-un-lft-identity76.2%
times-frac85.0%
associate--r-85.0%
fma-neg85.0%
associate-*r*83.6%
distribute-rgt-neg-in83.6%
associate-*l*83.6%
Applied egg-rr83.6%
Taylor expanded in x around inf 55.2%
associate-*r/55.2%
*-commutative55.2%
times-frac63.5%
associate-*r/63.4%
Simplified63.4%
if -6800 < y < 9.50000000000000005e-73 or 2.49999999999999993e-29 < y < 2.4000000000000001e39Initial program 80.6%
Taylor expanded in x around 0 80.6%
Taylor expanded in z around inf 49.0%
associate-*r/49.0%
*-commutative49.0%
associate-/l*49.0%
associate-*r/52.6%
associate-/r/52.6%
Simplified52.6%
if 9.50000000000000005e-73 < y < 2.49999999999999993e-29Initial program 99.7%
Taylor expanded in b around inf 50.0%
*-commutative50.0%
Simplified50.0%
div-inv49.9%
Applied egg-rr49.9%
un-div-inv50.0%
*-commutative50.0%
associate-/r*31.9%
Applied egg-rr31.9%
if 2.4000000000000001e39 < y < 2.1000000000000002e121Initial program 93.8%
associate-+l-93.8%
associate-*r*93.7%
associate-*r*93.7%
clear-num93.7%
inv-pow93.7%
associate--r-93.7%
fma-neg93.7%
associate-*r*93.7%
distribute-rgt-neg-in93.7%
associate-*l*93.7%
Applied egg-rr93.7%
Simplified93.7%
Taylor expanded in x around inf 51.9%
if 2.1000000000000002e121 < y < 1.55000000000000008e131Initial program 0.0%
Taylor expanded in x around 0 51.5%
Taylor expanded in z around inf 51.5%
associate-*l/99.2%
Simplified99.2%
if 1.55000000000000008e131 < y < 8.99999999999999935e144Initial program 100.0%
Taylor expanded in b around inf 52.8%
*-commutative52.8%
Simplified52.8%
div-inv52.8%
Applied egg-rr52.8%
if 8.99999999999999935e144 < y Initial program 75.1%
associate-+l-75.1%
associate-*r*75.1%
associate-*r*77.9%
*-un-lft-identity77.9%
times-frac72.8%
associate--r-72.8%
fma-neg75.6%
associate-*r*75.5%
distribute-rgt-neg-in75.5%
associate-*l*75.5%
Applied egg-rr75.5%
Taylor expanded in c around 0 72.7%
Taylor expanded in x around inf 61.5%
associate-/r*61.3%
associate-/l*69.3%
associate-/l/66.8%
Simplified66.8%
Final simplification56.7%
NOTE: x and y should be sorted in increasing order before calling this function. 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 -9000000.0) (not (<= z 6.8e-50))) (/ (- (+ (/ b z) (* 9.0 (/ (* x y) z))) (* 4.0 (* a t))) c) (/ (+ b (- (* y (* 9.0 x)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9000000.0) || !(z <= 6.8e-50)) {
tmp = (((b / z) + (9.0 * ((x * y) / z))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 <= (-9000000.0d0)) .or. (.not. (z <= 6.8d-50))) then
tmp = (((b / z) + (9.0d0 * ((x * y) / z))) - (4.0d0 * (a * t))) / c
else
tmp = (b + ((y * (9.0d0 * x)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y;
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 <= -9000000.0) || !(z <= 6.8e-50)) {
tmp = (((b / z) + (9.0 * ((x * y) / z))) - (4.0 * (a * t))) / c;
} else {
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -9000000.0) or not (z <= 6.8e-50): tmp = (((b / z) + (9.0 * ((x * y) / z))) - (4.0 * (a * t))) / c else: tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -9000000.0) || !(z <= 6.8e-50)) tmp = Float64(Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(x * y) / z))) - Float64(4.0 * Float64(a * t))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(9.0 * x)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -9000000.0) || ~((z <= 6.8e-50)))
tmp = (((b / z) + (9.0 * ((x * y) / z))) - (4.0 * (a * t))) / c;
else
tmp = (b + ((y * (9.0 * x)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. 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, -9000000.0], N[Not[LessEqual[z, 6.8e-50]], $MachinePrecision]], N[(N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9000000 \lor \neg \left(z \leq 6.8 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{\left(\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}\right) - 4 \cdot \left(a \cdot t\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(9 \cdot x\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -9e6 or 6.80000000000000029e-50 < z Initial program 63.0%
Taylor expanded in x around 0 81.8%
Taylor expanded in c around 0 90.0%
if -9e6 < z < 6.80000000000000029e-50Initial program 96.1%
Final simplification93.1%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* a (* -4.0 (/ t c)))) (t_2 (* 9.0 (* (/ y c) (/ x z)))))
(if (<= y -15000.0)
t_2
(if (<= y 3.6e-71)
t_1
(if (<= y 5e-29)
(/ (/ b c) z)
(if (<= y 1.2e+72)
t_1
(if (<= y 3.6e+119)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= y 1.85e+142) t_1 t_2))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (y <= -15000.0) {
tmp = t_2;
} else if (y <= 3.6e-71) {
tmp = t_1;
} else if (y <= 5e-29) {
tmp = (b / c) / z;
} else if (y <= 1.2e+72) {
tmp = t_1;
} else if (y <= 3.6e+119) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (y <= 1.85e+142) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = a * ((-4.0d0) * (t / c))
t_2 = 9.0d0 * ((y / c) * (x / z))
if (y <= (-15000.0d0)) then
tmp = t_2
else if (y <= 3.6d-71) then
tmp = t_1
else if (y <= 5d-29) then
tmp = (b / c) / z
else if (y <= 1.2d+72) then
tmp = t_1
else if (y <= 3.6d+119) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (y <= 1.85d+142) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = a * (-4.0 * (t / c));
double t_2 = 9.0 * ((y / c) * (x / z));
double tmp;
if (y <= -15000.0) {
tmp = t_2;
} else if (y <= 3.6e-71) {
tmp = t_1;
} else if (y <= 5e-29) {
tmp = (b / c) / z;
} else if (y <= 1.2e+72) {
tmp = t_1;
} else if (y <= 3.6e+119) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (y <= 1.85e+142) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = a * (-4.0 * (t / c)) t_2 = 9.0 * ((y / c) * (x / z)) tmp = 0 if y <= -15000.0: tmp = t_2 elif y <= 3.6e-71: tmp = t_1 elif y <= 5e-29: tmp = (b / c) / z elif y <= 1.2e+72: tmp = t_1 elif y <= 3.6e+119: tmp = 9.0 * ((y / z) * (x / c)) elif y <= 1.85e+142: tmp = t_1 else: tmp = t_2 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(a * Float64(-4.0 * Float64(t / c))) t_2 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) tmp = 0.0 if (y <= -15000.0) tmp = t_2; elseif (y <= 3.6e-71) tmp = t_1; elseif (y <= 5e-29) tmp = Float64(Float64(b / c) / z); elseif (y <= 1.2e+72) tmp = t_1; elseif (y <= 3.6e+119) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (y <= 1.85e+142) tmp = t_1; else tmp = t_2; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = a * (-4.0 * (t / c));
t_2 = 9.0 * ((y / c) * (x / z));
tmp = 0.0;
if (y <= -15000.0)
tmp = t_2;
elseif (y <= 3.6e-71)
tmp = t_1;
elseif (y <= 5e-29)
tmp = (b / c) / z;
elseif (y <= 1.2e+72)
tmp = t_1;
elseif (y <= 3.6e+119)
tmp = 9.0 * ((y / z) * (x / c));
elseif (y <= 1.85e+142)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -15000.0], t$95$2, If[LessEqual[y, 3.6e-71], t$95$1, If[LessEqual[y, 5e-29], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.2e+72], t$95$1, If[LessEqual[y, 3.6e+119], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+142], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
t_2 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;y \leq -15000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-29}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+119}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+142}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -15000 or 1.8499999999999999e142 < y Initial program 75.8%
Taylor expanded in x around inf 57.4%
*-commutative57.4%
Simplified57.4%
Taylor expanded in x around 0 57.4%
*-commutative57.4%
times-frac62.9%
Simplified62.9%
if -15000 < y < 3.6e-71 or 4.99999999999999986e-29 < y < 1.20000000000000005e72 or 3.60000000000000001e119 < y < 1.8499999999999999e142Initial program 80.6%
Taylor expanded in x around 0 80.7%
Taylor expanded in z around inf 46.7%
associate-*r/46.7%
*-commutative46.7%
associate-/l*46.7%
associate-*r/51.2%
associate-/r/51.2%
Simplified51.2%
if 3.6e-71 < y < 4.99999999999999986e-29Initial program 99.8%
Taylor expanded in b around inf 49.9%
*-commutative49.9%
Simplified49.9%
div-inv49.7%
Applied egg-rr49.7%
un-div-inv49.9%
*-commutative49.9%
associate-/r*38.8%
Applied egg-rr38.8%
if 1.20000000000000005e72 < y < 3.60000000000000001e119Initial program 100.0%
associate-+l-100.0%
associate-*r*100.0%
associate-*r*100.0%
*-un-lft-identity100.0%
times-frac100.0%
associate--r-100.0%
fma-neg100.0%
associate-*r*100.0%
distribute-rgt-neg-in100.0%
associate-*l*100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 51.7%
times-frac51.4%
Simplified51.4%
Final simplification55.4%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (<= b -5.5e+110)
(/ 1.0 (/ c (/ (+ b (* -4.0 (* z (* a t)))) z)))
(if (<= b 6e-61)
(- (* 9.0 (/ (* x y) (* z c))) (* 4.0 (/ (* a t) c)))
(* (/ 1.0 z) (/ (+ b (* 9.0 (* x y))) c)))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -5.5e+110) {
tmp = 1.0 / (c / ((b + (-4.0 * (z * (a * t)))) / z));
} else if (b <= 6e-61) {
tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c));
} else {
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 <= (-5.5d+110)) then
tmp = 1.0d0 / (c / ((b + ((-4.0d0) * (z * (a * t)))) / z))
else if (b <= 6d-61) then
tmp = (9.0d0 * ((x * y) / (z * c))) - (4.0d0 * ((a * t) / c))
else
tmp = (1.0d0 / z) * ((b + (9.0d0 * (x * y))) / c)
end if
code = tmp
end function
assert x < y;
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 <= -5.5e+110) {
tmp = 1.0 / (c / ((b + (-4.0 * (z * (a * t)))) / z));
} else if (b <= 6e-61) {
tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c));
} else {
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -5.5e+110: tmp = 1.0 / (c / ((b + (-4.0 * (z * (a * t)))) / z)) elif b <= 6e-61: tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c)) else: tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -5.5e+110) tmp = Float64(1.0 / Float64(c / Float64(Float64(b + Float64(-4.0 * Float64(z * Float64(a * t)))) / z))); elseif (b <= 6e-61) tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))) - Float64(4.0 * Float64(Float64(a * t) / c))); else tmp = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(9.0 * Float64(x * y))) / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -5.5e+110)
tmp = 1.0 / (c / ((b + (-4.0 * (z * (a * t)))) / z));
elseif (b <= 6e-61)
tmp = (9.0 * ((x * y) / (z * c))) - (4.0 * ((a * t) / c));
else
tmp = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -5.5e+110], N[(1.0 / N[(c / N[(N[(b + N[(-4.0 * N[(z * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-61], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{1}{\frac{c}{\frac{b + -4 \cdot \left(z \cdot \left(a \cdot t\right)\right)}{z}}}\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-61}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c} - 4 \cdot \frac{a \cdot t}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b + 9 \cdot \left(x \cdot y\right)}{c}\\
\end{array}
\end{array}
if b < -5.49999999999999996e110Initial program 73.7%
associate-+l-73.7%
associate-*r*73.7%
associate-*r*73.7%
clear-num73.7%
inv-pow73.7%
associate--r-73.7%
fma-neg73.7%
associate-*r*73.7%
distribute-rgt-neg-in73.7%
associate-*l*73.7%
Applied egg-rr73.7%
Simplified73.7%
Taylor expanded in x around 0 68.8%
associate-/l*66.8%
associate-*r*71.3%
Simplified71.3%
if -5.49999999999999996e110 < b < 6.00000000000000024e-61Initial program 81.5%
Taylor expanded in x around 0 82.2%
Taylor expanded in b around 0 80.7%
if 6.00000000000000024e-61 < b Initial program 79.7%
associate-+l-79.7%
associate-*r*79.8%
associate-*r*76.9%
*-un-lft-identity76.9%
times-frac82.6%
associate--r-82.6%
fma-neg84.1%
associate-*r*87.0%
distribute-rgt-neg-in87.0%
associate-*l*87.0%
Applied egg-rr87.0%
Taylor expanded in z around 0 68.2%
Final simplification75.9%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* (/ 1.0 z) (/ (+ b (* 9.0 (* x y))) c))))
(if (<= a 1e+19)
t_1
(if (<= a 9.5e+62)
(* a (* -4.0 (/ t c)))
(if (<= a 7e+125) t_1 (* -4.0 (/ a (/ c t))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
double tmp;
if (a <= 1e+19) {
tmp = t_1;
} else if (a <= 9.5e+62) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 7e+125) {
tmp = t_1;
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = (1.0d0 / z) * ((b + (9.0d0 * (x * y))) / c)
if (a <= 1d+19) then
tmp = t_1
else if (a <= 9.5d+62) then
tmp = a * ((-4.0d0) * (t / c))
else if (a <= 7d+125) then
tmp = t_1
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
double tmp;
if (a <= 1e+19) {
tmp = t_1;
} else if (a <= 9.5e+62) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 7e+125) {
tmp = t_1;
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = (1.0 / z) * ((b + (9.0 * (x * y))) / c) tmp = 0 if a <= 1e+19: tmp = t_1 elif a <= 9.5e+62: tmp = a * (-4.0 * (t / c)) elif a <= 7e+125: tmp = t_1 else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(1.0 / z) * Float64(Float64(b + Float64(9.0 * Float64(x * y))) / c)) tmp = 0.0 if (a <= 1e+19) tmp = t_1; elseif (a <= 9.5e+62) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (a <= 7e+125) tmp = t_1; else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = (1.0 / z) * ((b + (9.0 * (x * y))) / c);
tmp = 0.0;
if (a <= 1e+19)
tmp = t_1;
elseif (a <= 9.5e+62)
tmp = a * (-4.0 * (t / c));
elseif (a <= 7e+125)
tmp = t_1;
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(1.0 / z), $MachinePrecision] * N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1e+19], t$95$1, If[LessEqual[a, 9.5e+62], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e+125], t$95$1, N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{1}{z} \cdot \frac{b + 9 \cdot \left(x \cdot y\right)}{c}\\
\mathbf{if}\;a \leq 10^{+19}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+125}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if a < 1e19 or 9.5000000000000003e62 < a < 7.00000000000000023e125Initial program 79.3%
associate-+l-79.3%
associate-*r*79.3%
associate-*r*78.9%
*-un-lft-identity78.9%
times-frac82.3%
associate--r-82.3%
fma-neg82.3%
associate-*r*82.8%
distribute-rgt-neg-in82.8%
associate-*l*82.8%
Applied egg-rr82.8%
Taylor expanded in z around 0 66.9%
if 1e19 < a < 9.5000000000000003e62Initial program 64.2%
Taylor expanded in x around 0 76.4%
Taylor expanded in z around inf 51.7%
associate-*r/51.7%
*-commutative51.7%
associate-/l*51.7%
associate-*r/75.0%
associate-/r/75.0%
Simplified75.0%
if 7.00000000000000023e125 < a Initial program 85.7%
Taylor expanded in z around inf 65.3%
*-commutative65.3%
associate-/l*71.9%
Simplified71.9%
Final simplification67.9%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* 9.0 (* x y)))))
(if (<= a 1.45e+19)
(* (/ 1.0 z) (/ t_1 c))
(if (<= a 9.2e+62)
(* a (* -4.0 (/ t c)))
(if (<= a 5.6e+126) (/ 1.0 (/ (* z c) t_1)) (* -4.0 (/ a (/ c t))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double tmp;
if (a <= 1.45e+19) {
tmp = (1.0 / z) * (t_1 / c);
} else if (a <= 9.2e+62) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 5.6e+126) {
tmp = 1.0 / ((z * c) / t_1);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 + (9.0d0 * (x * y))
if (a <= 1.45d+19) then
tmp = (1.0d0 / z) * (t_1 / c)
else if (a <= 9.2d+62) then
tmp = a * ((-4.0d0) * (t / c))
else if (a <= 5.6d+126) then
tmp = 1.0d0 / ((z * c) / t_1)
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
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 + (9.0 * (x * y));
double tmp;
if (a <= 1.45e+19) {
tmp = (1.0 / z) * (t_1 / c);
} else if (a <= 9.2e+62) {
tmp = a * (-4.0 * (t / c));
} else if (a <= 5.6e+126) {
tmp = 1.0 / ((z * c) / t_1);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = b + (9.0 * (x * y)) tmp = 0 if a <= 1.45e+19: tmp = (1.0 / z) * (t_1 / c) elif a <= 9.2e+62: tmp = a * (-4.0 * (t / c)) elif a <= 5.6e+126: tmp = 1.0 / ((z * c) / t_1) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(b + Float64(9.0 * Float64(x * y))) tmp = 0.0 if (a <= 1.45e+19) tmp = Float64(Float64(1.0 / z) * Float64(t_1 / c)); elseif (a <= 9.2e+62) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (a <= 5.6e+126) tmp = Float64(1.0 / Float64(Float64(z * c) / t_1)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b + (9.0 * (x * y));
tmp = 0.0;
if (a <= 1.45e+19)
tmp = (1.0 / z) * (t_1 / c);
elseif (a <= 9.2e+62)
tmp = a * (-4.0 * (t / c));
elseif (a <= 5.6e+126)
tmp = 1.0 / ((z * c) / t_1);
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.45e+19], N[(N[(1.0 / z), $MachinePrecision] * N[(t$95$1 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.2e+62], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+126], N[(1.0 / N[(N[(z * c), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := b + 9 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;a \leq 1.45 \cdot 10^{+19}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{t_1}{c}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{+62}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{+126}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{t_1}}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if a < 1.45e19Initial program 78.4%
associate-+l-78.4%
associate-*r*78.4%
associate-*r*78.0%
*-un-lft-identity78.0%
times-frac82.2%
associate--r-82.2%
fma-neg82.2%
associate-*r*82.6%
distribute-rgt-neg-in82.6%
associate-*l*82.6%
Applied egg-rr82.6%
Taylor expanded in z around 0 66.7%
if 1.45e19 < a < 9.19999999999999936e62Initial program 64.2%
Taylor expanded in x around 0 76.4%
Taylor expanded in z around inf 51.7%
associate-*r/51.7%
*-commutative51.7%
associate-/l*51.7%
associate-*r/75.0%
associate-/r/75.0%
Simplified75.0%
if 9.19999999999999936e62 < a < 5.60000000000000018e126Initial program 91.8%
associate-+l-91.8%
associate-*r*91.9%
associate-*r*91.8%
clear-num92.0%
inv-pow92.0%
associate--r-92.0%
fma-neg92.0%
associate-*r*92.0%
distribute-rgt-neg-in92.0%
associate-*l*92.0%
Applied egg-rr92.0%
Simplified92.0%
Taylor expanded in z around 0 77.2%
if 5.60000000000000018e126 < a Initial program 85.7%
Taylor expanded in z around inf 65.3%
*-commutative65.3%
associate-/l*71.9%
Simplified71.9%
Final simplification68.3%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* 9.0 (* x y)))))
(if (<= a 1.95e+18)
(* (/ 1.0 z) (/ t_1 c))
(if (<= a 2.15e+62)
(/ (- b (* 4.0 (* a (* z t)))) (* z c))
(if (<= a 1.06e+126) (/ 1.0 (/ (* z c) t_1)) (* -4.0 (/ a (/ c t))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double tmp;
if (a <= 1.95e+18) {
tmp = (1.0 / z) * (t_1 / c);
} else if (a <= 2.15e+62) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (a <= 1.06e+126) {
tmp = 1.0 / ((z * c) / t_1);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 + (9.0d0 * (x * y))
if (a <= 1.95d+18) then
tmp = (1.0d0 / z) * (t_1 / c)
else if (a <= 2.15d+62) then
tmp = (b - (4.0d0 * (a * (z * t)))) / (z * c)
else if (a <= 1.06d+126) then
tmp = 1.0d0 / ((z * c) / t_1)
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
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 + (9.0 * (x * y));
double tmp;
if (a <= 1.95e+18) {
tmp = (1.0 / z) * (t_1 / c);
} else if (a <= 2.15e+62) {
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
} else if (a <= 1.06e+126) {
tmp = 1.0 / ((z * c) / t_1);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = b + (9.0 * (x * y)) tmp = 0 if a <= 1.95e+18: tmp = (1.0 / z) * (t_1 / c) elif a <= 2.15e+62: tmp = (b - (4.0 * (a * (z * t)))) / (z * c) elif a <= 1.06e+126: tmp = 1.0 / ((z * c) / t_1) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(b + Float64(9.0 * Float64(x * y))) tmp = 0.0 if (a <= 1.95e+18) tmp = Float64(Float64(1.0 / z) * Float64(t_1 / c)); elseif (a <= 2.15e+62) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(z * t)))) / Float64(z * c)); elseif (a <= 1.06e+126) tmp = Float64(1.0 / Float64(Float64(z * c) / t_1)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b + (9.0 * (x * y));
tmp = 0.0;
if (a <= 1.95e+18)
tmp = (1.0 / z) * (t_1 / c);
elseif (a <= 2.15e+62)
tmp = (b - (4.0 * (a * (z * t)))) / (z * c);
elseif (a <= 1.06e+126)
tmp = 1.0 / ((z * c) / t_1);
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 1.95e+18], N[(N[(1.0 / z), $MachinePrecision] * N[(t$95$1 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.15e+62], N[(N[(b - N[(4.0 * N[(a * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.06e+126], N[(1.0 / N[(N[(z * c), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := b + 9 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;a \leq 1.95 \cdot 10^{+18}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{t_1}{c}\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{+62}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(z \cdot t\right)\right)}{z \cdot c}\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{+126}:\\
\;\;\;\;\frac{1}{\frac{z \cdot c}{t_1}}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if a < 1.95e18Initial program 78.3%
associate-+l-78.3%
associate-*r*78.3%
associate-*r*77.9%
*-un-lft-identity77.9%
times-frac82.1%
associate--r-82.1%
fma-neg82.1%
associate-*r*82.5%
distribute-rgt-neg-in82.5%
associate-*l*82.5%
Applied egg-rr82.5%
Taylor expanded in z around 0 66.5%
if 1.95e18 < a < 2.1499999999999998e62Initial program 76.7%
associate-+l-76.7%
associate-*l*76.7%
associate-*l*64.9%
Simplified64.9%
Taylor expanded in x around 0 51.9%
if 2.1499999999999998e62 < a < 1.0600000000000001e126Initial program 85.3%
associate-+l-85.3%
associate-*r*85.4%
associate-*r*85.3%
clear-num85.4%
inv-pow85.4%
associate--r-85.4%
fma-neg85.4%
associate-*r*85.4%
distribute-rgt-neg-in85.4%
associate-*l*85.4%
Applied egg-rr85.4%
Simplified85.4%
Taylor expanded in z around 0 72.0%
if 1.0600000000000001e126 < a Initial program 85.7%
Taylor expanded in z around inf 65.3%
*-commutative65.3%
associate-/l*71.9%
Simplified71.9%
Final simplification67.2%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (* 9.0 (* (/ y z) (/ x c)))) (t_2 (* -4.0 (/ a (/ c t)))))
(if (<= t -2.2e+84)
t_2
(if (<= t -1.65e-211)
t_1
(if (<= t -1.05e-302) (/ (/ b c) z) (if (<= t 2.8e-34) t_1 t_2))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / z) * (x / c));
double t_2 = -4.0 * (a / (c / t));
double tmp;
if (t <= -2.2e+84) {
tmp = t_2;
} else if (t <= -1.65e-211) {
tmp = t_1;
} else if (t <= -1.05e-302) {
tmp = (b / c) / z;
} else if (t <= 2.8e-34) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 = 9.0d0 * ((y / z) * (x / c))
t_2 = (-4.0d0) * (a / (c / t))
if (t <= (-2.2d+84)) then
tmp = t_2
else if (t <= (-1.65d-211)) then
tmp = t_1
else if (t <= (-1.05d-302)) then
tmp = (b / c) / z
else if (t <= 2.8d-34) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / z) * (x / c));
double t_2 = -4.0 * (a / (c / t));
double tmp;
if (t <= -2.2e+84) {
tmp = t_2;
} else if (t <= -1.65e-211) {
tmp = t_1;
} else if (t <= -1.05e-302) {
tmp = (b / c) / z;
} else if (t <= 2.8e-34) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * ((y / z) * (x / c)) t_2 = -4.0 * (a / (c / t)) tmp = 0 if t <= -2.2e+84: tmp = t_2 elif t <= -1.65e-211: tmp = t_1 elif t <= -1.05e-302: tmp = (b / c) / z elif t <= 2.8e-34: tmp = t_1 else: tmp = t_2 return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))) t_2 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (t <= -2.2e+84) tmp = t_2; elseif (t <= -1.65e-211) tmp = t_1; elseif (t <= -1.05e-302) tmp = Float64(Float64(b / c) / z); elseif (t <= 2.8e-34) tmp = t_1; else tmp = t_2; end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * ((y / z) * (x / c));
t_2 = -4.0 * (a / (c / t));
tmp = 0.0;
if (t <= -2.2e+84)
tmp = t_2;
elseif (t <= -1.65e-211)
tmp = t_1;
elseif (t <= -1.05e-302)
tmp = (b / c) / z;
elseif (t <= 2.8e-34)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
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[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+84], t$95$2, If[LessEqual[t, -1.65e-211], t$95$1, If[LessEqual[t, -1.05e-302], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 2.8e-34], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
t_2 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-302}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-34}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.1999999999999998e84 or 2.79999999999999997e-34 < t Initial program 73.4%
Taylor expanded in z around inf 47.7%
*-commutative47.7%
associate-/l*57.1%
Simplified57.1%
if -2.1999999999999998e84 < t < -1.6500000000000001e-211 or -1.05000000000000006e-302 < t < 2.79999999999999997e-34Initial program 85.7%
associate-+l-85.7%
associate-*r*85.7%
associate-*r*85.7%
*-un-lft-identity85.7%
times-frac87.4%
associate--r-87.4%
fma-neg87.4%
associate-*r*87.4%
distribute-rgt-neg-in87.4%
associate-*l*87.4%
Applied egg-rr87.4%
Taylor expanded in x around inf 44.4%
times-frac42.5%
Simplified42.5%
if -1.6500000000000001e-211 < t < -1.05000000000000006e-302Initial program 85.1%
Taylor expanded in b around inf 53.6%
*-commutative53.6%
Simplified53.6%
div-inv53.6%
Applied egg-rr53.6%
un-div-inv53.6%
*-commutative53.6%
associate-/r*61.2%
Applied egg-rr61.2%
Final simplification50.4%
NOTE: x and y should be sorted in increasing order before calling this function. 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 (<= t -1.2e+141) (* -4.0 (/ a (/ c t))) (if (<= t 2e-6) (/ (+ b (* y (* 9.0 x))) (* z c)) (* -4.0 (* t (/ a c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.2e+141) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 2e-6) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (t <= (-1.2d+141)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 2d-6) then
tmp = (b + (y * (9.0d0 * x))) / (z * c)
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.2e+141) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 2e-6) {
tmp = (b + (y * (9.0 * x))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.2e+141: tmp = -4.0 * (a / (c / t)) elif t <= 2e-6: tmp = (b + (y * (9.0 * x))) / (z * c) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.2e+141) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 2e-6) tmp = Float64(Float64(b + Float64(y * Float64(9.0 * x))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.2e+141)
tmp = -4.0 * (a / (c / t));
elseif (t <= 2e-6)
tmp = (b + (y * (9.0 * x))) / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.2e+141], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-6], N[(N[(b + N[(y * N[(9.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+141}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-6}:\\
\;\;\;\;\frac{b + y \cdot \left(9 \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if t < -1.19999999999999999e141Initial program 69.2%
Taylor expanded in z around inf 52.0%
*-commutative52.0%
associate-/l*64.6%
Simplified64.6%
if -1.19999999999999999e141 < t < 1.99999999999999991e-6Initial program 85.7%
associate-+l-85.7%
associate-*r*85.7%
associate-*r*85.7%
*-un-lft-identity85.7%
times-frac88.9%
associate--r-88.9%
fma-neg88.9%
associate-*r*88.3%
distribute-rgt-neg-in88.3%
associate-*l*88.3%
Applied egg-rr88.3%
Taylor expanded in c around 0 88.3%
Taylor expanded in z around 0 69.3%
associate-*r*69.3%
Simplified69.3%
if 1.99999999999999991e-6 < t Initial program 71.9%
Taylor expanded in x around 0 73.8%
Taylor expanded in z around inf 47.9%
associate-*l/56.5%
Simplified56.5%
Final simplification65.5%
NOTE: x and y should be sorted in increasing order before calling this function.
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 (<= t -5.8e+140)
(* -4.0 (/ a (/ c t)))
(if (<= t 1.9e-10)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* -4.0 (* t (/ a c))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5.8e+140) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 1.9e-10) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (t <= (-5.8d+140)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 1.9d-10) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -5.8e+140) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 1.9e-10) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -5.8e+140: tmp = -4.0 * (a / (c / t)) elif t <= 1.9e-10: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -5.8e+140) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 1.9e-10) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -5.8e+140)
tmp = -4.0 * (a / (c / t));
elseif (t <= 1.9e-10)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -5.8e+140], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-10], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+140}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-10}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if t < -5.7999999999999998e140Initial program 69.2%
Taylor expanded in z around inf 52.0%
*-commutative52.0%
associate-/l*64.6%
Simplified64.6%
if -5.7999999999999998e140 < t < 1.8999999999999999e-10Initial program 85.7%
Taylor expanded in x around inf 69.3%
if 1.8999999999999999e-10 < t Initial program 71.9%
Taylor expanded in x around 0 73.8%
Taylor expanded in z around inf 47.9%
associate-*l/56.5%
Simplified56.5%
Final simplification65.5%
NOTE: x and y should be sorted in increasing order before calling this function. 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 (<= t -1.65e+74) (not (<= t 3e-125))) (* -4.0 (* t (/ a c))) (/ b (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.65e+74) || !(t <= 3e-125)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 ((t <= (-1.65d+74)) .or. (.not. (t <= 3d-125))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((t <= -1.65e+74) || !(t <= 3e-125)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (t <= -1.65e+74) or not (t <= 3e-125): tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((t <= -1.65e+74) || !(t <= 3e-125)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((t <= -1.65e+74) || ~((t <= 3e-125)))
tmp = -4.0 * (t * (a / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. 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[t, -1.65e+74], N[Not[LessEqual[t, 3e-125]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+74} \lor \neg \left(t \leq 3 \cdot 10^{-125}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -1.6500000000000001e74 or 2.9999999999999999e-125 < t Initial program 73.5%
Taylor expanded in x around 0 72.3%
Taylor expanded in z around inf 46.9%
associate-*l/51.5%
Simplified51.5%
if -1.6500000000000001e74 < t < 2.9999999999999999e-125Initial program 88.9%
Taylor expanded in b around inf 41.5%
*-commutative41.5%
Simplified41.5%
Final simplification47.4%
NOTE: x and y should be sorted in increasing order before calling this function. 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 (<= t -9.2e+24) (* a (* -4.0 (/ t c))) (if (<= t 5.8e-125) (/ b (* z c)) (* -4.0 (* t (/ a c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.2e+24) {
tmp = a * (-4.0 * (t / c));
} else if (t <= 5.8e-125) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (t <= (-9.2d+24)) then
tmp = a * ((-4.0d0) * (t / c))
else if (t <= 5.8d-125) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -9.2e+24) {
tmp = a * (-4.0 * (t / c));
} else if (t <= 5.8e-125) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -9.2e+24: tmp = a * (-4.0 * (t / c)) elif t <= 5.8e-125: tmp = b / (z * c) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -9.2e+24) tmp = Float64(a * Float64(-4.0 * Float64(t / c))); elseif (t <= 5.8e-125) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -9.2e+24)
tmp = a * (-4.0 * (t / c));
elseif (t <= 5.8e-125)
tmp = b / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -9.2e+24], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e-125], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{+24}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if t < -9.1999999999999996e24Initial program 75.8%
Taylor expanded in x around 0 67.1%
Taylor expanded in z around inf 52.7%
associate-*r/52.7%
*-commutative52.7%
associate-/l*52.7%
associate-*r/60.6%
associate-/r/60.6%
Simplified60.6%
if -9.1999999999999996e24 < t < 5.8000000000000004e-125Initial program 89.1%
Taylor expanded in b around inf 44.8%
*-commutative44.8%
Simplified44.8%
if 5.8000000000000004e-125 < t Initial program 73.3%
Taylor expanded in x around 0 76.3%
Taylor expanded in z around inf 45.0%
associate-*l/49.5%
Simplified49.5%
Final simplification50.2%
NOTE: x and y should be sorted in increasing order before calling this function. 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 (<= t -1.56e+74) (* -4.0 (/ a (/ c t))) (if (<= t 3.9e-124) (/ b (* z c)) (* -4.0 (* t (/ a c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.56e+74) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 3.9e-124) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (t <= (-1.56d+74)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 3.9d-124) then
tmp = b / (z * c)
else
tmp = (-4.0d0) * (t * (a / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.56e+74) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 3.9e-124) {
tmp = b / (z * c);
} else {
tmp = -4.0 * (t * (a / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.56e+74: tmp = -4.0 * (a / (c / t)) elif t <= 3.9e-124: tmp = b / (z * c) else: tmp = -4.0 * (t * (a / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.56e+74) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 3.9e-124) tmp = Float64(b / Float64(z * c)); else tmp = Float64(-4.0 * Float64(t * Float64(a / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.56e+74)
tmp = -4.0 * (a / (c / t));
elseif (t <= 3.9e-124)
tmp = b / (z * c);
else
tmp = -4.0 * (t * (a / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.56e+74], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-124], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{+74}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-124}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\end{array}
\end{array}
if t < -1.56e74Initial program 74.0%
Taylor expanded in z around inf 50.9%
*-commutative50.9%
associate-/l*60.7%
Simplified60.7%
if -1.56e74 < t < 3.89999999999999993e-124Initial program 88.9%
Taylor expanded in b around inf 41.5%
*-commutative41.5%
Simplified41.5%
if 3.89999999999999993e-124 < t Initial program 73.3%
Taylor expanded in x around 0 76.3%
Taylor expanded in z around inf 45.0%
associate-*l/49.5%
Simplified49.5%
Final simplification48.4%
NOTE: x and y should be sorted in increasing order before calling this function. 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 (<= t -3.7e+74) (* -4.0 (/ a (/ c t))) (if (<= t 3.9e-124) (/ b (* z c)) (/ (* t -4.0) (/ c a)))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.7e+74) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 3.9e-124) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (t <= (-3.7d+74)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 3.9d-124) then
tmp = b / (z * c)
else
tmp = (t * (-4.0d0)) / (c / a)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -3.7e+74) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 3.9e-124) {
tmp = b / (z * c);
} else {
tmp = (t * -4.0) / (c / a);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -3.7e+74: tmp = -4.0 * (a / (c / t)) elif t <= 3.9e-124: tmp = b / (z * c) else: tmp = (t * -4.0) / (c / a) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -3.7e+74) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 3.9e-124) tmp = Float64(b / Float64(z * c)); else tmp = Float64(Float64(t * -4.0) / Float64(c / a)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -3.7e+74)
tmp = -4.0 * (a / (c / t));
elseif (t <= 3.9e-124)
tmp = b / (z * c);
else
tmp = (t * -4.0) / (c / a);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -3.7e+74], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-124], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t * -4.0), $MachinePrecision] / N[(c / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{+74}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-124}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot -4}{\frac{c}{a}}\\
\end{array}
\end{array}
if t < -3.7000000000000001e74Initial program 74.0%
Taylor expanded in z around inf 50.9%
*-commutative50.9%
associate-/l*60.7%
Simplified60.7%
if -3.7000000000000001e74 < t < 3.89999999999999993e-124Initial program 88.9%
Taylor expanded in b around inf 41.5%
*-commutative41.5%
Simplified41.5%
if 3.89999999999999993e-124 < t Initial program 73.3%
Taylor expanded in z around inf 45.0%
associate-*r/45.0%
*-commutative45.0%
associate-*r*45.0%
Simplified45.0%
*-un-lft-identity45.0%
associate-/l*49.5%
Applied egg-rr49.5%
Final simplification48.4%
NOTE: x and y should be sorted in increasing order before calling this function. 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 (<= t -1.55e+76) (/ (/ b c) z) (/ b (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.55e+76) {
tmp = (b / c) / z;
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 (t <= (-1.55d+76)) then
tmp = (b / c) / z
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.55e+76) {
tmp = (b / c) / z;
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.55e+76: tmp = (b / c) / z else: tmp = b / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.55e+76) tmp = Float64(Float64(b / c) / z); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.55e+76)
tmp = (b / c) / z;
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.55e+76], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+76}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if t < -1.55000000000000006e76Initial program 74.0%
Taylor expanded in b around inf 16.5%
*-commutative16.5%
Simplified16.5%
div-inv16.4%
Applied egg-rr16.4%
un-div-inv16.5%
*-commutative16.5%
associate-/r*23.8%
Applied egg-rr23.8%
if -1.55000000000000006e76 < t Initial program 81.2%
Taylor expanded in b around inf 32.5%
*-commutative32.5%
Simplified32.5%
Final simplification30.8%
NOTE: x and y should be sorted in increasing order before calling this function. 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(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x and y should be sorted in increasing order before calling this function.
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 x < y;
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);
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x and y should be sorted in increasing order before calling this function. 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}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 79.8%
Taylor expanded in b around inf 29.4%
*-commutative29.4%
Simplified29.4%
Final simplification29.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 2023309
(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)))