1 // cl_RA equal_hashcode().
7 #include "cln/rational.h"
14 #include "cl_inline.h"
15 #include "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))