12 #include "cl_lfloat.h"
13 #include "cl_LF_impl.h"
14 #include "cl_integer.h"
20 const cl_R cl_I_LF_div (const cl_I& x, const cl_LF& y)
24 // Else convert x to a float and divide.
25 // (If x is shorter than y, we would gain nothing by dividing the absolute
26 // value of x by the mantissa of y, since the numerator of the division would
27 // have to have 2*length(y)+1 words, even if length(x) is much smaller than
29 if (eq(x,0)) { return 0; }
30 var uintC len = TheLfloat(y)->len;
31 return cl_I_to_LF(x,len) / y;
33 // Bit complexity (N = max(length(x),length(y))): O(M(N)).