#NEWLINE# def test_log_hp( ) : #NEWLINE# #INDENT# mp . dps = 2000 #NEWLINE# a = ( ( mpf ( 10 ) ** 15000 ) / 3 ) #NEWLINE# r = log ( a ) #NEWLINE# res = last_digits ( r ) #NEWLINE# assert ( res == '44380444176833347033' ) #NEWLINE# r = log ( ( mpf ( 3 ) / 2 ) ) #NEWLINE# res = last_digits ( r ) #NEWLINE# assert ( res == '53749808140753263288' ) #NEWLINE# mp . dps = 10000 #NEWLINE# r = log ( 2 ) #NEWLINE# res = last_digits ( r ) #NEWLINE# assert ( res == '91340185660135965556' ) #NEWLINE# r = log ( ( ( mpf ( 10 ) ** 10 ) / 3 ) ) #NEWLINE# res = last_digits ( r ) #NEWLINE# assert ( res == '54020631943060007154' ) , res #NEWLINE# r = log ( ( ( mpf ( 10 ) ** 100 ) / 3 ) ) #NEWLINE# res = last_digits ( r ) #NEWLINE# assert ( res == '36539088351652334666' ) , res #NEWLINE# mp . dps += 10 #NEWLINE# a = ( 1 - ( mpf ( 1 ) / ( 10 ** 10 ) ) ) #NEWLINE# mp . dps -= 10 #NEWLINE# r = log ( a ) #NEWLINE# res = last_digits ( r ) #NEWLINE# assert ( res == '37216724048322957404' ) , res #NEWLINE# mp . dps = 10000 #NEWLINE# mp . dps += 100 #NEWLINE# a = ( 1 + ( mpf ( 1 ) / ( 10 ** 100 ) ) ) #NEWLINE# mp . dps -= 100 #NEWLINE# r = log ( a ) #NEWLINE# res = last_digits ( ( + r ) ) #NEWLINE# assert ( res == '39947338773774122415' ) , res #NEWLINE# mp . dps = 15