1 // cl_RA equal_hashcode().
4 #include "base/cl_sysdep.h"
7 #include "cln/rational.h"
12 #include "base/cl_N.h"
13 #include "rational/cl_RA.h"
14 #include "base/cl_inline.h"
15 #include "integer/misc/cl_I_eqhashcode.cc"
19 CL_INLINE2 uint32 CL_INLINE2_DECL(equal_hashcode) (const cl_RA& r)
23 return equal_hashcode_inline(r);
25 // Making sure that a float and its rational equivalent have
26 // the same hash code is tricky. This code depends on the fact
27 // that the equal_hashcode_low macro is linear in `exp'.
29 return equal_hashcode_inline(numerator(r))
30 - equal_hashcode_inline(denominator(r))