#NEWLINE# def test_integers( self ) : #NEWLINE# #INDENT# for i in range ( ( - 1000 ) , 1000 ) : #NEWLINE# #INDENT# self . check_equal_hash ( i , float ( i ) ) #NEWLINE# self . check_equal_hash ( i , D ( i ) ) #NEWLINE# self . check_equal_hash ( i , F ( i ) ) #NEWLINE# #UNINDENT# for i in range ( 100 ) : #NEWLINE# #INDENT# n = ( ( 2 ** i ) - 1 ) #NEWLINE# if ( n == int ( float ( n ) ) ) : #NEWLINE# #INDENT# self . check_equal_hash ( n , float ( n ) ) #NEWLINE# self . check_equal_hash ( ( - n ) , ( - float ( n ) ) ) #NEWLINE# #UNINDENT# self . check_equal_hash ( n , D ( n ) ) #NEWLINE# self . check_equal_hash ( n , F ( n ) ) #NEWLINE# self . check_equal_hash ( ( - n ) , D ( ( - n ) ) ) #NEWLINE# self . check_equal_hash ( ( - n ) , F ( ( - n ) ) ) #NEWLINE# n = ( 2 ** i ) #NEWLINE# self . check_equal_hash ( n , float ( n ) ) #NEWLINE# self . check_equal_hash ( ( - n ) , ( - float ( n ) ) ) #NEWLINE# self . check_equal_hash ( n , D ( n ) ) #NEWLINE# self . check_equal_hash ( n , F ( n ) ) #NEWLINE# self . check_equal_hash ( ( - n ) , D ( ( - n ) ) ) #NEWLINE# self . check_equal_hash ( ( - n ) , F ( ( - n ) ) ) #NEWLINE# #UNINDENT# for _ in range ( 1000 ) : #NEWLINE# #INDENT# e = random . randrange ( 300 ) #NEWLINE# n = random . randrange ( ( - ( 10 ** e ) ) , ( 10 ** e ) ) #NEWLINE# self . check_equal_hash ( n , D ( n ) ) #NEWLINE# self . check_equal_hash ( n , F ( n ) ) #NEWLINE# if ( n == int ( float ( n ) ) ) : #NEWLINE# #INDENT# self . check_equal_hash ( n , float ( n ) )