Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. #
  4. # Copyright (c) 2010 Doug Hellmann. All rights reserved.
  5. #
  6. """Logarithms close to zero.
  7. """
  8. #end_pymotw_header
  9.  
  10. import math
  11.  
  12. x = 0.0000000000000000000000001
  13. print 'x :', x
  14. print '1 + x :', 1+x
  15. print 'log(1+x):', math.log(1+x)
  16. print 'log1p(x):', math.log1p(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement