
(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 16 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.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -8.5e-58)
(/ (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z)) c)
(if (<= z 1.5e-27)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(/ (+ (/ (+ b (* x (* 9.0 y))) z) (* t (* a -4.0))) c))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.5e-58) {
tmp = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z)) / c;
} else if (z <= 1.5e-27) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
}
return tmp;
}
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -8.5e-58) tmp = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z)) / c); elseif (z <= 1.5e-27) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(Float64(Float64(b + Float64(x * Float64(9.0 * y))) / z) + Float64(t * Float64(a * -4.0))) / c); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -8.5e-58], N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.5e-27], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-58}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-27}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b + x \cdot \left(9 \cdot y\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\end{array}
\end{array}
if z < -8.5000000000000004e-58Initial program 68.4%
associate-/r*75.9%
Simplified96.1%
if -8.5000000000000004e-58 < z < 1.5000000000000001e-27Initial program 96.6%
if 1.5000000000000001e-27 < z Initial program 66.3%
associate-/r*76.1%
Simplified87.2%
fma-udef87.2%
Applied egg-rr87.2%
Final simplification94.2%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* 9.0 y))))
(if (or (<= z -8.5e-58) (not (<= z 8.8e+30)))
(/ (+ (/ (+ b t_1) z) (* t (* a -4.0))) c)
(/ (+ b (- t_1 (* (* z 4.0) (* t a)))) (* z c)))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -8.5e-58) || !(z <= 8.8e+30)) {
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
NOTE: x and y 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 = x * (9.0d0 * y)
if ((z <= (-8.5d-58)) .or. (.not. (z <= 8.8d+30))) then
tmp = (((b + t_1) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + (t_1 - ((z * 4.0d0) * (t * a)))) / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -8.5e-58) || !(z <= 8.8e+30)) {
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = x * (9.0 * y) tmp = 0 if (z <= -8.5e-58) or not (z <= 8.8e+30): tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c else: tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) tmp = 0.0 if ((z <= -8.5e-58) || !(z <= 8.8e+30)) tmp = Float64(Float64(Float64(Float64(b + t_1) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = x * (9.0 * y);
tmp = 0.0;
if ((z <= -8.5e-58) || ~((z <= 8.8e+30)))
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
else
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -8.5e-58], N[Not[LessEqual[z, 8.8e+30]], $MachinePrecision]], N[(N[(N[(N[(b + t$95$1), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{-58} \lor \neg \left(z \leq 8.8 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{\frac{b + t_1}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -8.5000000000000004e-58 or 8.7999999999999999e30 < z Initial program 66.2%
associate-/r*75.3%
Simplified92.5%
fma-udef92.5%
Applied egg-rr92.5%
if -8.5000000000000004e-58 < z < 8.7999999999999999e30Initial program 96.0%
associate-*l*96.0%
associate-*l*88.2%
Simplified88.2%
Final simplification90.5%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -6.5e-58) (not (<= z 1.6e-27))) (/ (+ (/ (+ b (* x (* 9.0 y))) z) (* t (* a -4.0))) c) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -6.5e-58) || !(z <= 1.6e-27)) {
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x and y 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 <= (-6.5d-58)) .or. (.not. (z <= 1.6d-27))) then
tmp = (((b + (x * (9.0d0 * y))) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -6.5e-58) || !(z <= 1.6e-27)) {
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -6.5e-58) or not (z <= 1.6e-27): tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c else: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -6.5e-58) || !(z <= 1.6e-27)) tmp = Float64(Float64(Float64(Float64(b + Float64(x * Float64(9.0 * y))) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -6.5e-58) || ~((z <= 1.6e-27)))
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
else
tmp = (b + ((y * (x * 9.0)) - (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. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -6.5e-58], N[Not[LessEqual[z, 1.6e-27]], $MachinePrecision]], N[(N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-58} \lor \neg \left(z \leq 1.6 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{\frac{b + x \cdot \left(9 \cdot y\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.49999999999999964e-58 or 1.59999999999999995e-27 < z Initial program 67.5%
associate-/r*76.0%
Simplified92.3%
fma-udef92.3%
Applied egg-rr92.3%
if -6.49999999999999964e-58 < z < 1.59999999999999995e-27Initial program 96.6%
Final simplification94.2%
NOTE: x and y 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 (* x y)))
(t_2 (* t (* a -4.0)))
(t_3 (/ (+ t_2 (/ b z)) c)))
(if (<= z -29.0)
t_3
(if (<= z 3.6e+29)
(/ (+ b t_1) (* z c))
(if (<= z 1.72e+134) (/ (+ t_2 (/ t_1 z)) c) t_3)))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * y);
double t_2 = t * (a * -4.0);
double t_3 = (t_2 + (b / z)) / c;
double tmp;
if (z <= -29.0) {
tmp = t_3;
} else if (z <= 3.6e+29) {
tmp = (b + t_1) / (z * c);
} else if (z <= 1.72e+134) {
tmp = (t_2 + (t_1 / z)) / c;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: x and y 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) :: t_3
real(8) :: tmp
t_1 = 9.0d0 * (x * y)
t_2 = t * (a * (-4.0d0))
t_3 = (t_2 + (b / z)) / c
if (z <= (-29.0d0)) then
tmp = t_3
else if (z <= 3.6d+29) then
tmp = (b + t_1) / (z * c)
else if (z <= 1.72d+134) then
tmp = (t_2 + (t_1 / z)) / c
else
tmp = t_3
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * (x * y);
double t_2 = t * (a * -4.0);
double t_3 = (t_2 + (b / z)) / c;
double tmp;
if (z <= -29.0) {
tmp = t_3;
} else if (z <= 3.6e+29) {
tmp = (b + t_1) / (z * c);
} else if (z <= 1.72e+134) {
tmp = (t_2 + (t_1 / z)) / c;
} else {
tmp = t_3;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = 9.0 * (x * y) t_2 = t * (a * -4.0) t_3 = (t_2 + (b / z)) / c tmp = 0 if z <= -29.0: tmp = t_3 elif z <= 3.6e+29: tmp = (b + t_1) / (z * c) elif z <= 1.72e+134: tmp = (t_2 + (t_1 / z)) / c else: tmp = t_3 return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(x * y)) t_2 = Float64(t * Float64(a * -4.0)) t_3 = Float64(Float64(t_2 + Float64(b / z)) / c) tmp = 0.0 if (z <= -29.0) tmp = t_3; elseif (z <= 3.6e+29) tmp = Float64(Float64(b + t_1) / Float64(z * c)); elseif (z <= 1.72e+134) tmp = Float64(Float64(t_2 + Float64(t_1 / z)) / c); else tmp = t_3; end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = 9.0 * (x * y);
t_2 = t * (a * -4.0);
t_3 = (t_2 + (b / z)) / c;
tmp = 0.0;
if (z <= -29.0)
tmp = t_3;
elseif (z <= 3.6e+29)
tmp = (b + t_1) / (z * c);
elseif (z <= 1.72e+134)
tmp = (t_2 + (t_1 / z)) / c;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: x and y 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[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -29.0], t$95$3, If[LessEqual[z, 3.6e+29], N[(N[(b + t$95$1), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.72e+134], N[(N[(t$95$2 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := 9 \cdot \left(x \cdot y\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
t_3 := \frac{t_2 + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -29:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+29}:\\
\;\;\;\;\frac{b + t_1}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.72 \cdot 10^{+134}:\\
\;\;\;\;\frac{t_2 + \frac{t_1}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if z < -29 or 1.71999999999999998e134 < z Initial program 58.5%
associate-/r*69.4%
Simplified91.1%
Taylor expanded in x around 0 83.7%
if -29 < z < 3.59999999999999976e29Initial program 96.3%
associate-/r*83.1%
Simplified83.2%
Taylor expanded in z around 0 82.7%
if 3.59999999999999976e29 < z < 1.71999999999999998e134Initial program 85.6%
associate-/r*90.3%
Simplified95.1%
Taylor expanded in x around inf 90.1%
Final simplification83.7%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= b -200000.0)
(/ b (* z c))
(if (<= b -2.4e-94)
t_1
(if (<= b 8e-296)
(* 9.0 (/ y (* z (/ c x))))
(if (<= b 7e-124)
(* -4.0 (* t (/ a c)))
(if (<= b 29500000000.0)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= b 1e+119) t_1 (* (/ 1.0 z) (/ b c))))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -200000.0) {
tmp = b / (z * c);
} else if (b <= -2.4e-94) {
tmp = t_1;
} else if (b <= 8e-296) {
tmp = 9.0 * (y / (z * (c / x)));
} else if (b <= 7e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 29500000000.0) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= 1e+119) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
NOTE: x and y 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 = (-4.0d0) * (a / (c / t))
if (b <= (-200000.0d0)) then
tmp = b / (z * c)
else if (b <= (-2.4d-94)) then
tmp = t_1
else if (b <= 8d-296) then
tmp = 9.0d0 * (y / (z * (c / x)))
else if (b <= 7d-124) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 29500000000.0d0) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (b <= 1d+119) then
tmp = t_1
else
tmp = (1.0d0 / z) * (b / c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -200000.0) {
tmp = b / (z * c);
} else if (b <= -2.4e-94) {
tmp = t_1;
} else if (b <= 8e-296) {
tmp = 9.0 * (y / (z * (c / x)));
} else if (b <= 7e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 29500000000.0) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= 1e+119) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if b <= -200000.0: tmp = b / (z * c) elif b <= -2.4e-94: tmp = t_1 elif b <= 8e-296: tmp = 9.0 * (y / (z * (c / x))) elif b <= 7e-124: tmp = -4.0 * (t * (a / c)) elif b <= 29500000000.0: tmp = 9.0 * ((y / z) * (x / c)) elif b <= 1e+119: tmp = t_1 else: tmp = (1.0 / z) * (b / c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (b <= -200000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= -2.4e-94) tmp = t_1; elseif (b <= 8e-296) tmp = Float64(9.0 * Float64(y / Float64(z * Float64(c / x)))); elseif (b <= 7e-124) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 29500000000.0) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (b <= 1e+119) tmp = t_1; else tmp = Float64(Float64(1.0 / z) * Float64(b / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
tmp = 0.0;
if (b <= -200000.0)
tmp = b / (z * c);
elseif (b <= -2.4e-94)
tmp = t_1;
elseif (b <= 8e-296)
tmp = 9.0 * (y / (z * (c / x)));
elseif (b <= 7e-124)
tmp = -4.0 * (t * (a / c));
elseif (b <= 29500000000.0)
tmp = 9.0 * ((y / z) * (x / c));
elseif (b <= 1e+119)
tmp = t_1;
else
tmp = (1.0 / z) * (b / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -200000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.4e-94], t$95$1, If[LessEqual[b, 8e-296], N[(9.0 * N[(y / N[(z * N[(c / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7e-124], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 29500000000.0], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e+119], t$95$1, N[(N[(1.0 / z), $MachinePrecision] * N[(b / c), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;b \leq -200000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -2.4 \cdot 10^{-94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-296}:\\
\;\;\;\;9 \cdot \frac{y}{z \cdot \frac{c}{x}}\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-124}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 29500000000:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;b \leq 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\
\end{array}
\end{array}
if b < -2e5Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -2e5 < b < -2.4e-94 or 2.95e10 < b < 9.99999999999999944e118Initial program 68.3%
associate-/r*59.5%
Simplified78.5%
Taylor expanded in t around inf 52.0%
associate-/l*66.0%
Simplified66.0%
if -2.4e-94 < b < 8e-296Initial program 81.6%
associate-/r*72.5%
Simplified82.6%
Taylor expanded in x around inf 64.0%
*-commutative64.0%
times-frac56.2%
Simplified56.2%
*-commutative56.2%
clear-num56.2%
frac-times58.8%
*-un-lft-identity58.8%
Applied egg-rr58.8%
if 8e-296 < b < 6.9999999999999997e-124Initial program 77.5%
associate-/r*80.0%
Simplified87.4%
Taylor expanded in t around inf 57.9%
associate-/l*65.1%
associate-/r/57.9%
Simplified57.9%
if 6.9999999999999997e-124 < b < 2.95e10Initial program 88.2%
associate-/r*90.6%
Simplified97.6%
Taylor expanded in x around inf 62.5%
*-commutative62.5%
times-frac55.2%
Simplified55.2%
if 9.99999999999999944e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
div-inv67.5%
clear-num67.5%
inv-pow67.5%
inv-pow67.5%
unpow-prod-down67.6%
associate-/r/82.3%
inv-pow82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification63.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= b -120000000.0)
(/ b (* z c))
(if (<= b -1e-90)
t_1
(if (<= b 1.6e-293)
(* 9.0 (/ y (/ (* z c) x)))
(if (<= b 7.1e-124)
(* -4.0 (* t (/ a c)))
(if (<= b 880000000.0)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= b 8e+118) t_1 (* (/ 1.0 z) (/ b c))))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -120000000.0) {
tmp = b / (z * c);
} else if (b <= -1e-90) {
tmp = t_1;
} else if (b <= 1.6e-293) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (b <= 7.1e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 880000000.0) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= 8e+118) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
NOTE: x and y 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 = (-4.0d0) * (a / (c / t))
if (b <= (-120000000.0d0)) then
tmp = b / (z * c)
else if (b <= (-1d-90)) then
tmp = t_1
else if (b <= 1.6d-293) then
tmp = 9.0d0 * (y / ((z * c) / x))
else if (b <= 7.1d-124) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 880000000.0d0) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (b <= 8d+118) then
tmp = t_1
else
tmp = (1.0d0 / z) * (b / c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -120000000.0) {
tmp = b / (z * c);
} else if (b <= -1e-90) {
tmp = t_1;
} else if (b <= 1.6e-293) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (b <= 7.1e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 880000000.0) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= 8e+118) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if b <= -120000000.0: tmp = b / (z * c) elif b <= -1e-90: tmp = t_1 elif b <= 1.6e-293: tmp = 9.0 * (y / ((z * c) / x)) elif b <= 7.1e-124: tmp = -4.0 * (t * (a / c)) elif b <= 880000000.0: tmp = 9.0 * ((y / z) * (x / c)) elif b <= 8e+118: tmp = t_1 else: tmp = (1.0 / z) * (b / c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (b <= -120000000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= -1e-90) tmp = t_1; elseif (b <= 1.6e-293) tmp = Float64(9.0 * Float64(y / Float64(Float64(z * c) / x))); elseif (b <= 7.1e-124) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 880000000.0) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (b <= 8e+118) tmp = t_1; else tmp = Float64(Float64(1.0 / z) * Float64(b / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
tmp = 0.0;
if (b <= -120000000.0)
tmp = b / (z * c);
elseif (b <= -1e-90)
tmp = t_1;
elseif (b <= 1.6e-293)
tmp = 9.0 * (y / ((z * c) / x));
elseif (b <= 7.1e-124)
tmp = -4.0 * (t * (a / c));
elseif (b <= 880000000.0)
tmp = 9.0 * ((y / z) * (x / c));
elseif (b <= 8e+118)
tmp = t_1;
else
tmp = (1.0 / z) * (b / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -120000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1e-90], t$95$1, If[LessEqual[b, 1.6e-293], N[(9.0 * N[(y / N[(N[(z * c), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.1e-124], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 880000000.0], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e+118], t$95$1, N[(N[(1.0 / z), $MachinePrecision] * N[(b / c), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;b \leq -120000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -1 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{-293}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\
\mathbf{elif}\;b \leq 7.1 \cdot 10^{-124}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 880000000:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\
\end{array}
\end{array}
if b < -1.2e8Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -1.2e8 < b < -9.99999999999999995e-91 or 8.8e8 < b < 7.99999999999999973e118Initial program 68.3%
associate-/r*59.5%
Simplified78.5%
Taylor expanded in t around inf 52.0%
associate-/l*66.0%
Simplified66.0%
if -9.99999999999999995e-91 < b < 1.60000000000000003e-293Initial program 81.6%
associate-/r*72.5%
Simplified82.6%
Taylor expanded in x around inf 64.0%
associate-/l*63.8%
*-commutative63.8%
Simplified63.8%
if 1.60000000000000003e-293 < b < 7.10000000000000039e-124Initial program 77.5%
associate-/r*80.0%
Simplified87.4%
Taylor expanded in t around inf 57.9%
associate-/l*65.1%
associate-/r/57.9%
Simplified57.9%
if 7.10000000000000039e-124 < b < 8.8e8Initial program 88.2%
associate-/r*90.6%
Simplified97.6%
Taylor expanded in x around inf 62.5%
*-commutative62.5%
times-frac55.2%
Simplified55.2%
if 7.99999999999999973e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
div-inv67.5%
clear-num67.5%
inv-pow67.5%
inv-pow67.5%
unpow-prod-down67.6%
associate-/r/82.3%
inv-pow82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification63.8%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= b -6400000.0)
(/ b (* z c))
(if (<= b -2.4e-84)
t_1
(if (<= b 1.9e-289)
(* 9.0 (/ y (/ (* z c) x)))
(if (<= b 7.2e-124)
(* -4.0 (* t (/ a c)))
(if (<= b 29500000000.0)
(* 9.0 (/ (* x y) (* z c)))
(if (<= b 7.5e+118) t_1 (* (/ 1.0 z) (/ b c))))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -6400000.0) {
tmp = b / (z * c);
} else if (b <= -2.4e-84) {
tmp = t_1;
} else if (b <= 1.9e-289) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (b <= 7.2e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 29500000000.0) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (b <= 7.5e+118) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
NOTE: x and y 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 = (-4.0d0) * (a / (c / t))
if (b <= (-6400000.0d0)) then
tmp = b / (z * c)
else if (b <= (-2.4d-84)) then
tmp = t_1
else if (b <= 1.9d-289) then
tmp = 9.0d0 * (y / ((z * c) / x))
else if (b <= 7.2d-124) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 29500000000.0d0) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (b <= 7.5d+118) then
tmp = t_1
else
tmp = (1.0d0 / z) * (b / c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -6400000.0) {
tmp = b / (z * c);
} else if (b <= -2.4e-84) {
tmp = t_1;
} else if (b <= 1.9e-289) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (b <= 7.2e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 29500000000.0) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (b <= 7.5e+118) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if b <= -6400000.0: tmp = b / (z * c) elif b <= -2.4e-84: tmp = t_1 elif b <= 1.9e-289: tmp = 9.0 * (y / ((z * c) / x)) elif b <= 7.2e-124: tmp = -4.0 * (t * (a / c)) elif b <= 29500000000.0: tmp = 9.0 * ((x * y) / (z * c)) elif b <= 7.5e+118: tmp = t_1 else: tmp = (1.0 / z) * (b / c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (b <= -6400000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= -2.4e-84) tmp = t_1; elseif (b <= 1.9e-289) tmp = Float64(9.0 * Float64(y / Float64(Float64(z * c) / x))); elseif (b <= 7.2e-124) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 29500000000.0) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (b <= 7.5e+118) tmp = t_1; else tmp = Float64(Float64(1.0 / z) * Float64(b / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
tmp = 0.0;
if (b <= -6400000.0)
tmp = b / (z * c);
elseif (b <= -2.4e-84)
tmp = t_1;
elseif (b <= 1.9e-289)
tmp = 9.0 * (y / ((z * c) / x));
elseif (b <= 7.2e-124)
tmp = -4.0 * (t * (a / c));
elseif (b <= 29500000000.0)
tmp = 9.0 * ((x * y) / (z * c));
elseif (b <= 7.5e+118)
tmp = t_1;
else
tmp = (1.0 / z) * (b / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6400000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.4e-84], t$95$1, If[LessEqual[b, 1.9e-289], N[(9.0 * N[(y / N[(N[(z * c), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.2e-124], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 29500000000.0], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+118], t$95$1, N[(N[(1.0 / z), $MachinePrecision] * N[(b / c), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;b \leq -6400000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -2.4 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{-289}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-124}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 29500000000:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\
\end{array}
\end{array}
if b < -6.4e6Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -6.4e6 < b < -2.40000000000000017e-84 or 2.95e10 < b < 7.50000000000000003e118Initial program 68.3%
associate-/r*59.5%
Simplified78.5%
Taylor expanded in t around inf 52.0%
associate-/l*66.0%
Simplified66.0%
if -2.40000000000000017e-84 < b < 1.90000000000000005e-289Initial program 81.6%
associate-/r*72.5%
Simplified82.6%
Taylor expanded in x around inf 64.0%
associate-/l*63.8%
*-commutative63.8%
Simplified63.8%
if 1.90000000000000005e-289 < b < 7.20000000000000019e-124Initial program 77.5%
associate-/r*80.0%
Simplified87.4%
Taylor expanded in t around inf 57.9%
associate-/l*65.1%
associate-/r/57.9%
Simplified57.9%
if 7.20000000000000019e-124 < b < 2.95e10Initial program 88.2%
associate-/r*90.6%
Simplified97.6%
Taylor expanded in x around inf 62.5%
if 7.50000000000000003e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
div-inv67.5%
clear-num67.5%
inv-pow67.5%
inv-pow67.5%
unpow-prod-down67.6%
associate-/r/82.3%
inv-pow82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification65.0%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= b -72000000.0)
(/ b (* z c))
(if (<= b -1.95e-90)
t_1
(if (<= b 6.4e-295)
(* 9.0 (/ y (/ (* z c) x)))
(if (<= b 7.5e-124)
(* -4.0 (* t (/ a c)))
(if (<= b 52000000.0)
(/ (* 9.0 (* x y)) (* z c))
(if (<= b 7.5e+118) t_1 (* (/ 1.0 z) (/ b c))))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -72000000.0) {
tmp = b / (z * c);
} else if (b <= -1.95e-90) {
tmp = t_1;
} else if (b <= 6.4e-295) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (b <= 7.5e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 52000000.0) {
tmp = (9.0 * (x * y)) / (z * c);
} else if (b <= 7.5e+118) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
NOTE: x and y 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 = (-4.0d0) * (a / (c / t))
if (b <= (-72000000.0d0)) then
tmp = b / (z * c)
else if (b <= (-1.95d-90)) then
tmp = t_1
else if (b <= 6.4d-295) then
tmp = 9.0d0 * (y / ((z * c) / x))
else if (b <= 7.5d-124) then
tmp = (-4.0d0) * (t * (a / c))
else if (b <= 52000000.0d0) then
tmp = (9.0d0 * (x * y)) / (z * c)
else if (b <= 7.5d+118) then
tmp = t_1
else
tmp = (1.0d0 / z) * (b / c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -72000000.0) {
tmp = b / (z * c);
} else if (b <= -1.95e-90) {
tmp = t_1;
} else if (b <= 6.4e-295) {
tmp = 9.0 * (y / ((z * c) / x));
} else if (b <= 7.5e-124) {
tmp = -4.0 * (t * (a / c));
} else if (b <= 52000000.0) {
tmp = (9.0 * (x * y)) / (z * c);
} else if (b <= 7.5e+118) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if b <= -72000000.0: tmp = b / (z * c) elif b <= -1.95e-90: tmp = t_1 elif b <= 6.4e-295: tmp = 9.0 * (y / ((z * c) / x)) elif b <= 7.5e-124: tmp = -4.0 * (t * (a / c)) elif b <= 52000000.0: tmp = (9.0 * (x * y)) / (z * c) elif b <= 7.5e+118: tmp = t_1 else: tmp = (1.0 / z) * (b / c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (b <= -72000000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= -1.95e-90) tmp = t_1; elseif (b <= 6.4e-295) tmp = Float64(9.0 * Float64(y / Float64(Float64(z * c) / x))); elseif (b <= 7.5e-124) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (b <= 52000000.0) tmp = Float64(Float64(9.0 * Float64(x * y)) / Float64(z * c)); elseif (b <= 7.5e+118) tmp = t_1; else tmp = Float64(Float64(1.0 / z) * Float64(b / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
tmp = 0.0;
if (b <= -72000000.0)
tmp = b / (z * c);
elseif (b <= -1.95e-90)
tmp = t_1;
elseif (b <= 6.4e-295)
tmp = 9.0 * (y / ((z * c) / x));
elseif (b <= 7.5e-124)
tmp = -4.0 * (t * (a / c));
elseif (b <= 52000000.0)
tmp = (9.0 * (x * y)) / (z * c);
elseif (b <= 7.5e+118)
tmp = t_1;
else
tmp = (1.0 / z) * (b / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -72000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.95e-90], t$95$1, If[LessEqual[b, 6.4e-295], N[(9.0 * N[(y / N[(N[(z * c), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e-124], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 52000000.0], N[(N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e+118], t$95$1, N[(N[(1.0 / z), $MachinePrecision] * N[(b / c), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;b \leq -72000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq -1.95 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6.4 \cdot 10^{-295}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{z \cdot c}{x}}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-124}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;b \leq 52000000:\\
\;\;\;\;\frac{9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\
\end{array}
\end{array}
if b < -7.2e7Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -7.2e7 < b < -1.95000000000000002e-90 or 5.2e7 < b < 7.50000000000000003e118Initial program 68.3%
associate-/r*59.5%
Simplified78.5%
Taylor expanded in t around inf 52.0%
associate-/l*66.0%
Simplified66.0%
if -1.95000000000000002e-90 < b < 6.4e-295Initial program 81.6%
associate-/r*72.5%
Simplified82.6%
Taylor expanded in x around inf 64.0%
associate-/l*63.8%
*-commutative63.8%
Simplified63.8%
if 6.4e-295 < b < 7.4999999999999996e-124Initial program 77.5%
associate-/r*80.0%
Simplified87.4%
Taylor expanded in t around inf 57.9%
associate-/l*65.1%
associate-/r/57.9%
Simplified57.9%
if 7.4999999999999996e-124 < b < 5.2e7Initial program 88.2%
associate-/r*90.6%
Simplified97.6%
Taylor expanded in x around inf 62.5%
*-commutative62.5%
times-frac55.2%
Simplified55.2%
frac-times62.5%
Applied egg-rr62.5%
associate-*r/62.5%
*-commutative62.5%
Applied egg-rr62.5%
if 7.50000000000000003e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
div-inv67.5%
clear-num67.5%
inv-pow67.5%
inv-pow67.5%
unpow-prod-down67.6%
associate-/r/82.3%
inv-pow82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification65.0%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (+ (/ (+ b (* x (* 9.0 y))) z) (* t (* a -4.0))) c))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
}
NOTE: x and y 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 + (x * (9.0d0 * y))) / z) + (t * (a * (-4.0d0)))) / c
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): return (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(b + Float64(x * Float64(9.0 * y))) / z) + Float64(t * Float64(a * -4.0))) / c) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{b + x \cdot \left(9 \cdot y\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}
\end{array}
Initial program 80.5%
associate-/r*78.3%
Simplified86.4%
fma-udef86.4%
Applied egg-rr86.4%
Final simplification86.4%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= b -72000000.0)
(/ b (* z c))
(if (<= b 9e-124)
t_1
(if (<= b 15000000.0)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= b 1e+119) t_1 (* (/ 1.0 z) (/ b c))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -72000000.0) {
tmp = b / (z * c);
} else if (b <= 9e-124) {
tmp = t_1;
} else if (b <= 15000000.0) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= 1e+119) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
NOTE: x and y 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 = (-4.0d0) * (a / (c / t))
if (b <= (-72000000.0d0)) then
tmp = b / (z * c)
else if (b <= 9d-124) then
tmp = t_1
else if (b <= 15000000.0d0) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (b <= 1d+119) then
tmp = t_1
else
tmp = (1.0d0 / z) * (b / c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (b <= -72000000.0) {
tmp = b / (z * c);
} else if (b <= 9e-124) {
tmp = t_1;
} else if (b <= 15000000.0) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= 1e+119) {
tmp = t_1;
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if b <= -72000000.0: tmp = b / (z * c) elif b <= 9e-124: tmp = t_1 elif b <= 15000000.0: tmp = 9.0 * ((y / z) * (x / c)) elif b <= 1e+119: tmp = t_1 else: tmp = (1.0 / z) * (b / c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (b <= -72000000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= 9e-124) tmp = t_1; elseif (b <= 15000000.0) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (b <= 1e+119) tmp = t_1; else tmp = Float64(Float64(1.0 / z) * Float64(b / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
tmp = 0.0;
if (b <= -72000000.0)
tmp = b / (z * c);
elseif (b <= 9e-124)
tmp = t_1;
elseif (b <= 15000000.0)
tmp = 9.0 * ((y / z) * (x / c));
elseif (b <= 1e+119)
tmp = t_1;
else
tmp = (1.0 / z) * (b / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -72000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9e-124], t$95$1, If[LessEqual[b, 15000000.0], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1e+119], t$95$1, N[(N[(1.0 / z), $MachinePrecision] * N[(b / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;b \leq -72000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq 9 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 15000000:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;b \leq 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\
\end{array}
\end{array}
if b < -7.2e7Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -7.2e7 < b < 8.9999999999999992e-124 or 1.5e7 < b < 9.99999999999999944e118Initial program 75.7%
associate-/r*70.6%
Simplified82.8%
Taylor expanded in t around inf 47.3%
associate-/l*58.5%
Simplified58.5%
if 8.9999999999999992e-124 < b < 1.5e7Initial program 88.2%
associate-/r*90.6%
Simplified97.6%
Taylor expanded in x around inf 62.5%
*-commutative62.5%
times-frac55.2%
Simplified55.2%
if 9.99999999999999944e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
div-inv67.5%
clear-num67.5%
inv-pow67.5%
inv-pow67.5%
unpow-prod-down67.6%
associate-/r/82.3%
inv-pow82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification61.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -47.0) (not (<= z 6.8e+46))) (/ (+ (* t (* a -4.0)) (/ b z)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -47.0) || !(z <= 6.8e+46)) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x and y 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 <= (-47.0d0)) .or. (.not. (z <= 6.8d+46))) then
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -47.0) || !(z <= 6.8e+46)) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -47.0) or not (z <= 6.8e+46): tmp = ((t * (a * -4.0)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -47.0) || !(z <= 6.8e+46)) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -47.0) || ~((z <= 6.8e+46)))
tmp = ((t * (a * -4.0)) + (b / z)) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -47.0], N[Not[LessEqual[z, 6.8e+46]], $MachinePrecision]], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -47 \lor \neg \left(z \leq 6.8 \cdot 10^{+46}\right):\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -47 or 6.7999999999999996e46 < z Initial program 62.0%
associate-/r*72.2%
Simplified91.6%
Taylor expanded in x around 0 81.1%
if -47 < z < 6.7999999999999996e46Initial program 96.4%
associate-/r*83.5%
Simplified83.5%
Taylor expanded in z around 0 82.9%
Final simplification82.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -8.5e+120)
(/ (* t (* a -4.0)) c)
(if (<= z 4e+109)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* -4.0 (/ a (/ c t))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.5e+120) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 4e+109) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y 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 <= (-8.5d+120)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 4d+109) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.5e+120) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 4e+109) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -8.5e+120: tmp = (t * (a * -4.0)) / c elif z <= 4e+109: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -8.5e+120) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 4e+109) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -8.5e+120)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 4e+109)
tmp = (b + (9.0 * (x * y))) / (z * c);
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. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -8.5e+120], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4e+109], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+120}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+109}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if z < -8.50000000000000026e120Initial program 52.5%
associate-/r*63.5%
Simplified97.1%
Taylor expanded in t around inf 71.6%
associate-*r*71.6%
*-commutative71.6%
*-commutative71.6%
*-commutative71.6%
Simplified71.6%
if -8.50000000000000026e120 < z < 3.99999999999999993e109Initial program 91.4%
associate-/r*83.1%
Simplified85.7%
Taylor expanded in z around 0 77.3%
if 3.99999999999999993e109 < z Initial program 57.0%
associate-/r*70.1%
Simplified84.9%
Taylor expanded in t around inf 70.1%
associate-/l*72.5%
Simplified72.5%
Final simplification75.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= b -2.7e+88) (/ b (* z c)) (if (<= b 1.1e+119) (* -4.0 (* t (/ a c))) (/ (/ b c) z))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.7e+88) {
tmp = b / (z * c);
} else if (b <= 1.1e+119) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (b <= (-2.7d+88)) then
tmp = b / (z * c)
else if (b <= 1.1d+119) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -2.7e+88) {
tmp = b / (z * c);
} else if (b <= 1.1e+119) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -2.7e+88: tmp = b / (z * c) elif b <= 1.1e+119: tmp = -4.0 * (t * (a / c)) else: tmp = (b / c) / z return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -2.7e+88) tmp = Float64(b / Float64(z * c)); elseif (b <= 1.1e+119) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -2.7e+88)
tmp = b / (z * c);
elseif (b <= 1.1e+119)
tmp = -4.0 * (t * (a / c));
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -2.7e+88], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.1e+119], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+88}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{+119}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -2.70000000000000016e88Initial program 88.5%
associate-/r*86.4%
Simplified88.6%
Taylor expanded in b around inf 74.2%
*-commutative74.2%
Simplified74.2%
if -2.70000000000000016e88 < b < 1.1000000000000001e119Initial program 77.8%
associate-/r*76.0%
Simplified87.4%
Taylor expanded in t around inf 44.7%
associate-/l*51.8%
associate-/r/47.8%
Simplified47.8%
if 1.1000000000000001e119 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
Taylor expanded in b around 0 74.7%
associate-/r*82.1%
Simplified82.1%
Final simplification57.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= b -120000000.0) (/ b (* z c)) (if (<= b 8e+118) (* -4.0 (/ a (/ c t))) (/ (/ b c) z))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -120000000.0) {
tmp = b / (z * c);
} else if (b <= 8e+118) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / c) / z;
}
return tmp;
}
NOTE: x and y 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 <= (-120000000.0d0)) then
tmp = b / (z * c)
else if (b <= 8d+118) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = (b / c) / z
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -120000000.0) {
tmp = b / (z * c);
} else if (b <= 8e+118) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (b / c) / z;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -120000000.0: tmp = b / (z * c) elif b <= 8e+118: tmp = -4.0 * (a / (c / t)) else: tmp = (b / c) / z return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -120000000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= 8e+118) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(Float64(b / c) / z); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -120000000.0)
tmp = b / (z * c);
elseif (b <= 8e+118)
tmp = -4.0 * (a / (c / t));
else
tmp = (b / c) / z;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -120000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e+118], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -120000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq 8 \cdot 10^{+118}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\end{array}
\end{array}
if b < -1.2e8Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -1.2e8 < b < 7.99999999999999973e118Initial program 78.9%
associate-/r*75.8%
Simplified86.6%
Taylor expanded in t around inf 45.6%
associate-/l*54.1%
Simplified54.1%
if 7.99999999999999973e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
Taylor expanded in b around 0 74.7%
associate-/r*82.1%
Simplified82.1%
Final simplification59.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= b -66000000.0) (/ b (* z c)) (if (<= b 8.2e+118) (* -4.0 (/ a (/ c t))) (* (/ 1.0 z) (/ b c)))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -66000000.0) {
tmp = b / (z * c);
} else if (b <= 8.2e+118) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
NOTE: x and y 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 <= (-66000000.0d0)) then
tmp = b / (z * c)
else if (b <= 8.2d+118) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = (1.0d0 / z) * (b / c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -66000000.0) {
tmp = b / (z * c);
} else if (b <= 8.2e+118) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = (1.0 / z) * (b / c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if b <= -66000000.0: tmp = b / (z * c) elif b <= 8.2e+118: tmp = -4.0 * (a / (c / t)) else: tmp = (1.0 / z) * (b / c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -66000000.0) tmp = Float64(b / Float64(z * c)); elseif (b <= 8.2e+118) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(Float64(1.0 / z) * Float64(b / c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (b <= -66000000.0)
tmp = b / (z * c);
elseif (b <= 8.2e+118)
tmp = -4.0 * (a / (c / t));
else
tmp = (1.0 / z) * (b / c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -66000000.0], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.2e+118], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / z), $MachinePrecision] * N[(b / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -66000000:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;b \leq 8.2 \cdot 10^{+118}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{b}{c}\\
\end{array}
\end{array}
if b < -6.6e7Initial program 82.3%
associate-/r*83.9%
Simplified90.4%
Taylor expanded in b around inf 60.4%
*-commutative60.4%
Simplified60.4%
if -6.6e7 < b < 8.1999999999999994e118Initial program 78.9%
associate-/r*75.8%
Simplified86.6%
Taylor expanded in t around inf 45.6%
associate-/l*54.1%
Simplified54.1%
if 8.1999999999999994e118 < b Initial program 84.4%
associate-/r*79.8%
Simplified84.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in b around inf 67.6%
div-inv67.5%
clear-num67.5%
inv-pow67.5%
inv-pow67.5%
unpow-prod-down67.6%
associate-/r/82.3%
inv-pow82.3%
associate-/r/82.3%
Applied egg-rr82.3%
Final simplification59.8%
NOTE: x and y 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);
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.
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;
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]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y = num2cell(sort([x, y])){:}
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. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 80.5%
associate-/r*78.3%
Simplified87.3%
Taylor expanded in b around inf 37.9%
*-commutative37.9%
Simplified37.9%
Final simplification37.9%
(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 2023207
(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)))