From anonymous, 2 Months ago, written in Python.
Embed
  1. import math as _math
  2.  
  3. _pi = _math.pi
  4.  
  5. def __getattr__(name):
  6.     global _pi
  7.     if name == "pi":
  8.         _pi += 0.000001
  9.         return _pi
  10.     return getattr(_math, name)
  11.    
  12.  
  13.  
  14.    
  15. # >>> import sys, fake_math
  16. # >>> sys.modules["math"] = fake_math
  17. # >>> import math
  18. # >>> math.tau
  19. # 6.283185307179586
  20. # >>> math.tau
  21. # 6.283185307179586
  22. # >>> math.pi
  23. # 3.1415936535897933
  24. # >>> math.pi
  25. # 3.1415946535897934
  26. # >>> math.pi
  27. # 3.1415956535897935