6 #include "cln/number.h"
11 nonreturning_function(extern, cl_error_division_by_0, (void));
12 nonreturning_function(extern, cl_as_error, (const cl_number& obj, const char * typestring, const char * filename, int line));
14 // For the equal-invariant hashcode, we take a mixture of exponent, length
15 // and the most significant 32 bits. To ensure that equal(x,y) implies
16 // equal_hashcode(x) == equal_hashcode(y) we must make sure that
17 // equal_hashcode(rational(x)) == equal_hashcode(x) and
18 // equal_hashcode(0.0) = 0 (important because of equal(complex(x,0.0),x)).
19 #define equal_hashcode_low(msd,exp,sign) \
20 (((((uint32)(msd) << 7) | ((uint32)(msd) >> 25)) ^ ((sint32)(sign) << 30)) + (uintL)(exp))
21 #define equal_hashcode_one equal_hashcode_low(bit(31),1,0)